Java ColumnModel类代码示例

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


Java ColumnModel类代码示例

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

示例1: createGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的package包/类
private Grid<LayerDef> createGrid(ListStore<LayerDef> dataStore,
		LayerDefProperties properties) {
	
	RowExpander<LayerDef> rowExpander = createRowExpander();
	ColumnModel<LayerDef> columnModel = createColumnList(properties, rowExpander);
	Grid<LayerDef> grid = new Grid<LayerDef>(dataStore, columnModel);				
	grid.setBorders(true);
	grid.getView().setForceFit(true);				
	grid.getView().setAutoExpandColumn(columnModel.getColumn(2));
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);
	grid.setBorders(true);
	grid.setColumnReordering(true);
	rowExpander.initPlugin(grid);	
	
	return grid;
} 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:LayerCatalogDialog.java

示例2: createColumnList

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例3: FeatureGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例4: asWidget

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例5: DataPreviewGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例6: FeatureGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例7: createColumnList

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例8: createAndAddGridPortlet

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例9: initializeStatusGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例10: createGrid

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的package包/类
private Grid<VehicleJSO> createGrid(ListStore<VehicleJSO> dataStore,
		VehicleJSOProperties properties) {
	
	StringFilter<VehicleJSO> plateFilter = new StringFilter<VehicleJSO>(properties.plate());
	StringFilter<VehicleJSO> nameFilter = new StringFilter<VehicleJSO>(properties.name());
	GridFilters<VehicleJSO> filters = new GridFilters<VehicleJSO>();
	
	
	RowExpander<VehicleJSO> rowExpander = createRowExpander();
	ColumnModel<VehicleJSO> columnModel = createColumnList(properties, rowExpander);
	Grid<VehicleJSO> grid = new Grid<VehicleJSO>(dataStore, columnModel);		
	
	grid.setBorders(true);
	grid.getView().setForceFit(true);				
	grid.getView().setAutoExpandColumn(columnModel.getColumn(2));
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);
	grid.setBorders(true);
	grid.setColumnReordering(true);
	rowExpander.initPlugin(grid);	
	
	filters.initPlugin(grid);
	filters.setLocal(true);		 
	filters.addFilter(nameFilter);
	filters.addFilter(plateFilter);
	
	return grid;
} 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:29,代码来源:VehicleDialog.java

示例11: createPanel

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例12: setGridEditors

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例13: createGridRolesChoices

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例14: createGridSelectedRoles

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

示例15: createAndAddGridPersonPortlet

import com.sencha.gxt.widget.core.client.grid.ColumnModel; //导入依赖的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

本文标签属性:

示例:示例英文

代码:代码生成器

java:java游戏

ColumnModel:ColumnModel

上一篇:女朋友在朋友圈晒我送的生日礼物什么意思(女生把你送她的礼物发朋友圈说明什么?)(女生把你送的生日礼物发朋友圈说明什么,女生在发朋友圈说明什么)
下一篇:Java ThemeResource类代码示例

为您推荐