Module is.codion.swing.common.ui
Interface FilterTableCellRenderer.Builder<R,C,T>
- Type Parameters:
R- the row typeC- the column identifier typeT- the cell value type
- Enclosing interface:
FilterTableCellRenderer<R,C, T>
public static interface FilterTableCellRenderer.Builder<R,C,T>
Builds a
FilterTableCellRenderer-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionalternateRowColoring(boolean alternateRowColoring) background(FilterTableCellRenderer.CellColor<R, C, T> background) build()component(ComponentValue<? extends JComponent, T> component) Wraps the given component, using it as the base renderer before applying the rendering settings of this renderer.customizer(FilterTableCellRenderer.Customizer<R, C> customizer) filterIndicator(boolean filterIndicator) focusedCellIndicator(boolean focusedCellIndicator) foreground(FilterTableCellRenderer.CellColor<R, C, T> foreground) The default formatter returnsvalue.toString()and an empty string in case of null.horizontalAlignment(int horizontalAlignment) Note that this setting does not apply when usingrenderer(TableCellRenderer)orcomponent(ComponentValue).leftPadding(int leftPadding) renderer(TableCellRenderer renderer) Wraps the given renderer, using it as the base renderer before applying the rendering settings of this renderer.rightPadding(int rightPadding)
-
Method Details
-
horizontalAlignment
Note that this setting does not apply when usingrenderer(TableCellRenderer)orcomponent(ComponentValue).- Parameters:
horizontalAlignment- the horizontal alignment- Returns:
- this builder instance
-
toolTip
- Parameters:
toolTip- provides the tooltip for the cell, given the cell data- Returns:
- this builder instance
-
filterIndicator
- Parameters:
filterIndicator- true if column specific shading should be enabled, for example to indicated that the column is involved in a search/filter- Returns:
- this builder instance
-
focusedCellIndicator
- Parameters:
focusedCellIndicator- true if the focused cell should be indicated with a cell border- Returns:
- this builder instance
-
alternateRowColoring
- Parameters:
alternateRowColoring- true if alternate row coloring should be enabled- Returns:
- this builder instance
-
leftPadding
- Parameters:
leftPadding- the left cell padding- Returns:
- this builder instance
-
rightPadding
- Parameters:
rightPadding- the right cell padding- Returns:
- this builder instance
-
formatter
The default formatter returnsvalue.toString()and an empty string in case of null.- Parameters:
formatter- provides a String to display for a given cell value, formatted or otherwise- Returns:
- this builder instance
-
background
FilterTableCellRenderer.Builder<R,C, backgroundT> (FilterTableCellRenderer.CellColor<R, C, T> background) - Parameters:
background- provides the background color- Returns:
- this builder instance
-
foreground
FilterTableCellRenderer.Builder<R,C, foregroundT> (FilterTableCellRenderer.CellColor<R, C, T> foreground) - Parameters:
foreground- provides the foreground color- Returns:
- this builder instance
-
customizer
FilterTableCellRenderer.Builder<R,C, customizerT> (FilterTableCellRenderer.Customizer<R, C> customizer) - Parameters:
customizer- customizes the renderer component for a given cell- Returns:
- this builder instance
-
renderer
Wraps the given renderer, using it as the base renderer before applying the rendering settings of this renderer.- Parameters:
renderer- the renderer to wrap- Returns:
- this builder instance
-
component
Wraps the given component, using it as the base renderer before applying the rendering settings of this renderer.- Parameters:
component- theComponentValueto use when rendering- Returns:
- this builder instance
-
build
FilterTableCellRenderer<R,C, build()T> - Returns:
- a new
FilterTableCellRendererinstance based on this builder
-