Interface FilteredTableColumnModel<C>

Type Parameters:
C - the type of column identifier
All Superinterfaces:
TableColumnModel

public interface FilteredTableColumnModel<C> extends TableColumnModel
A TableColumnModel handling hidden columns. Note that this column model does not support dynamically adding or removing columns, TableColumnModel.addColumn(TableColumn) and TableColumnModel.removeColumn(TableColumn) both throw UnsupportedOperationException.
  • Method Details

    • columns

      Returns:
      an unmodifiable view of all columns in this model, both hidden and visible, in no particular order
    • visible

      Returns:
      an unmodifiable view of the currently visible columns
    • hidden

      Returns:
      an unmodifiable view of currently hidden columns, in no particular order
    • locked

      State locked()
      Returns a State instance controlling whether this model is locked or not. A locked column model does not allow adding or removing of columns, but columns can be reordered.
      Returns:
      a State controlling whether this model is locked or not
    • setVisibleColumns

      void setVisibleColumns(C... columnIdentifiers)
      Arranges the columns so that only the given columns are visible and in the given order
      Parameters:
      columnIdentifiers - the column identifiers
      Throws:
      IllegalArgumentException - in case a column is not found
    • setVisibleColumns

      void setVisibleColumns(List<C> columnIdentifiers)
      Arranges the columns so that only the given columns are visible and in the given order
      Parameters:
      columnIdentifiers - the column identifiers
      Throws:
      IllegalArgumentException - in case a column is not found
    • column

      FilteredTableColumn<C> column(C columnIdentifier)
      Returns the TableColumn with the given identifier
      Parameters:
      columnIdentifier - the column identifier
      Returns:
      the TableColumn with the given identifier
      Throws:
      IllegalArgumentException - in case this table model does not contain a column with the given identifier
    • getColumn

      FilteredTableColumn<C> getColumn(int columnIndex)
      Specified by:
      getColumn in interface TableColumnModel
    • visible

      State visible(C columnIdentifier)
      Returns the State for controlling the column visibility
      Parameters:
      columnIdentifier - the column identifier
      Returns:
      a State for controlling the column visibility
      Throws:
      IllegalArgumentException - in case the column is not found
    • containsColumn

      boolean containsColumn(C columnIdentifier)
      Parameters:
      columnIdentifier - the column identifier
      Returns:
      true if this column model contains a column with the given identifier
    • columnIdentifier

      C columnIdentifier(int modelColumnIndex)
      Parameters:
      modelColumnIndex - the column model index
      Returns:
      the column identifier
    • resetColumns

      void resetColumns()
      Resets the columns to their original location and visibility
    • columnHiddenEvent

      EventObserver<C> columnHiddenEvent()
      Returns:
      an observer notified each time a column is hidden
    • columnShownEvent

      EventObserver<C> columnShownEvent()
      Returns:
      an observer notified each time a column is shown