当前位置: 首页>>代码示例>>Java>>正文


Java SelectionMode类代码示例

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


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


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