Interface FilterTableColumnModel<C>

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

public interface FilterTableColumnModel<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

    • all

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

      Collection<C> identifiers()
      Returns:
      an unmodifiable view of all column identifiers in this model, both hidden and visible, in no particular order
    • visible

      Returns:
      the visible columns
    • hidden

      Returns:
      the hidden columns
    • selection

      Returns:
      the FilterTableColumnModel.ColumnSelection
      See Also:
    • getSelectionModel

      Specified by:
      getSelectionModel in interface TableColumnModel
    • 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. The visible state of a column rejects a change with an IllegalArgumentException while locked.
      Returns:
      a State controlling whether this model is locked or not
    • get

      FilterTableColumn<C> get(C identifier)
      Returns the TableColumn with the given identifier
      Parameters:
      identifier - 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
    • columnAt

      FilterTableColumn<C> columnAt(int columnIndex)
      Returns the visible column at the given index, the index being the column's position among the visible columns, as indexOf(Object) returns and TableColumnModel.moveColumn(int, int) takes - not its model index.
      Parameters:
      columnIndex - the column index
      Returns:
      the column at the given index
      Throws:
      ArrayIndexOutOfBoundsException - in case no visible column occupies the given index
    • getColumn

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

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

      int indexOf(C identifier)
      Returns the column's position among the visible columns, which changes as columns are moved, hidden and shown - not its model index. The inverse of columnAt(int).
      Parameters:
      identifier - the column identifier
      Returns:
      the column index
      Throws:
      IllegalArgumentException - in case no visible column has the given identifier
    • contains

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

      void reset()
      Resets the columns to their original location and visibility
    • columnHidden

      Observer<C> columnHidden()
      Returns:
      an observer notified each time a column is hidden
    • columnShown

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