本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}