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

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

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

Grid.removeColumn介绍

[英]Removes the given column from this Grid.
[中]从此网格中删除给定列。

代码示例

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

/**
 * Removes the column with the given column id.
 *
 * @see #removeColumn(Column)
 * @see Column#setId(String)
 *
 * @param columnId
 *            the id of the column to remove, not <code>null</code>
 */
public void removeColumn(String columnId) {
  removeColumn(getColumnOrThrow(columnId));
}

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

/**
 * Removes all columns from this Grid.
 *
 * @since 8.0.2
 */
public void removeAllColumns() {
  for (Column<T, ?> column : getColumns()) {
    removeColumn(column);
  }
}

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

@Override
public void removeColumn(Column<E> column) {
  if (column == null) {
    return;
  }
  component.removeColumn(column.getId());
  columns.remove(column.getId());
  columnsOrder.remove(column);
  columnGenerators.remove(column.getId());
  ((ColumnImpl<E>) column).setGridColumn(null);
  column.setOwner(null);
}

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

@Override
public void setVisible(boolean visible) {
  if (this.visible != visible) {
    this.visible = visible;
    Grid<E> grid = owner.getComponent();
    if (visible) {
      Grid.Column<E, ?> gridColumn =
          grid.addColumn(new EntityValueProvider<>(getPropertyPath()));
      owner.setupGridColumnProperties(gridColumn, this);
      grid.setColumnOrder(owner.getColumnOrder());
    } else {
      grid.removeColumn(getId());
      setGridColumn(null);
    }
  }
}

相关文章

Grid类方法