com.vaadin.ui.Grid.setFrozenColumnCount()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中com.vaadin.ui.Grid.setFrozenColumnCount()方法的一些代码示例,展示了Grid.setFrozenColumnCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.setFrozenColumnCount()方法的具体详情如下:
包路径:com.vaadin.ui.Grid
类名称:Grid
方法名:setFrozenColumnCount

Grid.setFrozenColumnCount介绍

[英]Sets the number of frozen columns in this grid. Setting the count to 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. Setting the count to -1 will also disable the selection column.

NOTE: this count includes Column#isHidden() in the count.

The default value is 0.
[中]设置此网格中冻结的列数。将计数设置为0意味着不会冻结任何数据列,但内置的选择复选框列在使用时仍将冻结。将计数设置为-1也将禁用选择列。
*注:*此计数包括计数中的列#ishiden()。
默认值为0。

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

setFrozenColumnCount(getFrozenColumnCount() - 1);

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setFrozenColumnCount(int numberOfColumns) {
  component.setFrozenColumnCount(numberOfColumns);
}

代码示例来源:origin: com.vaadin/vaadin-server

@Override
protected void doReadDesign(Element design, DesignContext context) {
  Attributes attrs = design.attributes();
  if (design.hasAttr(DECLARATIVE_DATA_ITEM_TYPE)) {
    String itemType = design.attr(DECLARATIVE_DATA_ITEM_TYPE);
    setBeanType(itemType);
  }
  if (attrs.hasKey("selection-mode")) {
    setSelectionMode(DesignAttributeHandler.readAttribute(
        "selection-mode", attrs, SelectionMode.class));
  }
  Attributes attr = design.attributes();
  if (attr.hasKey("selection-allowed")) {
    setReadOnly(DesignAttributeHandler
        .readAttribute("selection-allowed", attr, Boolean.class));
  }
  if (attrs.hasKey("rows")) {
    setHeightByRows(DesignAttributeHandler.readAttribute("rows", attrs,
        double.class));
  }
  readStructure(design, context);
  // Read frozen columns after columns are read.
  if (attrs.hasKey("frozen-columns")) {
    setFrozenColumnCount(DesignAttributeHandler
        .readAttribute("frozen-columns", attrs, int.class));
  }
}

代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin

/**
 * Set the <em>frozen</em> columns count.
 * @param numberOfColumns the number of columns that should be frozen
 */
public void setFrozenColumnCount(int numberOfColumns) {
  getGrid().setFrozenColumnCount(numberOfColumns);
}

代码示例来源:origin: eclipse/hawkbit

private void setGridColumnProperties() {
  grid.getColumn(COLUMN_STATUS).setRenderer(new StatusRenderer());
  grid.getColumn(COLUMN_PROGRESS).setRenderer(new ProgressBarRenderer());
  grid.setColumnOrder(COLUMN_STATUS, COLUMN_PROGRESS, COLUMN_FILE_NAME, SPUILabelDefinitions.NAME_VERSION,
      COLUMN_REASON);
  setColumnWidth();
  grid.getColumn(SPUILabelDefinitions.NAME_VERSION)
      .setHeaderCaption(i18n.getMessage("upload.swModuleTable.header"));
  grid.setFrozenColumnCount(5);
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private void setGridColumnProperties() {
  grid.getColumn(COLUMN_STATUS).setRenderer(new StatusRenderer());
  grid.getColumn(COLUMN_PROGRESS).setRenderer(new ProgressBarRenderer());
  grid.setColumnOrder(COLUMN_STATUS, COLUMN_PROGRESS, COLUMN_FILE_NAME, SPUILabelDefinitions.NAME_VERSION,
      COLUMN_REASON);
  setColumnWidth();
  grid.getColumn(SPUILabelDefinitions.NAME_VERSION)
      .setHeaderCaption(i18n.getMessage("upload.swModuleTable.header"));
  grid.setFrozenColumnCount(5);
}

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin

@Override
protected void configure(I instance) {
  // frozen columns
  if (frozenColumns != 0) {
    instance.getGrid().setFrozenColumnCount(frozenColumns);
  }
  // header and footer
  if (headerBuilder != null) {
    headerBuilder.buildHeader(new GridHeaderSection(instance.getGrid()));
  }
  if (footerBuilder != null) {
    footerBuilder.buildFooter(new GridFooterSection(instance.getGrid()));
  }
  if (footerGenerator != null) {
    instance.addItemSetChangeListener(e -> {
      if (instance.isFooterVisible()) {
        footerGenerator.updateFooter(instance, new GridFooterSection(instance.getGrid()));
      }
    });
  }
}

相关文章

Grid类方法