Module is.codion.swing.common.model
Class FilteredTableColumn<C>
java.lang.Object
javax.swing.table.TableColumn
is.codion.swing.common.model.component.table.FilteredTableColumn<C>
- Type Parameters:
C
- the column identifier type
- All Implemented Interfaces:
Serializable
A
TableColumn
with a typed identifier.
For instances use factory method filteredTableColumn(int)
or filteredTableColumn(Object, int)
or builder methods builder(int)
or builder(Object, int)
.
Note that the identifier is used as a default header value.-
Nested Class Summary
-
Field Summary
Fields inherited from class javax.swing.table.TableColumn
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilteredTableColumn.Builder<Integer>
builder
(int modelIndex) Instantiates a new index basedFilteredTableColumn.Builder
.static <C> FilteredTableColumn.Builder<C>
builder
(C identifier, int modelIndex) Instantiates a newFilteredTableColumn.Builder
.Class<?>
Comparator<?>
static FilteredTableColumn<Integer>
filteredTableColumn
(int modelIndex) Instantiates a new index basedFilteredTableColumn
.static <C> FilteredTableColumn<C>
filteredTableColumn
(C identifier, int modelIndex) Instantiates a newFilteredTableColumn
.void
setIdentifier
(Object identifier) Methods inherited from class javax.swing.table.TableColumn
addPropertyChangeListener, createDefaultHeaderRenderer, disableResizedPosting, enableResizedPosting, getCellEditor, getCellRenderer, getHeaderRenderer, getHeaderValue, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setHeaderValue, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit
-
Method Details
-
getIdentifier
- Overrides:
getIdentifier
in classTableColumn
-
setIdentifier
- Overrides:
setIdentifier
in classTableColumn
- Parameters:
identifier
- an identifier for this column- Throws:
IllegalStateException
- always, changing the identifier is not supported
-
columnClass
- Returns:
- the column class
-
comparator
- Returns:
- the column comparator
-
toolTipText
- Returns:
- the tool tip text to display for this column, null in case of no tool tip
-
filteredTableColumn
Instantiates a new index basedFilteredTableColumn
.- Parameters:
modelIndex
- the column model index, also used as identifier- Returns:
- a new
FilteredTableColumn
instance
-
filteredTableColumn
Instantiates a newFilteredTableColumn
.- Type Parameters:
C
- the column identifier type- Parameters:
identifier
- the column identifiermodelIndex
- the column model index- Returns:
- a new
FilteredTableColumn
instance - Throws:
NullPointerException
- in caseidentifier
is null
-
builder
Instantiates a new index basedFilteredTableColumn.Builder
.- Parameters:
modelIndex
- the column model index, also used as identifier- Returns:
- a new
FilteredTableColumn.Builder
instance
-
builder
Instantiates a newFilteredTableColumn.Builder
.- Type Parameters:
C
- the column identifier type- Parameters:
identifier
- the column identifiermodelIndex
- the column model index- Returns:
- a new
FilteredTableColumn
instance - Throws:
NullPointerException
- in caseidentifier
is null
-