Module is.codion.swing.common.ui
Interface FilterTableColumnModel<C>
- Type Parameters:
C- the type of column identifier
- All Superinterfaces:
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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA column selection modelstatic interfaceObserves the hidden columnsstatic interfaceControls the visible columns -
Method Summary
Modifier and TypeMethodDescriptionReturns the TableColumn with the given identifiercolumns()booleangetColumn(int columnIndex) hidden()identifier(int modelColumnIndex) locked()Returns aStateinstance controlling whether this model is locked or not.voidreset()Resets the columns to their original location and visibilityvisible()Returns theStatefor controlling the column visibilityMethods inherited from interface javax.swing.table.TableColumnModel
addColumn, addColumnModelListener, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumns, getColumnSelectionAllowed, getSelectedColumnCount, getSelectedColumns, getTotalColumnWidth, moveColumn, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel
-
Method Details
-
columns
Collection<FilterTableColumn<C>> columns()- 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
FilterTableColumnModel.VisibleColumns<C> visible()- Returns:
- the visible columns
-
selection
FilterTableColumnModel.ColumnSelection<C> selection()- Returns:
- the
FilterTableColumnModel.ColumnSelection - See Also:
-
getSelectionModel
FilterTableColumnModel.ColumnSelection<C> getSelectionModel()- Specified by:
getSelectionModelin interfaceTableColumnModel
-
locked
State locked()Returns aStateinstance 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
Statecontrolling whether this model is locked or not
-
column
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
-
getColumn
- Specified by:
getColumnin interfaceTableColumnModel
-
visible
Returns theStatefor controlling the column visibility- Parameters:
identifier- the column identifier- Returns:
- a
Statefor controlling the column visibility - Throws:
IllegalArgumentException- in case the column is not found
-
contains
- Parameters:
identifier- the column identifier- Returns:
- true if this column model contains a column with the given identifier
-
identifier
- Parameters:
modelColumnIndex- the column model index- Returns:
- the column identifier
-
reset
void reset()Resets the columns to their original location and visibility -
columnHidden
- Returns:
- an observer notified each time a column is hidden
-
columnShown
- Returns:
- an observer notified each time a column is shown
-