• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ColumnConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
public FeatureGrid(int width, int height) {
	super(new ListStore<VectorFeature>(
			new ModelKeyProvider<VectorFeature>() {
				@Override
				public String getKey(VectorFeature item) {
					return item.getFeatureId();
				}
			}),

	new ColumnModel<VectorFeature>(
			new ArrayList<ColumnConfig<VectorFeature, ?>>())

	);

	this.setBorders(true);
	this.setAllowTextSelection(true);
	this.getView().setStripeRows(true);
	this.getView().setColumnLines(true);
	this.setColumnReordering(true);
	this.setLoadMask(true);

	this.setWidth(width);
	this.setHeight(height);

	this.setEnableCellRender(false);
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:27,代码来源:FeatureGrid.java


示例3: 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


示例4: 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


示例5: FeatureGrid

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
public FeatureGrid(int width, int height) {
	super(
			new ListStore<VectorFeature>(
					new ModelKeyProvider<VectorFeature> () {
						@Override
						public String getKey(VectorFeature item) {						
							return item.getFeatureId();
						}					
					}),
			
			new ColumnModel<VectorFeature>(
					new ArrayList<ColumnConfig<VectorFeature, ?>>())
			);
			
	this.setBorders(true);
	this.setAllowTextSelection(true);
	this.getView().setStripeRows(true);
	this.getView().setColumnLines(true);		
	this.setColumnReordering(true);					
	this.setLoadMask(true);
	
	this.setWidth(width);
	this.setHeight(height);	
	
	this.setEnableCellRender(false);
}
 
开发者ID:geowe,项目名称:geowe-core,代码行数:27,代码来源:FeatureGrid.java


示例6: 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


示例7: createAndAddGridPortlet

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void createAndAddGridPortlet() {
  store = new ListStore<>(properties.key());
  ColumnConfig<TabItemValue, String> idColumn = new ColumnConfig<>(properties.id(),
                                                                   1200,
                                                                   "ID");
  List<ColumnConfig<TabItemValue, ?>> columns = new ArrayList<>();
  columns.add(idColumn);
  ColumnModel<TabItemValue> cm = new ColumnModel<>(columns);
  grid = new Grid<>(store,
                    cm);
  grid.getView()
      .setAutoExpandColumn(idColumn);
  grid.getView()
      .setForceFit(true);
  grid.getView()
      .setStripeRows(true);
  grid.getView()
      .setColumnLines(true);
  grid.setHeight(512);
  Portlet portlet01 = new Portlet();
  portlet01.setHeading("Open Tabs");
  portlet01.add(grid);
  portal.add(portlet01,
             0);
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:26,代码来源:ContentView.java


示例8: initializeStatusGrid

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void initializeStatusGrid() {
	// Creacion del Grid Base
	StatusItemProperties props = GWT.create(StatusItemProperties.class);
	statusStore = new ListStore<StatusItem>(props.key());
	statusStore.setAutoCommit(true);

	ColumnConfig<StatusItem, String> nameCol = new ColumnConfig<StatusItem, String>(
			props.name(), 75, UIMessages.INSTANCE.fedColumnNameText());

	ColumnConfig<StatusItem, String> valueCol = new ColumnConfig<StatusItem, String>(
			props.value(), 150,
			UIMessages.INSTANCE.fedNewAttributeDefaultNameText());

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

	statusGrid = new Grid<StatusItem>(statusStore,
			new ColumnModel<StatusItem>(columns));
	statusGrid.setSelectionModel(new CellSelectionModel<StatusItem>());
	statusGrid.getColumnModel().getColumn(1).setHideable(false);
	statusGrid.setHideHeaders(true);
	statusGrid.setAllowTextSelection(true);
	statusGrid.getView().setStripeRows(true);
	statusGrid.getView().setColumnLines(true);
	statusGrid.setBorders(false);

	statusStore.add(new StatusItem(LON_LABEL, null));
	statusStore.add(new StatusItem(LAT_LABEL, null));
	statusStore.add(new StatusItem(SCALE_LABEL, null));
	statusStore.add(new StatusItem(CLICK_COORD_X, null));
	statusStore.add(new StatusItem(CLICK_COORD_Y, null));
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:34,代码来源:StatusPanelWidget.java


示例9: 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 GitHubRepositoryAttributeBeanProperties props = GWT
			.create(GitHubRepositoryAttributeBeanProperties.class);
	repositoryStore = new ListStore<GitHubRepositoryAttributeBean>(props.key());

	final ColumnConfig<GitHubRepositoryAttributeBean, Integer> idCol = new ColumnConfig<GitHubRepositoryAttributeBean, Integer>(
			props.attributeId(), 190, "Id");		
	final ColumnConfig<GitHubRepositoryAttributeBean, String> nameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.attributeName(), 190, UIMessages.INSTANCE.gitHubColumNameRepo());
	final ColumnConfig<GitHubRepositoryAttributeBean, String> descriptionCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.description(), 200, UIMessages.INSTANCE.gitHubColumDescriptionRepo());
	
	final ColumnConfig<GitHubRepositoryAttributeBean, String> fullNameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.attributeFullName(), 200, "Full Name");

	final List<ColumnConfig<GitHubRepositoryAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubRepositoryAttributeBean, ?>>();
	//columns.add(idCol);
	columns.add(nameCol);
	columns.add(descriptionCol);		
	//columns.add(fullNameCol);

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

	grid = new Grid<GitHubRepositoryAttributeBean>(
			repositoryStore, columModel);
	//grid.setSelectionModel(new CellSelectionModel<GitHubRepositoryAttributeBean>());
	grid.getColumnModel().getColumn(0).setHideable(false);
	grid.setAllowTextSelection(true);
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);		
	grid.setBorders(false);
	setGridDragable(grid);
	
	vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));		

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


