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


Java EditorGrid.setView方法代码示例

本文整理汇总了Java中com.extjs.gxt.ui.client.widget.grid.EditorGrid.setView方法的典型用法代码示例。如果您正苦于以下问题:Java EditorGrid.setView方法的具体用法?Java EditorGrid.setView怎么用?Java EditorGrid.setView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.extjs.gxt.ui.client.widget.grid.EditorGrid的用法示例。


在下文中一共展示了EditorGrid.setView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGridModel

import com.extjs.gxt.ui.client.widget.grid.EditorGrid; //导入方法依赖的package包/类
private EditorGrid<SaveItem> getGridModel(ContentData mdr, ListStore<SaveItem> store, boolean saveInstances) {
	List<ColumnConfig> config = new ArrayList<ColumnConfig>();  

	config.add(EditorFactory.getColumn(mdr, "ci", "Template", 100, false, "xs:string", 1, false, false));
	if (saveInstances) {
		config.add(EditorFactory.getColumn(mdr, "saveInstances", "Instances", 60, true, "xs:boolean", 1, false, false));
	}
	config.add(EditorFactory.getColumn(mdr, "saveTemplates", "Templates", 60, true, "xs:boolean", 1, false, false));
	config.add(EditorFactory.getColumn(mdr, "allChildren", "All Children", 60, true, "xs:boolean", 1, false, false));


	final ColumnModel cm = new ColumnModel(config);  

	GroupingView view = new GroupingView();  
	view.setForceFit(true);  

	view.setGroupRenderer(new GridGroupRenderer() {  
		public String render(GroupColumnData data) {  
			String f = cm.getColumnById(data.field).getHeader();  
			String l = data.models.size() == 1 ? "Item" : "Items";  
			return f + ": " + data.group + " (" + data.models.size() + " " + l + ")";  
		}  
	});  

	EditorGrid<SaveItem> grid = new EditorGrid<SaveItem>(store, cm);  
	grid.setView(view);  
	grid.setBorders(true);
	for (ColumnConfig cfg : config) {
		if (cfg instanceof CheckColumnConfig) {
			grid.addPlugin((ComponentPlugin)cfg);
		}
	}
	store.setStoreSorter(null);
	return(grid);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:36,代码来源:CMDBModelSaveWindow.java

示例2: getGridModel

import com.extjs.gxt.ui.client.widget.grid.EditorGrid; //导入方法依赖的package包/类
private EditorGrid<SaveItem> getGridModel(ContentData mdr, ListStore<SaveItem> store, boolean saveInstances) {
	List<ColumnConfig> config = new ArrayList<ColumnConfig>();  

	config.add(EditorFactory.getColumn(mdr, "ci", "Template", 100, false, "xs:string", 1, false, false));
	if (saveInstances) {
		config.add(EditorFactory.getColumn(mdr, "saveInstances", "Instance(s)", 60, true, "xs:boolean", 1, false, false));
	}
	config.add(EditorFactory.getColumn(mdr, "saveTemplates", "Template(s)", 60, true, "xs:boolean", 1, false, false));
	config.add(EditorFactory.getColumn(mdr, "allChildren", "All Children", 60, true, "xs:boolean", 1, false, false));


	final ColumnModel cm = new ColumnModel(config);  

	GroupingView view = new GroupingView();  
	view.setForceFit(true);  

	view.setGroupRenderer(new GridGroupRenderer() {  
		public String render(GroupColumnData data) {  
			String f = cm.getColumnById(data.field).getHeader();  
			String l = data.models.size() == 1 ? "Item" : "Items";  
			return f + ": " + data.group + " (" + data.models.size() + " " + l + ")";  
		}  
	});  

	EditorGrid<SaveItem> grid = new EditorGrid<SaveItem>(store, cm);  
	grid.setView(view);  
	grid.setBorders(true);
	for (ColumnConfig cfg : config) {
		if (cfg instanceof CheckColumnConfig) {
			grid.addPlugin((ComponentPlugin)cfg);
		}
	}
	store.setStoreSorter(null);
	return(grid);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:36,代码来源:CMDBModelClearWindow.java


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