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

x33g5p2x  于2022-01-30 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(314)

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

Table.setColumnCollapsed介绍

暂无

代码示例

代码示例来源:origin: org.opencms/opencms-core

  1. /**
  2. * Sets the list of collapsed columns.<p>
  3. *
  4. * @param collapsedColumns the list of collapsed columns
  5. */
  6. public void setCollapsedColumns(Object... collapsedColumns) {
  7. Set<Object> collapsedSet = Sets.newHashSet();
  8. for (Object collapsed : collapsedColumns) {
  9. collapsedSet.add(collapsed);
  10. }
  11. for (Object key : m_fileTable.getVisibleColumns()) {
  12. m_fileTable.setColumnCollapsed(key, collapsedSet.contains(key));
  13. }
  14. }

代码示例来源:origin: org.opencms/opencms-core

  1. /**
  2. * Sets the table state.<p>
  3. *
  4. * @param state the table state
  5. */
  6. public void setTableState(CmsFileExplorerSettings state) {
  7. if (state != null) {
  8. m_fileTable.setSortContainerPropertyId(state.getSortColumnId());
  9. m_fileTable.setSortAscending(state.isSortAscending());
  10. Object[] visibleCols = m_fileTable.getVisibleColumns();
  11. for (int i = 0; i < visibleCols.length; i++) {
  12. m_fileTable.setColumnCollapsed(visibleCols[i], state.getCollapsedColumns().contains(visibleCols[i]));
  13. }
  14. }
  15. }

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

  1. @Override
  2. public void setPropertyColumnVisible(P property, boolean visible) {
  3. ObjectUtils.argumentNotNull(property, "Property must be not null");
  4. if (!hasPropertyColumn(property)) {
  5. throw new IllegalArgumentException("Property " + property + " is not a column of the listing");
  6. }
  7. switch (getRenderingMode()) {
  8. case GRID:
  9. getGrid().getColumn(property).setHidden(!visible);
  10. break;
  11. case TABLE:
  12. getTable().setColumnCollapsed(property, !visible);
  13. break;
  14. default:
  15. break;
  16. }
  17. }

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

  1. table.setColumnCollapsible(property, true);
  2. if (propertyColumn.isHidden()) {
  3. table.setColumnCollapsed(property, true);

相关文章