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


Java ColumnConfig.setCell方法代码示例

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


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

示例1: createColumnList

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
private ColumnModel<LayerDef> createColumnList(LayerDefProperties props, 
		RowExpander<LayerDef> rowExpander) {
	
	rowExpander.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	rowExpander.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	
	ColumnConfig<LayerDef, String> nameColumn = new ColumnConfig<LayerDef, String>(
			props.name(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UIMessages.INSTANCE.layerManagerToolText() + "</b>"));
	nameColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);		
	
	ColumnConfig<LayerDef, String> typeColumn = new ColumnConfig<LayerDef, String>(
			props.type(), 75, UICatalogMessages.INSTANCE.type());
	typeColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	typeColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);		
	
	ColumnConfig<LayerDef, ImageResource> iconColumn = new ColumnConfig<LayerDef, ImageResource>(
			props.icon(), 32, "");
	iconColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	iconColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	iconColumn.setCell(new ImageResourceCell() {
		@Override
		public void render(Context context, ImageResource value, SafeHtmlBuilder sb) {
			super.render(context, value, sb);
		}
	});
			
	List<ColumnConfig<LayerDef, ?>> columns = new ArrayList<ColumnConfig<LayerDef, ?>>();
	columns.add(rowExpander);
	columns.add(iconColumn);		
	columns.add(nameColumn);
	columns.add(typeColumn);		
	
	return new ColumnModel<LayerDef>(columns);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:36,代码来源:LayerCatalogDialog.java

示例2: asWidget

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
@Override
public Widget asWidget() {
	ColumnConfig<TableColumnModel, String> name = new ColumnConfig<TableColumnModel, String>(
			props.name(), 100, "Name");
	name.setCell(new TitledCell());
	ColumnConfig<TableColumnModel, String> type = new ColumnConfig<TableColumnModel, String>(
			props.type(), 50, "Type");
	type.setCell(new TitledCell());
	ColumnConfig<TableColumnModel, String> desc = new ColumnConfig<TableColumnModel, String>(
			props.desc(), 130, "Comment");
	desc.setCell(new TitledCell());
	List<ColumnConfig<TableColumnModel, ?>> list = new ArrayList<ColumnConfig<TableColumnModel, ?>>();
	list.add(name);
	list.add(type);
	list.add(desc);
	ColumnModel<TableColumnModel> colModel = new ColumnModel<TableColumnModel>(
			list);
	Grid<TableColumnModel> grid = new Grid<TableColumnModel>(getStore(),
			colModel);
	grid.setAllowTextSelection(true);

	grid.getView().setForceFit(true);
	grid.getView().setAutoFill(true);

	return grid;
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:27,代码来源:ColumnInfoTab.java

示例3: DataPreviewGrid

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
public DataPreviewGrid(TablePreviewModel result) {
	List<ColumnConfig<Tuple<Integer, List<String>>, ?>> list = new ArrayList<ColumnConfig<Tuple<Integer, List<String>>, ?>>();
	int count = 0;
	for (String col : result.getHeaders()) {
		ColumnConfig<Tuple<Integer, List<String>>, String> cc = new ColumnConfig<Tuple<Integer, List<String>>, String>(
				new MyValueProvider(count), 80, col);
		cc.setToolTip(new SafeHtmlBuilder().appendHtmlConstant(col)
				.toSafeHtml());
		cc.setCell(new TitledCell());
		list.add(cc);
		count++;
	}
	getListStore().addAll(result.getData());
	ColumnModel<Tuple<Integer, List<String>>> colModel = new ColumnModel<Tuple<Integer, List<String>>>(
			list);
	grid = new Grid<Tuple<Integer, List<String>>>(getListStore(), colModel);

	grid.setHeight(175);

	grid.setAllowTextSelection(true);

	grid.getView().setAdjustForHScroll(false);
	grid.getView().setEmptyText("没有数据!");
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:25,代码来源:DataPreviewGrid.java

示例4: createColumnList

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
protected ColumnModel<VectorFeature> createColumnList(List<VectorFeature> features) {
	List<ColumnConfig<VectorFeature, ?>> columns = new ArrayList<ColumnConfig<VectorFeature, ?>>();
	
	if(features != null && features.size() > 0) {
		VectorFeature feature = features.get(0);

		if(feature.getAttributes() != null) {
			for(String attributeName : feature.getAttributes().getAttributeNames()) {	
				AttributeValueProvider attributeProvider = new AttributeValueProvider(attributeName);
				
				ColumnConfig<VectorFeature, String> attributeColumn = new ColumnConfig<VectorFeature, String>(
						attributeProvider, 100, attributeName);
				attributeColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
				if(isEnableCellRender()) {
					attributeColumn.setCell(new FeatureGridCellRenderer());
				}					
				
				columns.add(attributeColumn);
			}
		}					
	}
		
	return new ColumnModel<VectorFeature>(columns);
}
 
开发者ID:geowe,项目名称:geowe-core,代码行数:25,代码来源:FeatureGrid.java

示例5: createPanel

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
private Widget createPanel() {
	final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
	vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	final FeatureAttributeBeanProperties props = GWT
			.create(FeatureAttributeBeanProperties.class);
	featureAttributes = new ListStore<FeatureAttributeBean>(props.key());

	final ColumnConfig<FeatureAttributeBean, String> nameCol = new ColumnConfig<FeatureAttributeBean, String>(
			props.attributeName(), 190, UIMessages.INSTANCE.fidNameCol());
	final ColumnConfig<FeatureAttributeBean, String> valueCol = new ColumnConfig<FeatureAttributeBean, String>(
			props.attributeValue(), 200, UIMessages.INSTANCE.fidValueCol());

	valueCol.setCell(new FeatureGridCellRenderer());

	final List<ColumnConfig<FeatureAttributeBean, ?>> columns = new ArrayList<ColumnConfig<FeatureAttributeBean, ?>>();
	columns.add(nameCol);
	columns.add(valueCol);

	final ColumnModel<FeatureAttributeBean> columModel = new ColumnModel<FeatureAttributeBean>(
			columns);

	final Grid<FeatureAttributeBean> grid = new Grid<FeatureAttributeBean>(
			featureAttributes, columModel);
	grid.setSelectionModel(new CellSelectionModel<FeatureAttributeBean>());
	grid.getColumnModel().getColumn(0).setHideable(false);
	grid.setAllowTextSelection(true);
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);
	grid.setBorders(false);
	setGridDragable(grid);

	// Definicion del Grid Editable
	final GridEditing<FeatureAttributeBean> gridEditing = new GridInlineEditing<FeatureAttributeBean>(grid);
	gridEditing.addEditor(valueCol, new TextField());

	featureInfoToolBar.initialize(gridEditing, featureAttributes);

	vPanel.add(featureInfoToolBar, new VerticalLayoutData(1, -1,
			new Margins(5, 0, 0, 0)));
	vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));

	final ToolButton tButton = new ToolButton(ToolButton.QUESTION);
	setHelpToolTip(tButton);
	addHelpSelectHandler(tButton);

	getHeader().addTool(tButton);

	return vPanel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:50,代码来源:FeatureInfoDialog.java


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