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

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

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

Table.getVisibleColumns介绍

暂无

代码示例

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

/**
 * Returns if the column with the given property id is visible and not collapsed.<p>
 *
 * @param propertyId the property id
 *
 * @return <code>true</code> if the column is visible
 */
public boolean isColumnVisible(CmsResourceTableProperty propertyId) {
  return Arrays.asList(m_fileTable.getVisibleColumns()).contains(propertyId)
    && !m_fileTable.isColumnCollapsed(propertyId);
}

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

/**
 * Sets the list of collapsed columns.<p>
 *
 * @param collapsedColumns the list of collapsed columns
 */
public void setCollapsedColumns(Object... collapsedColumns) {
  Set<Object> collapsedSet = Sets.newHashSet();
  for (Object collapsed : collapsedColumns) {
    collapsedSet.add(collapsed);
  }
  for (Object key : m_fileTable.getVisibleColumns()) {
    m_fileTable.setColumnCollapsed(key, collapsedSet.contains(key));
  }
}

代码示例来源:origin: uk.q3c.krail/krail

/**
 * Sets the I18N values for the Table itself, and also iterates the visible columns for column ids which are I18NKeys, and translates those as well
 *
 * @param table
 *         the table to process
 * @param annotationValues
 *         the values to apply
 * @param annotationInfo
 *         used primarily for the Field name
 */
protected void processTable(Table table, AnnotationValues annotationValues, AnnotationInfo annotationInfo) {
  // Table columns need special treatment
  applyAnnotationValues(table, annotationValues, annotationInfo);
  // do the column headers
  Object[] columns = table.getVisibleColumns();
  Locale locale = annotationValues.locale.isPresent() ? annotationValues.locale.get() : currentLocale.getLocale();
  List<String> headers = new ArrayList<>();
  for (Object column : columns) {
    if (column instanceof I18NKey) {
      I18NKey columnKey = (I18NKey) column;
      String header = translate.from(columnKey, locale);
      headers.add(header);
    } else {
      headers.add(column.toString());
    }
  }
  String headerArray[] = headers.toArray(new String[headers.size()]);
  table.setColumnHeaders(headerArray);
}

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

Object[] visibleColumns = getTable().getVisibleColumns();
if (visibleColumns != null && visibleColumns.length > 0) {
  List<P> properties = new ArrayList<>(visibleColumns.length);

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

/**
 * Sets the table state.<p>
 *
 * @param state the table state
 */
public void setTableState(CmsFileExplorerSettings state) {
  if (state != null) {
    m_fileTable.setSortContainerPropertyId(state.getSortColumnId());
    m_fileTable.setSortAscending(state.isSortAscending());
    Object[] visibleCols = m_fileTable.getVisibleColumns();
    for (int i = 0; i < visibleCols.length; i++) {
      m_fileTable.setColumnCollapsed(visibleCols[i], state.getCollapsedColumns().contains(visibleCols[i]));
    }
  }
}

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

/**
 * Returns the current table state.<p>
 *
 * @return the table state
 */
public CmsFileExplorerSettings getTableSettings() {
  CmsFileExplorerSettings fileTableState = new CmsFileExplorerSettings();
  fileTableState.setSortAscending(m_fileTable.isSortAscending());
  fileTableState.setSortColumnId((CmsResourceTableProperty)m_fileTable.getSortContainerPropertyId());
  List<CmsResourceTableProperty> collapsedCollumns = new ArrayList<CmsResourceTableProperty>();
  Object[] visibleCols = m_fileTable.getVisibleColumns();
  for (int i = 0; i < visibleCols.length; i++) {
    if (m_fileTable.isColumnCollapsed(visibleCols[i])) {
      collapsedCollumns.add((CmsResourceTableProperty)visibleCols[i]);
    }
  }
  fileTableState.setCollapsedColumns(collapsedCollumns);
  return fileTableState;
}

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

Object[] cols = m_fileTable.getVisibleColumns();
List<CmsResourceTableProperty> expandCols = Lists.newArrayList();
int nonExpandWidth = 0;

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

Object[] visibleCols = m_fileTable.getVisibleColumns();
for (int i = 0; i < visibleCols.length; i++) {
  if (CmsResourceTableProperty.PROPERTY_RESOURCE_NAME.equals(visibleCols[i])) {

代码示例来源:origin: org.aperteworkflow/base-widgets

table.setSelectable(true);
for (Object o : table.getVisibleColumns()) {
  table.setColumnHeader(o, getMessage("processdata.comments.comment.table." + o));

代码示例来源:origin: org.aperteworkflow/base-widgets

for (Object o : table.getVisibleColumns()) {
  table.setColumnHeader(o, getMessage("awf.basewidgets.process-history." + o));

相关文章

微信公众号

最新文章

更多