示例10: getNameConfig

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
public ColumnConfig<FileModel, String> getNameConfig() {
	if (nameConfig == null) {
		nameConfig = new ColumnConfig<FileModel, String>(FSUtil
				.getFileModelProperties().name(), 200, "Name");
	}
	return nameConfig;
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:8,代码来源:FileManagerViewImpl.java


示例11: setGridEditors

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void setGridEditors() {
	ColumnModel<VectorFeature> columnModel = getFeatureGrid().getColumnModel();
			
	for(ColumnConfig<VectorFeature, ?> column : columnModel.getColumns()) {
		if(!column.isHidden()) {
			this.addEditor((ColumnConfig<VectorFeature, String>)column, new TextField());				
		}
	}			
}
 
开发者ID:geowe,项目名称:geowe-core,代码行数:10,代码来源:EditingFeatureGrid.java


示例12: createGridRolesChoices

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void createGridRolesChoices() {
  storeRolesChoices = new ListStore<Role>(roleProperties.id());

  IdentityValueProvider<Role> identityRolesChoices = new IdentityValueProvider<Role>();
  smRolesChoices = new CheckBoxSelectionModel<Role>(identityRolesChoices);
  smRolesChoices.setSelectionMode(Style.SelectionMode.SINGLE);
  smRolesChoices.addSelectionHandler(new SelectionHandler<Role>() {
    @Override
    public void onSelection(SelectionEvent<Role> event) {
      addButton.setEnabled(smRolesChoices.getSelectedItems()
                                         .size() > 0);
    }
  });

  ColumnConfig<Role, String> roleColumn = new ColumnConfig<Role, String>(roleProperties.role(),
                                                                         200,
                                                                         "Roles Choices");

  List<ColumnConfig<Role, ?>> columns = new ArrayList<ColumnConfig<Role, ?>>();
  columns.add(smRolesChoices.getColumn());
  columns.add(roleColumn);
  ColumnModel<Role> cm = new ColumnModel<Role>(columns);

  gridRolesChoices = new Grid<Role>(storeRolesChoices,
                                    cm);
  gridRolesChoices.setSize("100%",
                           "200px");
  gridRolesChoices.setBorders(true);
  gridRolesChoices.getView()
                  .setAutoExpandColumn(roleColumn);
  gridRolesChoices.getView()
                  .setStripeRows(true);
  gridRolesChoices.setSelectionModel(smRolesChoices);
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:35,代码来源:UserRoleView.java


示例13: createGridSelectedRoles

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void createGridSelectedRoles() {
  storeSelectedRoles = new ListStore<Role>(roleProperties.id());

  IdentityValueProvider<Role> identitySelectedRoles = new IdentityValueProvider<Role>();
  smSelectedRoles = new CheckBoxSelectionModel<Role>(identitySelectedRoles);
  smSelectedRoles.setSelectionMode(Style.SelectionMode.SINGLE);
  smSelectedRoles.addSelectionHandler(new SelectionHandler<Role>() {
    @Override
    public void onSelection(SelectionEvent<Role> event) {
      addButton.setEnabled(smSelectedRoles.getSelectedItems()
                                          .size() > 0);
    }
  });

  ColumnConfig<Role, String> roleColumn = new ColumnConfig<Role, String>(roleProperties.role(),
                                                                         200,
                                                                         "Roles Selected");

  List<ColumnConfig<Role, ?>> columns = new ArrayList<ColumnConfig<Role, ?>>();
  columns.add(smSelectedRoles.getColumn());
  columns.add(roleColumn);
  ColumnModel<Role> cm = new ColumnModel<Role>(columns);

  gridSelectedRoles = new Grid<Role>(storeSelectedRoles,
                                     cm);
  gridSelectedRoles.setSize("100%",
                            "100%");
  gridSelectedRoles.setBorders(true);
  gridSelectedRoles.getView()
                   .setAutoExpandColumn(roleColumn);
  gridSelectedRoles.getView()
                   .setStripeRows(true);
  gridSelectedRoles.setSelectionModel(smSelectedRoles);
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:35,代码来源:UserRoleView.java


示例14: createAndAddGridPersonPortlet

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private void createAndAddGridPersonPortlet() {
    storePerson = new ListStore<>(personProperties.key());
    ColumnConfig<Person, String> firstNameColumn = new ColumnConfig<>(personProperties.firstName(),
                                                                      128,
                                                                      "Firstname");
    ColumnConfig<Person, String> nameColumn = new ColumnConfig<>(personProperties.name(),
                                                                 128,
                                                                 "Name");
    ColumnConfig<Person, String> streetColumn = new ColumnConfig<>(personProperties.street(),
                                                                   128,
                                                                   "Street");
    ColumnConfig<Person, String> cityColumn = new ColumnConfig<>(personProperties.city(),
                                                                 128,
                                                                 "City");
    List<ColumnConfig<Person, ?>> columns = new ArrayList<>();
    columns.add(firstNameColumn);
    columns.add(nameColumn);
    columns.add(streetColumn);
    columns.add(cityColumn);
    ColumnModel<Person> cm = new ColumnModel<>(columns);
    gridPerson = new Grid<>(storePerson,
                            cm);
//    gridPerson.setWidth("100%");
    gridPerson.getView()
              .setAutoExpandColumn(nameColumn);
    gridPerson.getView()
              .setForceFit(true);
    gridPerson.getView()
              .setStripeRows(true);
    gridPerson.getView()
              .setColumnLines(true);
    gridPerson.setHeight(512);
    Portlet portlet02 = new Portlet();
    portlet02.setHeading("Persons");
    portlet02.add(gridPerson);
    portal.add(portlet02,
               0);
  }
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:39,代码来源:ContentView.java


示例15: 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


示例16: 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


示例17: 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


示例18: createPanel

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
private Widget createPanel() {
		userNameField = new TextField();
		userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
		userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
		userNameField.setWidth(FIELD_WIDTH);

		repositoryField = new TextField();
		repositoryField.setTitle("Repositorio");
		repositoryField.setEmptyText("Introduce repositorio");
		repositoryField.setWidth(FIELD_WIDTH);

		pathField = new TextField();
		pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());
		pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
		pathField.setWidth(FIELD_WIDTH);

		TextButton repositoryButton = new TextButton("...");		
		TextButton pathButton = new TextButton("...");
		TextButton loadFilesButton = new TextButton(UIMessages.INSTANCE.loadFiles());
		
		final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();

		vPanel.add(userNameField);
		
		final HorizontalPanel repositoryPanel = new HorizontalPanel();
		repositoryPanel.add(repositoryField);
		repositoryPanel.add(repositoryButton);
		vPanel.add(repositoryPanel);

		final HorizontalPanel pathPanel = new HorizontalPanel();

		pathPanel.add(pathField);
		pathPanel.add(pathButton);		
		vPanel.add(pathPanel);		
		vPanel.add(loadFilesButton);
		
		repositoryButton.addSelectHandler(getRepository());
		pathButton.addSelectHandler(getPath());
		loadFilesButton.addSelectHandler(requestGetFiles());

		vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
		final GitHubFileListAttributeBeanProperties props = GWT
				.create(GitHubFileListAttributeBeanProperties.class);

		repositoryStore = new ListStore<GitHubFileListAttributeBean>(
				props.key());

		final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
				props.attributeName(), 400,
				UIMessages.INSTANCE.gitHubColumNameRepo());

//		final ColumnConfig<GitHubFileListAttributeBean, String> typeCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
//				props.attributeType(), 200, "Type");

		final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();

		columns.add(nameCol);
		//columns.add(typeCol);

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

		grid = new Grid<GitHubFileListAttributeBean>(repositoryStore,
				columModel);
		// grid.setSelectionModel(new
		// CellSelectionModel<GitHubRepositoryAttributeBean>());
		grid.getColumnModel().getColumn(0).setHideable(false);
		grid.setAllowTextSelection(true);
		grid.getView().setStripeRows(true);
		grid.getView().setColumnLines(true);
		grid.setBorders(false);
		GridSelectionModel<GitHubFileListAttributeBean> sm = new GridSelectionModel<GitHubFileListAttributeBean>();
		sm.setSelectionMode(SelectionMode.SINGLE);
		grid.setSelectionModel(sm);
		setGridDragable(grid);

		vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(30, 0, 0, 0)));

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


