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

x33g5p2x  于2022-02-01 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(284)

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

Table.isColumnCollapsed介绍

暂无

代码示例

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

  1. /**
  2. * Returns if the column with the given property id is visible and not collapsed.<p>
  3. *
  4. * @param propertyId the property id
  5. *
  6. * @return <code>true</code> if the column is visible
  7. */
  8. public boolean isColumnVisible(CmsResourceTableProperty propertyId) {
  9. return Arrays.asList(m_fileTable.getVisibleColumns()).contains(propertyId)
  10. && !m_fileTable.isColumnCollapsed(propertyId);
  11. }

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

  1. /**
  2. * Returns the current table state.<p>
  3. *
  4. * @return the table state
  5. */
  6. public CmsFileExplorerSettings getTableSettings() {
  7. CmsFileExplorerSettings fileTableState = new CmsFileExplorerSettings();
  8. fileTableState.setSortAscending(m_fileTable.isSortAscending());
  9. fileTableState.setSortColumnId((CmsResourceTableProperty)m_fileTable.getSortContainerPropertyId());
  10. List<CmsResourceTableProperty> collapsedCollumns = new ArrayList<CmsResourceTableProperty>();
  11. Object[] visibleCols = m_fileTable.getVisibleColumns();
  12. for (int i = 0; i < visibleCols.length; i++) {
  13. if (m_fileTable.isColumnCollapsed(visibleCols[i])) {
  14. collapsedCollumns.add((CmsResourceTableProperty)visibleCols[i]);
  15. }
  16. }
  17. fileTableState.setCollapsedColumns(collapsedCollumns);
  18. return fileTableState;
  19. }

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

  1. int totalExpandMinWidth = 0;
  2. for (Object colObj : cols) {
  3. if (m_fileTable.isColumnCollapsed(colObj)) {
  4. continue;

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

  1. /**
  2. * Adds a {@link PropertyVisibilityListener} that gets notified when a property column is hidden or shown.
  3. * @param listener Listener to add (not null)
  4. */
  5. @SuppressWarnings("unchecked")
  6. public void addPropertyVisibilityListener(final PropertyVisibilityListener<P> listener) {
  7. ObjectUtils.argumentNotNull(listener, "Listener must be not null");
  8. switch (getRenderingMode()) {
  9. case GRID:
  10. getGrid().addColumnVisibilityChangeListener(e -> listener.onPropertyVisibilityChanged(
  11. (P) e.getColumn().getPropertyId(), e.isHidden(), e.isUserOriginated()));
  12. break;
  13. case TABLE:
  14. getTable().addColumnCollapseListener(e -> listener.onPropertyVisibilityChanged((P) e.getPropertyId(),
  15. getTable().isColumnCollapsed(e.getPropertyId()), true));
  16. break;
  17. default:
  18. break;
  19. }
  20. }

相关文章