C
- the type of column identifierpublic interface FilteredTableColumnModel<C> extends TableColumnModel
TableColumnModel.addColumn(TableColumn)
and TableColumnModel.removeColumn(TableColumn)
both throw UnsupportedOperationException
.Modifier and Type | Method and Description |
---|---|
void |
addColumnHiddenListener(EventDataListener<C> listener) |
void |
addColumnShownListener(EventDataListener<C> listener) |
C |
columnIdentifier(int modelColumnIndex) |
Collection<FilteredTableColumn<C>> |
columns() |
boolean |
containsColumn(C identifier) |
FilteredTableColumn<C> |
getColumn(int columnIndex) |
Collection<FilteredTableColumn<C>> |
hiddenColumns() |
boolean |
isColumnVisible(C columnIdentifier) |
State |
lockedState()
Returns a
State instance controlling whether this model is locked or not. |
void |
removeColumnHiddenListener(EventDataListener<C> listener) |
void |
removeColumnShownListener(EventDataListener<C> listener) |
void |
resetColumns()
Resets the columns to their original location and visibility
|
boolean |
setColumnVisible(C columnIdentifier,
boolean visible) |
void |
setVisibleColumns(C... columnIdentifiers)
Arranges the columns so that only the given columns are visible and in the given order
|
void |
setVisibleColumns(List<C> columnIdentifiers)
Arranges the columns so that only the given columns are visible and in the given order
|
FilteredTableColumn<C> |
tableColumn(C identifier)
Returns the TableColumn with the given identifier
|
List<FilteredTableColumn<C>> |
visibleColumns() |
addColumn, addColumnModelListener, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumns, getColumnSelectionAllowed, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, moveColumn, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel
Collection<FilteredTableColumn<C>> columns()
List<FilteredTableColumn<C>> visibleColumns()
Collection<FilteredTableColumn<C>> hiddenColumns()
State lockedState()
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.State
controlling whether this model is locked or notboolean setColumnVisible(C columnIdentifier, boolean visible)
columnIdentifier
- the columnd identifiervisible
- true if the column should be visible, false if it should be hiddenIllegalStateException
- in case this model is lockedlockedState()
boolean isColumnVisible(C columnIdentifier)
columnIdentifier
- the key for which to query if its column is visiblevoid setVisibleColumns(C... columnIdentifiers)
columnIdentifiers
- the column identifiersvoid setVisibleColumns(List<C> columnIdentifiers)
columnIdentifiers
- the column identifiersFilteredTableColumn<C> tableColumn(C identifier)
identifier
- the column identifierIllegalArgumentException
- in case this table model does not contain a column with the given identifierFilteredTableColumn<C> getColumn(int columnIndex)
getColumn
in interface TableColumnModel
boolean containsColumn(C identifier)
identifier
- the column identifierC columnIdentifier(int modelColumnIndex)
modelColumnIndex
- the column model indexvoid resetColumns()
void addColumnHiddenListener(EventDataListener<C> listener)
listener
- a listener to be notified each time a column is hiddenvoid removeColumnHiddenListener(EventDataListener<C> listener)
listener
- the listener to removevoid addColumnShownListener(EventDataListener<C> listener)
listener
- a listener to be notified each time a column is shownvoid removeColumnShownListener(EventDataListener<C> listener)
listener
- the listener to remove