示例19: GitHubImportTab

import com.sencha.gxt.widget.core.client.grid.ColumnConfig; //导入依赖的package包/类
public GitHubImportTab() {
	super();
			
	setWidth(350);
	
	userNameField = new TextField();
	userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setWidth(150);

	repositoryField = new TextField();
	repositoryField.setTitle("Repositorio");
	repositoryField.setEmptyText("Introduce repositorio");
	repositoryField.setWidth(150);

	pathField = new TextField();
	pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());
	pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
	pathField.setWidth(FIELD_WIDTH);

	TextButton repositoryButton = new TextButton("...");		
	TextButton pathButton = new TextButton("...");
	TextButton loadFilesButton = new TextButton(
			UIMessages.INSTANCE.loadFiles());
	
	final HorizontalPanel repositoryPanel = new HorizontalPanel();
	repositoryPanel.add(userNameField);
	repositoryPanel.add(repositoryField);
	repositoryPanel.add(repositoryButton);
	add(repositoryPanel);

	final HorizontalPanel pathPanel = new HorizontalPanel();

	pathPanel.add(pathField);
	pathPanel.add(pathButton);		
	add(pathPanel);		
	add(loadFilesButton);
	
	repositoryButton.addSelectHandler(getRepository());
	pathButton.addSelectHandler(getPath());
	loadFilesButton.addSelectHandler(requestGetFiles());

	addStyleName(ThemeStyles.get().style().borderBottom());
	final GitHubFileListAttributeBeanProperties props = GWT
			.create(GitHubFileListAttributeBeanProperties.class);

	fileStore = new ListStore<GitHubFileListAttributeBean>(
			props.key());

	final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
			props.attributeName(), 330,
			UIMessages.INSTANCE.gitHubColumNameRepo());

	final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();

	columns.add(nameCol);

	final ColumnModel<GitHubFileListAttributeBean> columModel = new ColumnModel<GitHubFileListAttributeBean>(
			columns);
	
	grid = new Grid<GitHubFileListAttributeBean>(fileStore,
			columModel);
	grid.getView().setAutoFill(false);
	grid.setWidth(260);
	grid.getColumnModel().getColumn(0).setHideable(false);
	grid.setAllowTextSelection(true);
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);
	grid.setBorders(false);
	setGridDragable(grid);				
	add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));
	
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:74,代码来源:GitHubImportTab.java


示例20: 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 GitHubFileListAttributeBeanProperties props = GWT
				.create(GitHubFileListAttributeBeanProperties.class);

		repositoryStore = new ListStore<GitHubFileListAttributeBean>(
				props.key());

		final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
				props.attributeName(), 400,
				UIMessages.INSTANCE.gitHubColumNameRepo());

		// final ColumnConfig<GitHubFileListAttributeBean, String> typeCol = new
		// ColumnConfig<GitHubFileListAttributeBean, String>(
		// props.attributeType(), 200, "Type");

		final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();

		columns.add(nameCol);
		// columns.add(typeCol);

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

		grid = new Grid<GitHubFileListAttributeBean>(repositoryStore,
				columModel);
		// grid.setSelectionModel(new
		// CellSelectionModel<GitHubRepositoryAttributeBean>());
		grid.getColumnModel().getColumn(0).setHideable(false);
		grid.setAllowTextSelection(true);
		grid.getView().setStripeRows(true);
		grid.getView().setColumnLines(true);
		grid.setBorders(false);
		setGridDragable(grid);

		vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(30, 0, 0, 0)));

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RedirectMismatchException类代码示例发布时间:2022-05-22
下一篇:
Java ZKClusterId类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap