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


Java ColumnConfig.setVerticalAlignment方法代码示例

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


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

示例3: createColumnList

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入方法依赖的package包/类
private ColumnModel<VehicleJSO> createColumnList(VehicleJSOProperties props, 
		RowExpander<VehicleJSO> rowExpander) {
	
	rowExpander.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	rowExpander.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	
	ColumnConfig<VehicleJSO, String> nameColumn = new ColumnConfig<VehicleJSO, String>(
			props.name(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UISgfMessages.INSTANCE.nameColumn() + "</b>"));
	
	nameColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	
	
	ColumnConfig<VehicleJSO, String> plateColumn = new ColumnConfig<VehicleJSO, String>(
			props.plate(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UISgfMessages.INSTANCE.plateColumn() + "</b>"));
	
	plateColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);		
	
	ColumnConfig<VehicleJSO, String> statusColumn = new ColumnConfig<VehicleJSO, String>(
			props.status(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UISgfMessages.INSTANCE.statusColumn() + "</b>"));
	statusColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	
	
	ColumnConfig<VehicleJSO, String> lastRevisionDateColumn = new ColumnConfig<VehicleJSO, String>(
			props.lastRevisionDate(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UISgfMessages.INSTANCE.lastReviewColumn() + "</b>"));
	lastRevisionDateColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);	
	
	ColumnConfig<VehicleJSO, String> kmRevisionColumn = new ColumnConfig<VehicleJSO, String>(
			props.kmsLeftForRevision(), 200, SafeHtmlUtils.fromTrustedString("<b>"
					+ UISgfMessages.INSTANCE.kmForReviewColumn() + "</b>"));
	kmRevisionColumn.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);	
			
	List<ColumnConfig<VehicleJSO, ?>> columns = new ArrayList<ColumnConfig<VehicleJSO, ?>>();
	columns.add(rowExpander);
	columns.add(nameColumn);
	columns.add(plateColumn);
	columns.add(statusColumn);	
	columns.add(lastRevisionDateColumn);
	columns.add(kmRevisionColumn);
	
	return new ColumnModel<VehicleJSO>(columns);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:46,代码来源:VehicleDialog.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) {
				filters.initPlugin(this);
				filters.setLocal(true);		
				filters.removeAll();
				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);
					
					//ValueProvider<? super VectorFeature, Object> vp = grid.getEditableGrid().getColumnModel().getValueProvider(0);
					//StringFilter<VectorFeature> plateFilter = new StringFilter<VectorFeature>(vp.getValue(object));
//					if(UISgfMessages.INSTANCE.plateColumn().equals(attributeName)) {
//						StringFilter<VectorFeature> plateFilter = new StringFilter<VectorFeature>(attributeProvider);															 
//						filters.addFilter(plateFilter);					
//					}
					
//					attributeColumn.setCell(new AbstractCell<String>() {
//
//						@Override
//						public void render(
//								com.google.gwt.cell.client.Cell.Context context,
//								String value, SafeHtmlBuilder sb) {
//							
//							
//						}
//					});
					
					StringFilter<VectorFeature> plateFilter = new StringFilter<VectorFeature>(attributeProvider);															 
					filters.addFilter(plateFilter);	
					
					
					 
					
					
				}
			}					
		}
			
		return new ColumnModel<VectorFeature>(columns);
	}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:54,代码来源:FeatureGrid.java


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