Module is.codion.swing.common.ui
Class FilterTableColumn<C>
java.lang.Object
javax.swing.table.TableColumn
is.codion.swing.common.ui.component.table.FilterTableColumn<C>
- Type Parameters:
C
- the column identifier type
- All Implemented Interfaces:
Serializable
A
TableColumn
with a typed identifier.
For instances use factory method filterTableColumn(int)
or filterTableColumn(Object, int)
or builder methods builder(int)
, builder(Enum)
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 FilterTableColumn.Builder<Integer>
builder
(int modelIndex) Instantiates a new index basedFilterTableColumn.Builder
.static <C extends Enum<C>>
FilterTableColumn.Builder<C>builder
(C identifier) Instantiates a new enum basedFilterTableColumn.Builder
.static <C> FilterTableColumn.Builder<C>
builder
(C identifier, int modelIndex) Instantiates a newFilterTableColumn.Builder
.static FilterTableColumn<Integer>
filterTableColumn
(int modelIndex) Instantiates a new index basedFilterTableColumn
.static <C> FilterTableColumn<C>
filterTableColumn
(C identifier, int modelIndex) Instantiates a newFilterTableColumn
.void
setIdentifier
(Object identifier) toString()
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:
UnsupportedOperationException
- changing the identifier is not supported
-
identifier
- Returns:
- the column identifier
-
toolTipText
- Returns:
- the tool tip text to display for this column, an empty Optional in case of no tool tip
-
toString
-
filterTableColumn
Instantiates a new index basedFilterTableColumn
.- Parameters:
modelIndex
- the column model index, also used as identifier- Returns:
- a new
FilterTableColumn
instance
-
filterTableColumn
Instantiates a newFilterTableColumn
.- Type Parameters:
C
- the column identifier type- Parameters:
identifier
- the column identifiermodelIndex
- the column model index- Returns:
- a new
FilterTableColumn
instance - Throws:
NullPointerException
- in caseidentifier
is null
-
builder
Instantiates a new enum basedFilterTableColumn.Builder
. The enum ordinal position is used as the column model index- Type Parameters:
C
- the column identifier type- Parameters:
identifier
- the column identifier- Returns:
- a new
FilterTableColumn.Builder
instance - See Also:
-
builder
Instantiates a new index basedFilterTableColumn.Builder
.- Parameters:
modelIndex
- the column model index, also used as identifier- Returns:
- a new
FilterTableColumn.Builder
instance
-
builder
Instantiates a newFilterTableColumn.Builder
.- Type Parameters:
C
- the column identifier type- Parameters:
identifier
- the column identifiermodelIndex
- the column model index- Returns:
- a new
FilterTableColumn
instance - Throws:
NullPointerException
- in caseidentifier
is null
-