• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SelectionMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.extjs.gxt.ui.client.Style.SelectionMode的典型用法代码示例。如果您正苦于以下问题:Java SelectionMode类的具体用法?Java SelectionMode怎么用?Java SelectionMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SelectionMode类属于com.extjs.gxt.ui.client.Style包,在下文中一共展示了SelectionMode类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initListView

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Inits the list view.
 */
private void initListView() {
    view = new ListView<T>();

    view.setId("img-chooser-view");
    view.setBorders(false);
    view.setStore(store);

    setListProperties();

    view.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    view.getSelectionModel().addListener(Events.SelectionChange,
            new Listener<SelectionChangedEvent<T>>() {
                public void handleEvent(SelectionChangedEvent<T> be) {
                    onSelectionChange(be);
                }
            });
    main.add(view);

    createDetails();

}
 
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:GeofenceChooserWidget.java


示例2: createGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Creates the grid component.
 * 
 * @return The grid component.
 */
private Component createGrid() {

	grid = new Grid<PhaseModelDTO>(new ListStore<PhaseModelDTO>(), new PhaseModelsColumnsProvider() {

		@Override
		protected GridEventHandler<PhaseModelDTO> getGridEventHandler() {
			return gridEventHandler;
		}
	}.getColumnModel());

	grid.setAutoHeight(true);
	grid.getView().setForceFit(true);
	grid.getStore().setSortField(PhaseModelDTO.SUCCESSORS);

	final GridSelectionModel<PhaseModelDTO> selectionModel = new GridSelectionModel<PhaseModelDTO>();
	selectionModel.setSelectionMode(SelectionMode.SINGLE);
	grid.setSelectionModel(selectionModel);

	return grid;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:PhaseModelsAdminView.java


示例3: showHistory

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private void showHistory(CIModel mdrConfig) {
	this.selectedMDRConfig = mdrConfig;
	ContentData cd = new ContentData();
	cd.set("template", MDRHistoryState.getHistoryTemplate());
	historyGrid = new EditableCIInstanceGrid(mdr, cd, "Config entries for ");
	historyGrid.setRootCI("Root");
	historyGrid.setPermissions(new CMDBPermissions(CMDBPermissions.PermissionState.READONLY));
	historyGrid.setQuery(getHistoryQuery(mdrConfig));
	BaseModel tableConfig = item.getParams().get("mdrHistoryTable");
	if (tableConfig != null) {
		historyGrid.setColumnFilter(new ColumnFilter((BaseModel)tableConfig.get("columnFilter")));
	}
	historyGrid.setHeaderVisible(false);
	historyGrid.setSelectable(true);
	historyGrid.setSelectionMode(SelectionMode.SINGLE);
	historyGrid.setSelectionListener(new Listener<SelectionChangedEvent>() {


		public void handleEvent(SelectionChangedEvent be) {
			if (be.getSelection().size() == 1) {
				compare.setEnabled(true);
				CIModelCollection col = (CIModelCollection) be.getSelection().get(0);
				selectedHistoryModel = col.getCIModels().get(0);
			} else {
				selectedHistoryModel = null;
				compare.setEnabled(false);
			}
		}
		
	});
	//grid.setContextMenuItem(getHistoryMenuItem());
	historyPanel.removeAll();
	historyPanel.setHeading("Execution result for " + mdrConfig.getDisplayName());
	historyPanel.add(historyGrid);
	historyPanel.layout();
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:38,代码来源:MDRDetailWindow.java


示例4: MultiSelectCI

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
public MultiSelectCI(ContentData mdr, CIModel template, SelectionMode selMode, ValueListModel values, CMDBPermissions perm) {
	this.mdr = mdr;
	this.template = template;
	this.values = values;
	this.selMode = selMode;
	this.permissions = perm;
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:8,代码来源:MultiSelectCI.java


示例5: SingleSelectValueModelCI

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
public SingleSelectValueModelCI(ContentData mdr, String alias, CIModel template,  CMDBPermissions perm) {
	this.mdr = mdr;
	this.template = template;
	this.selMode = SelectionMode.SINGLE;;
	this.permissions = perm;
	this.alias = alias;
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:8,代码来源:SingleSelectValueModelCI.java


示例6: initGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Inits the grid.
 */
public void initGrid()
{
    ColumnModel cm = prepareColumnModel();

    grid = new Grid<RuleModel>(store, cm);
    grid.setBorders(true);

    grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    grid.setHeight("70px");
    grid.setLazyRowRender(0);
    setGridProperties();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:16,代码来源:EditRuleWidget.java


示例7: initGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Inits the grid.
 */
private void initGrid() {
    ColumnModel cm = prepareColumnModel();

    grid = new Grid<T>(store, cm);
    grid.setBorders(true);

    grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
  
    grid.setHeight("95%");
    grid.setLazyRowRender(0);
    setGridProperties();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:16,代码来源:GeofenceEditGridWidget.java


示例8: createGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Creates the grid component.
 * 
 * @return The grid component.
 */
private Component createGrid(boolean canHaveMandatoryFields, boolean hasBanner, boolean hasCard) {

	grid = new Grid<FlexibleElementDTO>(new ListStore<FlexibleElementDTO>(), new FlexibleElementsColumnsProvider() {

		@Override
		protected boolean isEditable() {
			return editable;
		}

		@Override
		protected GridEventHandler<FlexibleElementDTO> getGridEventHandler() {
			return gridEventHandler;
		}

	}.getColumnModel(canHaveMandatoryFields, hasBanner, hasCard));

	grid.setAutoHeight(true);
	grid.getView().setForceFit(true);
	grid.getStore().setSortField(FlexibleElementDTO.CONTAINER);

	final GridSelectionModel<FlexibleElementDTO> selectionModel = new GridSelectionModel<FlexibleElementDTO>();
	selectionModel.setSelectionMode(SelectionMode.MULTI);
	grid.setSelectionModel(selectionModel);

	return grid;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:FlexibleElementsAdminView.java


示例9: getGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BeanModel> getGrid(){
	loadGrid();
	
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	ColumnConfig nameColumnConfig = new ColumnConfig("name", "Branch", 120);
	nameColumnConfig.setSortable(false);
	nameColumnConfig.setMenuDisabled(true);
	columns.add(nameColumnConfig);
	
	ColumnConfig ownerColumnConfig = new ColumnConfig("owner.fullName", "Owner", 120);
	ownerColumnConfig.setSortable(false);
	ownerColumnConfig.setMenuDisabled(true);
	columns.add(ownerColumnConfig);
	
	
	ColumnModel cm = new ColumnModel(columns);

	grid = new Grid<BeanModel>(store, cm);
	grid.setLoadMask(true);
    grid.setWidth(400);
    grid.setHeight(300);
    grid.addStyleName(".my-table-style");
    grid.setBorders(true);
    grid.setAutoExpandColumn("name");
    grid.getView().setEmptyText("no data");
    grid.setId("myBranchid");
       grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);  
    grid.getSelectionModel().addListener(Events.SelectionChange,new Listener<SelectionChangedEvent<BeanModel>>(){
		@Override	public void handleEvent(SelectionChangedEvent<BeanModel> be) {
			branchId = Integer.parseInt(grid.getSelectionModel().getSelectedItem().get("id").toString());
			loadFormPanel(branchId);
		}
    });
    
    
    
    return grid;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:40,代码来源:BranchPanel.java


示例10: DepartmentFormGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BeanModel> DepartmentFormGrid(){
     RpcProxy<List<DepartmentDTO>> proxy = new RpcProxy<List<DepartmentDTO>>() {
          @Override
          protected void load(Object loadConfig, AsyncCallback<List<DepartmentDTO>> callback) {
          	departmentService.getDepartmentsByBranch("1",branch,callback);
          }
     };
     ListLoader<?> loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy,new BeanModelReader());
     final ListStore<BeanModel> store = new ListStore<BeanModel>(loader);
     store.setMonitorChanges(true);
     loader.load();


     List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
  columns.add(new ColumnConfig("name", myConstants.department(), 120));
  columns.add(new ColumnConfig("owner.fullName",myConstants.owner(), 200));
		  ColumnModel cm = new ColumnModel(columns);
	
		  departmentGrid = new Grid<BeanModel>(store, cm);
		  departmentGrid.setLoadMask(true);
		  departmentGrid.setWidth(440);
		  departmentGrid.setHeight(500);

		  departmentGrid.addStyleName(".my-table-style");
		  departmentGrid.setBorders(true);
		  departmentGrid.setAutoExpandColumn("name");
		  departmentGrid.getView().setEmptyText("no data");
		  departmentGrid.setId("myDepartmentGridiD");
	  departmentGrid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);  
		  departmentGrid.getSelectionModel().addListener(Events.SelectionChange,  
	   new Listener<SelectionChangedEvent<BeanModel>>() {  
	     public void handleEvent(SelectionChangedEvent<BeanModel> be) { 
	    	    departmentId =   Integer.parseInt(departmentGrid.getSelectionModel().getSelectedItem().get("id").toString());
				loadAssignmentTreeGrid();
	     }  
	   });  

	
		  return departmentGrid;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:41,代码来源:DepartmentReport.java


示例11: doUserAssignmentCheckGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BaseModel> doUserAssignmentCheckGrid(){
	
	
	 final  CheckBoxSelectionModel<BaseModel> sm = new CheckBoxSelectionModel<BaseModel>();  
	 sm.getColumn().setMenuDisabled(true);
	 sm.getColumn().setFixed(true);
	 sm.setSelectionMode(SelectionMode.SIMPLE);
	 sm.getColumn().setSortable(false);
	 sm.getColumn().setDataIndex("selected");
	 List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); 
	 configs.add(sm.getColumn());


		
	 ColumnConfig userConfig = new ColumnConfig("name", "User", 150);
	 userConfig.setFixed(true);
	 userConfig.setSortable(false);
	 userConfig.setMenuDisabled(true);
     configs.add(userConfig);
	 ColumnModel cm = new ColumnModel(configs);

	 userAssignmentCheckGrid = new Grid<BaseModel>(new ListStore<BaseModel>(), cm); 
	 userAssignmentCheckGrid.setLoadMask(true);
	 userAssignmentCheckGrid.setWidth(288);
	 userAssignmentCheckGrid.setHeight(400);
	 userAssignmentCheckGrid.addStyleName(".my-table-style");
	 userAssignmentCheckGrid.setBorders(true);
	 userAssignmentCheckGrid.setSelectionModel(sm);
	 userAssignmentCheckGrid.setAutoExpandColumn("name");
	 userAssignmentCheckGrid.getView().setEmptyText("no data");
	 userAssignmentCheckGrid.setId("userAssignmentCheckGridId");
	return userAssignmentCheckGrid;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:34,代码来源:AddUserToAssignmentWindow.java


示例12: setSelectionMode

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
public void setSelectionMode(SelectionMode mode) {
	this.selectionMode = mode;
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:4,代码来源:EditableCIInstanceGrid.java


示例13: SingleSelectCI

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
public SingleSelectCI(ContentData mdr, CIModel template,  CMDBPermissions perm) {
	this.mdr = mdr;
	this.template = template;
	this.selMode = SelectionMode.SINGLE;;
	this.permissions = perm;
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:7,代码来源:SingleSelectCI.java


示例14: initGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * Inits the grid.
 */
private void initGrid() {
    ColumnModel cm = prepareColumnModel();

    grid = new Grid<T>(store, cm);
    grid.setBorders(true);

    grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    grid.setAutoWidth(true);

    grid.setLoadMask(true);

    grid.setLazyRowRender(0);

    setGridProperties();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:19,代码来源:GeofenceGridWidget.java


示例15: initialize

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public final void initialize() {

	// --
	// GRID PANEL.
	// --

	gridPanel = Panels.content("Models"); // TODO i18n

	grid = new Grid<E>(new ListStore<E>(), getColumnModel());
	grid.setAutoHeight(true);
	grid.getView().setForceFit(true);

	final GridSelectionModel<E> selectionModel = new GridSelectionModel<E>();
	selectionModel.setSelectionMode(SelectionMode.SINGLE);
	grid.setSelectionModel(selectionModel);

	gridPanel.setTopComponent(createGridToolBar());
	gridPanel.setScrollMode(Style.Scroll.AUTO);
	gridPanel.add(grid);
	
	// --
	// MAINTENANCE FIELDS.
	// --
	
	underMaintenanceField = Forms.checkbox(I18N.CONSTANTS.UNDER_MAINTENANCE());
	maintenanceDateField = Forms.date(null, true);
	maintenanceTimeField = Forms.time(null, true);
	
	maintenanceDateField.setVisible(false);
	maintenanceTimeField.setVisible(false);
	
	final com.google.gwt.user.client.ui.Grid maintenanceGrid = new com.google.gwt.user.client.ui.Grid(1, 5);
	maintenanceGrid.setWidget(0, 0, underMaintenanceField);
	maintenanceGrid.setWidget(0, 2, maintenanceDateField);
	maintenanceGrid.setWidget(0, 4, maintenanceTimeField);
	
	maintenanceGroupField = new AdapterField(maintenanceGrid);
	maintenanceGroupField.setFieldLabel(I18N.CONSTANTS.UNDER_MAINTENANCE());

	// --
	// DETAILS PANEL.
	// --

	detailsContainer = Layouts.fit(false, "x-border-layout-ct");

	detailsHeaderForm = buildHeaderForm();
	closeButton = new ToolButton(STYLE_TOOL_CLOSE_ICON);
	detailsHeaderForm.getHeader().addTool(closeButton);
	detailsHeaderForm.setHeaderVisible(true);

	saveDetailsHeaderButton = Forms.button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
	detailsHeaderForm.addButton(saveDetailsHeaderButton);

	tabPanel = Panels.tab(Layouts.STYLE_WHITE_BACKGROUND);
	tabPanel.setPlain(true);
	
	// --
	// GENERAL INITIALIZATION.
	// --

	add(gridPanel, Layouts.borderLayoutData(LayoutRegion.WEST, 500f, true, Margin.RIGHT));
	add(detailsContainer);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:68,代码来源:AbstractModelsAdminView.java


示例16: createGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private ContentPanel createGrid(){
	ContentPanel cp  = new ContentPanel();
	cp.setWidth(600);
	cp.setHeight(400);
	
	final  CheckBoxSelectionModel<BaseModel> sm = new CheckBoxSelectionModel<BaseModel>();  
    sm.getColumn().setMenuDisabled(true);
    sm.getColumn().setSortable(false);
    sm.getColumn().setDataIndex("selected");
    sm.setSelectionMode(SelectionMode.MULTI);
    
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); 
	configs.add(sm.getColumn());


	
	ColumnConfig usersColumnConfig = new ColumnConfig("fullName", "Username", 150);
	usersColumnConfig.setSortable(false);
	usersColumnConfig.setMenuDisabled(true);
	configs.add(usersColumnConfig);
	
	ColumnConfig loginColumnConfig = new ColumnConfig("login", "Login", 150);
	loginColumnConfig.setSortable(false);
	loginColumnConfig.setMenuDisabled(true);
	configs.add(loginColumnConfig);
	
	ColumnConfig emailColumnConfig = new ColumnConfig("email", "email", 150);
	emailColumnConfig.setSortable(false);
	emailColumnConfig.setMenuDisabled(true);
	configs.add(emailColumnConfig);
	
	 ColumnModel cm = new ColumnModel(configs);
	    
	 usersGrid = new Grid<BaseModel>(new ListStore<BaseModel>(), cm); 
	 usersGrid.setLoadMask(true);
	 usersGrid.setWidth(600);
	 usersGrid.setHeight(350);
	 usersGrid.addStyleName(".my-table-style");
	 usersGrid.setBorders(true);
	 usersGrid.setSelectionModel(sm);

	 usersGrid.setAutoExpandColumn("login");
	 usersGrid.getView().setEmptyText("no data");
	 usersGrid.setId("usersGridId");
	
	 cp.add(usersGrid);
	
	return cp;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:50,代码来源:ImportUsersFromExternalStoreGrid.java


示例17: createAuthmethodGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BeanModel> createAuthmethodGrid(){
	populateAuthmethodGrid();
	
	
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	ColumnConfig typeColumnConfig = new ColumnConfig("type", "Type", 100);
	typeColumnConfig.setSortable(false);
	typeColumnConfig.setMenuDisabled(true);
	columns.add(typeColumnConfig);
	
	
	ColumnConfig descriptionColumnConfig = new ColumnConfig("description", "Description", 300);
	descriptionColumnConfig.setSortable(false);
	descriptionColumnConfig.setMenuDisabled(true);
	columns.add(descriptionColumnConfig);
	
	
	
	ColumnModel cm = new ColumnModel(columns);
	
	authmethodGrid = new Grid<BeanModel>(authMethodStore,cm);
	authmethodGrid.setLoadMask(true);
	authmethodGrid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); 
	authmethodGrid.setSize(400, 300);
	authmethodGrid.addStyleName(".my-table-style");
	authmethodGrid.setBorders(true);
	authmethodGrid.setAutoExpandColumn("type");
	authmethodGrid.getView().setEmptyText("no data");
	authmethodGrid.setId("myauthmethodGridIid");
	
	authmethodGrid.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<BeanModel>(){

		@Override			public void selectionChanged(SelectionChangedEvent<BeanModel> se) {
			chooseAuthmethodFormType();
			Integer authmethodId = Integer.parseInt(authmethodGrid.getSelectionModel().getSelectedItem().get("id").toString());
			String  type =  authmethodGrid.getSelectionModel().getSelectedItem().get("type");
			if(type.equals("ad")){
				ADFormPanel(authmethodId);
				getAuthMetodDetails(authmethodId);
			}else{
				authmethodFormPanel.removeAll();
			}
			
		}
		
	});
	

	
	
	authmethodGrid.addListener(Events.OnClick, new Listener<BaseEvent>(){
		@Override	public void handleEvent(BaseEvent be) {
			if (authmethodGrid.getSelectionModel().getSelection().size() > 0) {  
		//		chooseAuthmethodFormType();
		
				
               } 
		}
	});
	
	authmethodGrid.getSelectionModel().select(authmethodGrid.getStore().getAt(0), true);
	
	return authmethodGrid;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:66,代码来源:AuthPanel.java


示例18: doGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BeanModel> doGrid(){
	RpcProxy<List<UserDTO>> UserProxy = new RpcProxy<List<UserDTO>>() {
           @Override
           protected void load(Object loadConfig, AsyncCallback<List<UserDTO>> callback) {
                userService.getUsersByBranch(usersRpcCriteria,selectedBranch,callback);
           }
       };    
   loader = new BaseListLoader<ListLoadResult<ModelData>>(UserProxy,new BeanModelReader());
   final ListStore<BeanModel> UserStore = new ListStore<BeanModel>(loader);
   UserStore.setMonitorChanges(true);
   
   List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
   
   columns.add(new ColumnConfig("login", "Login", 80));
   columns.add(new ColumnConfig("fullName", "Name", 150));
   columns.add(new ColumnConfig("status", "Status", 60));
   columns.add(new ColumnConfig("department.name", "Department", 80));
   ColumnModel cm = new ColumnModel(columns);
	
   grid = new Grid<BeanModel>(UserStore, cm);
grid.setLoadMask(true);
   grid.setWidth(380);
   grid.setHeight(600);
   grid.addStyleName(".my-table-style");
   grid.setBorders(true);
   grid.setAutoExpandColumn("login");
   grid.getView().setEmptyText("no data");
   grid.setId("myGridid");
   grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);  
   grid.getSelectionModel().addListener(Events.SelectionChange,new Listener<SelectionChangedEvent<BeanModel>>(){
	@Override
	public void handleEvent(SelectionChangedEvent<BeanModel> be) {
		 if (be.getSelection().size() > 0) { 
			 	userId  = Integer.parseInt(grid.getSelectionModel().getSelectedItem().get("id").toString());
			 	setExternalRateFieldValue();
		 }
	}
   });
           
	
return grid;
	
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:44,代码来源:ExternalRatePanel.java


示例19: doGrid

import com.extjs.gxt.ui.client.Style.SelectionMode; //导入依赖的package包/类
private Grid<BaseModel> doGrid(){
	
	RpcProxy<List<BaseModel>> proxy = new RpcProxy<List<BaseModel>>() {
		@Override
           protected void load(Object loadConfig, AsyncCallback<List<BaseModel>> callback) {
           	Date startDate = start.getValue();
           	Date endDate = end.getValue();
               statService.getHourReportByUserByPeriodByAssignmentByBranch(assignment,branch,type,startDate, endDate,callback);
           }
       };    
       
       ListLoader<?> loader = new BaseListLoader<ListLoadResult<BaseModel>>(proxy);
       store = new ListStore<BaseModel>(loader);
       store.setMonitorChanges(true);
	
    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    columns.add(new ColumnConfig("username",myConstants.user(), 180));
    columns.add(new ColumnConfig("assignment", "Assignment", 150));
    columns.add(new ColumnConfig("hour", "Hour", 50));
    columns.add(new ColumnConfig("department",myConstants.department(), 100));
    columns.add(new ColumnConfig("branch",myConstants.branch(), 100));
    columns.add(new ColumnConfig("inratesum", "inRateSum", 50));
    columns.add(new ColumnConfig("extratesum", "extRateSum", 50));
    
    ColumnModel cm = new ColumnModel(columns);
    
	grid = new Grid<BaseModel>(store,cm);
	grid.setLoadMask(true);
	grid.setWidth(740);
	grid.setHeight(400);
    grid.addStyleName(".my-table-style");
    grid.setBorders(true);
    grid.setAutoExpandColumn("username");
    grid.getView().setEmptyText("no data");
    grid.setId("myid");
       grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);  

	
	return grid;
	
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:42,代码来源:HourUserReport.java



注:本文中的com.extjs.gxt.ui.client.Style.SelectionMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Function1类代码示例发布时间:2022-05-22
下一篇:
Java ObjectUtils类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap