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


Java ColumnModel类代码示例

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


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

示例1: prepareColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
@Override
public ColumnModel prepareColumnModel()
{
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig userNameColumn = new ColumnConfig();
    userNameColumn.setId(BeanKeyValue.USER_NAME.getValue());
    userNameColumn.setHeader("User Name");
    userNameColumn.setWidth(80);
    configs.add(userNameColumn);

    ColumnConfig emailAddress = new ColumnConfig();
    emailAddress.setId(BeanKeyValue.EMAIL.getValue());
    emailAddress.setHeader("Email");
    emailAddress.setWidth(120);
    configs.add(emailAddress);

    return new ColumnModel(configs);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:20,代码来源:SearchPagUserWidget.java

示例2: prepareColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
@Override
public ColumnModel prepareColumnModel() {
	List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

	ColumnConfig attributeStyleColumn = new ColumnConfig();
	attributeStyleColumn.setId(BeanKeyValue.STYLES_COMBO.getValue());
	attributeStyleColumn.setHeader("Name");
	attributeStyleColumn.setWidth(180);
	attributeStyleColumn.setRenderer(this.createStyleTextBox());
	attributeStyleColumn.setMenuDisabled(true);
	attributeStyleColumn.setSortable(false);

	configs.add(attributeStyleColumn);

	ColumnConfig attributeEnableColumn = new ColumnConfig();
	attributeEnableColumn.setId(BeanKeyValue.STYLE_ENABLED.getValue());
	attributeEnableColumn.setHeader("Enable");
	attributeEnableColumn.setWidth(180);
	attributeEnableColumn.setRenderer(this.createEnableCheckBox());
	attributeEnableColumn.setMenuDisabled(true);
	attributeEnableColumn.setSortable(false);
	configs.add(attributeEnableColumn);

	return new ColumnModel(configs);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:26,代码来源:RuleDetailsGridWidget.java

示例3: prepareColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
@Override
public ColumnModel prepareColumnModel()
{
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig attributeProfileColumn = new ColumnConfig();
    attributeProfileColumn.setId(BeanKeyValue.STYLES_COMBO.getValue());
    attributeProfileColumn.setHeader("Role");
    attributeProfileColumn.setWidth(180);
    attributeProfileColumn.setRenderer(this.createProfileTextBox());
    attributeProfileColumn.setMenuDisabled(true);
    attributeProfileColumn.setSortable(false);

    configs.add(attributeProfileColumn);

    ColumnConfig attributeEnableColumn = new ColumnConfig();
    attributeEnableColumn.setId(BeanKeyValue.STYLE_ENABLED.getValue());
    attributeEnableColumn.setHeader("Enable");
    attributeEnableColumn.setWidth(80);
    attributeEnableColumn.setRenderer(this.createEnableCheckBox());
    attributeEnableColumn.setMenuDisabled(true);
    attributeEnableColumn.setSortable(false);
    configs.add(attributeEnableColumn);

    return new ColumnModel(configs);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:27,代码来源:ProfilesGridWidget.java

示例4: buildColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
public void buildColumnModel() {
	if(!filterIncludesSingleDatabase()) {
       	columns.add(createDatabaseColumn());
       }
       
       columns.add(createMappedColumn());
       columns.add(createMainSiteColumn());
       
       if(filterIncludesSingleActivity()) {
       	addActivitySpecificColumns();
       	
       } else if(filterIncludesSingleDatabase()) {
           columns.add(createLocationColumn());
           columns.add(createLocation2Column());
           addIndicatorColumns(indicators);
       	addGeographicColumnsForDatabaseId(filteredDatabaseId());
       
       } else {
       	columns.add(createLocationColumn());
       	columns.add(createLocation2Column());
       	callback.onSuccess(new ColumnModel(columns));
       }
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:SiteColumnModelBuilder.java

示例5: load

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
/**
   * Loads the sites using the given filter, and including columns for the supplied indicators. This must be called by
   * the container.
   * 
   * @param filter
   * @param indicators
   *            a list of indicators to include as columns
   */
  private void load(Filter filter, Collection<IndicatorDTO> indicators) {
      this.filter = filter;
      this.siteIdToSelectOnNextLoad = 0;
      loader.setOffset(0);
      loader.load();

final SiteColumnModelBuilder siteColumnModelBuilder = new SiteColumnModelBuilder(schema, filter, this.mainSiteId, indicators, new AsyncCallback<ColumnModel>() {

	@Override
	public void onSuccess(ColumnModel result) {
		initGrid(result);
	}

	@Override
	public void onFailure(Throwable caught) {
		// TODO: Write a more specific error message.
		N10N.error(I18N.CONSTANTS.errorOnServer());
	}
});

siteColumnModelBuilder.buildColumnModel();
  }
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:31,代码来源:SiteGridPanel.java

示例6: buildGrid

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
public Grid<DiffEntry> buildGrid() {

		final ColumnModel columnModel = new ColumnModel(Arrays.asList(new ColumnConfig[] {
			new ColumnConfig(DiffEntry.FIELD_NAME, 200),
			new ColumnConfig(DiffEntry.DISPLAY_VALUE_1, 200),
			new ColumnConfig(DiffEntry.DISPLAY_VALUE_2, 200)
		}));

		final Grid<DiffEntry> grid = new Grid<DiffEntry>(new ListStore<DiffEntry>(), columnModel);
		grid.setHideHeaders(true);
		grid.setHeight(500);
		grid.setAutoWidth(true);
		grid.getView().setForceFit(true);
		
		return grid;

	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:18,代码来源:ProjectCoreDiffView.java

示例7: getColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected ColumnModel getColumnModel() {
	return new ProjectModelsColumnsProvider() {

		@Override
		GridEventHandler<ProjectModelDTO> getGridEventHandler() {
			return ProjectModelsAdminView.super.getGridEventHandler();
		}

		@Override
		ProjectTypeProvider getProjectTypeProvider() {
			return projectTypeProvider;
		}

	}.getColumnModel();
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:20,代码来源:ProjectModelsAdminView.java

示例8: initialize

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
public void initialize() {
	setTitle(I18N.CONSTANTS.importProjectOrgUnitsPanelHeader());
	
	// Building the grid.
	final CheckBoxSelectionModel<ImportDetails> selectionModel = new CheckBoxSelectionModel<ImportDetails>();
	final ColumnModel columnModel = createColumnModel(selectionModel);
	grid = createGrid(columnModel, selectionModel);
	
	grid.addPlugin(selectionModel);
	
	// Creating the import button.
	importButton = Forms.button(I18N.CONSTANTS.importItem());
	
	// Preparing the popup.
	setContent(grid);
	addButton(importButton);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:18,代码来源:ImportDetailsPopup.java

示例9: createColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
/**
 * Creates the column model.
 * 
 * @param selectionModel
 * @return 
 */
private ColumnModel createColumnModel() {
	
	// Project code column.
	final ColumnConfig projectCodeColumnConfig = new ColumnConfig(ProjectDTO.NAME, I18N.CONSTANTS.code(), 75);
	
	// Project title column.
	final ColumnConfig projectTitleColumnConfig = new ColumnConfig(ProjectDTO.FULL_NAME, I18N.CONSTANTS.title(), 325);
	
	// New value column.
	final ColumnConfig statusColumnConfig = new ColumnConfig("status", I18N.CONSTANTS.importHeadingStatus(), 300);
	
	// Creating the column model.
	return new ColumnModel(Arrays.asList(
			projectCodeColumnConfig,
			projectTitleColumnConfig,
			statusColumnConfig));
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:AutomatedImportResultPopup.java

示例10: createMonitoredPointsPanel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
/**
 * Creates the monitored points component.
 * 
 * @return The monitored points component widget.
 */
private Component createMonitoredPointsPanel() {

	monitoredPointsStore = new ListStore<MonitoredPointDTO>();
	final Grid<MonitoredPointDTO> monitoredPointsGrid = new Grid<MonitoredPointDTO>(monitoredPointsStore, new ColumnModel(createMonitoredPointsGridColumns()));
	monitoredPointsGrid.getView().setForceFit(true);
	monitoredPointsGrid.setAutoExpandColumn(MonitoredPointDTO.LABEL);

	final GridFilters filters = new GridFilters();
	filters.setLocal(true);
	filters.addFilter(new StringFilter(MonitoredPointDTO.LABEL));
	filters.addFilter(new DateFilter(MonitoredPointDTO.EXPECTED_DATE));
	monitoredPointsGrid.addPlugin(filters);

	monitoredPointsPanel = Panels.content(I18N.CONSTANTS.monitoredPoints());
	monitoredPointsPanel.add(monitoredPointsGrid);

	return monitoredPointsPanel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:DashboardView.java

示例11: generatePossibleDuplicatesGrid

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
private Grid<ContactDTO> generatePossibleDuplicatesGrid() {
  ColumnConfig nameColumn = new ColumnConfig(ContactDTO.FULLNAME, I18N.CONSTANTS.fullName(), 250);
  ColumnConfig emailColumn = new ColumnConfig(ContactDTO.EMAIL, I18N.CONSTANTS.email(), 250);
  ColumnConfig actionsColumn = new ColumnConfig();
  actionsColumn.setWidth(100);
  actionsColumn.setRenderer(new GridCellRenderer<ContactDTO>() {
    @Override
    public Object render(final ContactDTO contact, String property, ColumnData config, int rowIndex, int colIndex, ListStore store, Grid grid) {
      Button button = Forms.button(I18N.CONSTANTS.dedupeContactUpdateButton());
      button.addSelectionListener(new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
          cardLayout.setActiveItem(secondStepContainer);
          secondStepHandler.initialize(contact.getId(), duplicatedPropertiesGrid.getStore());
          selectedContact = contact;
        }
      });

      return button;
    }
  });

  ColumnModel columnModel = new ColumnModel(Arrays.asList(nameColumn, emailColumn, actionsColumn));
  return new Grid<ContactDTO>(new ListStore<ContactDTO>(), columnModel);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:DedupeContactDialog.java

示例12: createColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
private ColumnModel createColumnModel(CheckBoxSelectionModel<TreeGridFileModel> selectionModel) {
	
	// Project / org unit / file name column.
	final ColumnConfig nameColumnConfig = new ColumnConfig(TreeGridFileModel.NAME, I18N.CONSTANTS.sigmahOfflinePrepareOfflineFileTransferColumnName(), 200);
	nameColumnConfig.setRenderer(new TreeGridCellRenderer());
	
	// Last modification date column.
	final ColumnConfig lastModificationColumnConfig = new ColumnConfig(TreeGridFileModel.LAST_MODIFICATION, I18N.CONSTANTS.sigmahOfflinePrepareOfflineFileTransferColumnLastModification(), 85);
	
	// Author full name column.
	final ColumnConfig authorColumnConfig = new ColumnConfig(TreeGridFileModel.AUTHOR, I18N.CONSTANTS.flexibleElementFilesListAuthor(), 100);
	
	// Size column.
	final ColumnConfig sizeColumnConfig = new ColumnConfig(TreeGridFileModel.SIZE, I18N.CONSTANTS.flexibleElementFilesListSize(), 85);
	
	return new ColumnModel(Arrays.asList(
		selectionModel.getColumn(),
		nameColumnConfig,
		lastModificationColumnConfig,
		authorColumnConfig,
		sizeColumnConfig
	));
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:FileSelectionView.java

示例13: PasswordAccessAuditDialog

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
public PasswordAccessAuditDialog(Password password)
{
    this.setSize("350", "460");
    this.setHeading(textMessages.passwordAccessAuditLog());
    VBoxLayout boxLayout = new VBoxLayout();
    boxLayout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
    this.setLayout(boxLayout);
    this.setModal(true);
    this.setResizable(false);
    
    gridStore = new ListStore<PasswordAccessAuditData>();
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
    ColumnConfig columnConfigDate = new ColumnConfig(Constants.DATE, textMessages.dateAccessed(), 130);
    columnConfigDate.setDateTimeFormat(DateTimeFormat.getFormat(textMessages.displayDateFormat()));
    configs.add(columnConfigDate);
    ColumnConfig columnConfigUser = new ColumnConfig(Constants.USER, textMessages.userAccessed(), 160);
    configs.add(columnConfigUser);
    
    Grid<PasswordAccessAuditData> grid = new Grid<PasswordAccessAuditData>(gridStore, new ColumnModel(configs));
    grid.setStripeRows(true);
    add(grid);
    grid.setSize("320px", "390px");
    grid.setBorders(true);
    
    Button closeButton = new Button(textMessages.close(), new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
            doClose();
        }
    });
    
    setButtonAlign(HorizontalAlignment.CENTER);
    addButton(closeButton);
    
    loadAccessAuditData(password.getId());
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:37,代码来源:PasswordAccessAuditDialog.java

示例14: getTableColumnModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
public ColumnModel getTableColumnModel(String name, String id, CMDBPermissions perm) {
	List<ColumnConfig> cols = getColumnConfigs(name, id, perm);
	ColumnModel m = new ColumnModel(cols);
	return(m);
	/*
	AttributeColumnConfig config = new AttributeColumnConfig();
	config.setId("platform.value_name");
	config.setType("xs:string");
	config.setMaxOccurs(1);
	config.setName("Platform name");
	List<ColumnConfig> cols = new ArrayList<ColumnConfig>();
	ColumnConfig c1 = EditorFactory.getColumnConfig(config , false, perm);
	cols.add(c1);
	
	config = new AttributeColumnConfig();
	config.setId("cpu");
	config.setType("CPU(s)");
	config.setReference(true);
	config.setName("CPU");
	c1 = EditorFactory.getColumnConfig(config , false, perm);
	cols.add(c1);
	
	config = new AttributeColumnConfig();
	config.setId("os.value_name");
	config.setType("xs:string");
	config.setComplex(false);
	config.setMaxOccurs(1);
	config.setName("OS Name");
	c1 = EditorFactory.getColumnConfig(config , false, perm);
	cols.add(c1);
	
	ColumnModel m = new ColumnModel(cols);
	return(m);

	*/
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:37,代码来源:GroupDescription.java

示例15: getGridModel

import com.extjs.gxt.ui.client.widget.grid.ColumnModel; //导入依赖的package包/类
private EditorGrid<SaveItem> getGridModel(ContentData mdr, ListStore<SaveItem> store, boolean saveInstances) {
	List<ColumnConfig> config = new ArrayList<ColumnConfig>();  

	config.add(EditorFactory.getColumn(mdr, "ci", "Template", 100, false, "xs:string", 1, false, false));
	if (saveInstances) {
		config.add(EditorFactory.getColumn(mdr, "saveInstances", "Instances", 60, true, "xs:boolean", 1, false, false));
	}
	config.add(EditorFactory.getColumn(mdr, "saveTemplates", "Templates", 60, true, "xs:boolean", 1, false, false));
	config.add(EditorFactory.getColumn(mdr, "allChildren", "All Children", 60, true, "xs:boolean", 1, false, false));


	final ColumnModel cm = new ColumnModel(config);  

	GroupingView view = new GroupingView();  
	view.setForceFit(true);  

	view.setGroupRenderer(new GridGroupRenderer() {  
		public String render(GroupColumnData data) {  
			String f = cm.getColumnById(data.field).getHeader();  
			String l = data.models.size() == 1 ? "Item" : "Items";  
			return f + ": " + data.group + " (" + data.models.size() + " " + l + ")";  
		}  
	});  

	EditorGrid<SaveItem> grid = new EditorGrid<SaveItem>(store, cm);  
	grid.setView(view);  
	grid.setBorders(true);
	for (ColumnConfig cfg : config) {
		if (cfg instanceof CheckColumnConfig) {
			grid.addPlugin((ComponentPlugin)cfg);
		}
	}
	store.setStoreSorter(null);
	return(grid);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:36,代码来源:CMDBModelSaveWindow.java


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