Class TableColumnDescriptor<ROW_TYPE>

java.lang.Object
docking.widgets.table.TableColumnDescriptor<ROW_TYPE>

public class TableColumnDescriptor<ROW_TYPE> extends Object
  • Constructor Details

    • TableColumnDescriptor

      public TableColumnDescriptor()
  • Method Details

    • getAllColumns

      public List<DynamicTableColumn<ROW_TYPE,?,?>> getAllColumns()
    • getDefaultVisibleColumns

      public List<DynamicTableColumn<ROW_TYPE,?,?>> getDefaultVisibleColumns()
    • getDefaultTableSortState

      public TableSortState getDefaultTableSortState(DynamicColumnTableModel<ROW_TYPE> model)
    • setVisible

      public void setVisible(String columnName, boolean visible)
    • addHiddenColumn

      public void addHiddenColumn(DynamicTableColumn<ROW_TYPE,?,?> column)
    • addVisibleColumn

      public void addVisibleColumn(DynamicTableColumn<ROW_TYPE,?,?> column)
    • addVisibleColumn

      public void addVisibleColumn(DynamicTableColumn<ROW_TYPE,?,?> column, int sortOrdinal, boolean ascending)
      Parameters:
      column - the column to add
      sortOrdinal - the ordinal (i.e., 1, 2, 3...n), not the index (i.e, 0, 1, 2...n).
      ascending - true to sort ascending
    • addVisibleColumn

      public <COLUMN_TYPE> void addVisibleColumn(String name, Class<COLUMN_TYPE> columnTypeClass, Function<ROW_TYPE,COLUMN_TYPE> rowToColumnFunction)
      Adds a column to the descriptor via an anonymous accessor function instead.

      If you would like to control the sorting behavior of your column, then use addVisibleColumn(String, Class, Function, int, boolean).

      Note: any columns created via this method will not be discoverable by other tables. To use that feature, you must create a separate column class that extends DynamicTableColumnExtensionPoint.

      Type Parameters:
      COLUMN_TYPE - the column type
      Parameters:
      name - the column name, visible in the UI
      columnTypeClass - the column class type
      rowToColumnFunction - a function to convert a row object to the column object
    • addVisibleColumn

      public <COLUMN_TYPE> void addVisibleColumn(String name, Class<COLUMN_TYPE> columnTypeClass, Function<ROW_TYPE,COLUMN_TYPE> rowToColumnFunction, int sortOrdinal, boolean ascending)
      Adds a column to the descriptor via an anonymous accessor function instead.

      Note: any columns created via this method will not be discoverable by other tables. To use that feature, you must create a separate column class that extends DynamicTableColumnExtensionPoint.

      Type Parameters:
      COLUMN_TYPE - the column type
      Parameters:
      name - the column name, visible in the UI
      columnTypeClass - the column class type
      rowToColumnFunction - a function to convert a row object to the column object
      sortOrdinal - the ordinal (i.e., 1, 2, 3...n), not the index (i.e, 0, 1, 2...n)
      ascending - true for sort ascending; false for descending
    • addHiddenColumn

      public <COLUMN_TYPE> void addHiddenColumn(String name, Class<COLUMN_TYPE> columnTypeClass, Function<ROW_TYPE,COLUMN_TYPE> rowToColumnFunction)
      Adds a column to the descriptor via an anonymous accessor function instead. The column added will not be displayed until enabled by the user.

      Note: any columns created via this method will not be discoverable by other tables. To use that feature, you must create a separate column class that extends DynamicTableColumnExtensionPoint.

      Type Parameters:
      COLUMN_TYPE - the column type
      Parameters:
      name - the column name, visible in the UI
      columnTypeClass - the column class type
      rowToColumnFunction - a function to convert a row object to the column object