Module is.codion.swing.common.ui
Class DefaultFilterTableCellRendererBuilder<R,C>
java.lang.Object
is.codion.swing.common.ui.component.table.DefaultFilterTableCellRendererBuilder<R,C>
- Type Parameters:
R- the row typeC- the column identifier type
- All Implemented Interfaces:
FilterTableCellRenderer.Builder<R,C>
public class DefaultFilterTableCellRendererBuilder<R,C>
extends Object
implements FilterTableCellRenderer.Builder<R,C>
A default
FilterTableCellRenderer.Builder implementation.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultFilterTableCellRendererBuilder(is.codion.swing.common.model.component.table.FilterTableModel<R, C> tableModel, C columnIdentifier, Class<?> columnClass) Instantiates a new builderprotectedDefaultFilterTableCellRendererBuilder(is.codion.swing.common.model.component.table.FilterTableModel<R, C> tableModel, C columnIdentifier, Class<?> columnClass, boolean useBooleanRenderer) Instantiates a new builder -
Method Summary
Modifier and TypeMethodDescriptionfinal FilterTableCellRenderer.Builder<R,C> alternateRowColoring(boolean alternateRowColoring) final FilterTableCellRendererbuild()final FilterTableCellRenderer.Builder<R,C> cellColors(FilterTableCellRenderer.CellColors<C> cellColors) final FilterTableCellRenderer.Builder<R,C> columnShading(boolean columnShading) final FilterTableCellRenderer.Builder<R,C> horizontalAlignment(int horizontalAlignment) final FilterTableCellRenderer.Builder<R,C> leftPadding(int leftPadding) final FilterTableCellRenderer.Builder<R,C> rightPadding(int rightPadding) protected FilterTableCellRenderer.Settings<C>settings(int leftPadding, int rightPadding, boolean alternateRowColoring) final FilterTableCellRenderer.Builder<R,C> final FilterTableCellRenderer.Builder<R,C> toolTipData(boolean toolTipData)
-
Constructor Details
-
DefaultFilterTableCellRendererBuilder
protected DefaultFilterTableCellRendererBuilder(is.codion.swing.common.model.component.table.FilterTableModel<R, C> tableModel, C columnIdentifier, Class<?> columnClass) Instantiates a new builder- Parameters:
tableModel- the table modelcolumnIdentifier- the column identifiercolumnClass- the column class
-
DefaultFilterTableCellRendererBuilder
protected DefaultFilterTableCellRendererBuilder(is.codion.swing.common.model.component.table.FilterTableModel<R, C> tableModel, C columnIdentifier, Class<?> columnClass, boolean useBooleanRenderer) Instantiates a new builder- Parameters:
tableModel- the table modelcolumnIdentifier- the column identifiercolumnClass- the column classuseBooleanRenderer- true if the boolean renderer should be used
-
-
Method Details
-
horizontalAlignment
- Specified by:
horizontalAlignmentin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
horizontalAlignment- the horizontal alignment- Returns:
- this builder instance
-
toolTipData
- Specified by:
toolTipDatain interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
toolTipData- true if the cell should display its contents in a tool tip- Returns:
- this builder instance
-
columnShading
- Specified by:
columnShadingin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
columnShading- 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
-
alternateRowColoring
public final FilterTableCellRenderer.Builder<R,C> alternateRowColoring(boolean alternateRowColoring) - Specified by:
alternateRowColoringin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
alternateRowColoring- true if alternate row coloring should be enabled- Returns:
- this builder instance
-
leftPadding
- Specified by:
leftPaddingin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
leftPadding- the left cell padding- Returns:
- this builder instance
-
rightPadding
- Specified by:
rightPaddingin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
rightPadding- the right cell padding- Returns:
- this builder instance
-
string
- Specified by:
stringin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
string- provides a String to display for a given cell value, formatted or otherwise- Returns:
- this builder instance
-
cellColors
public final FilterTableCellRenderer.Builder<R,C> cellColors(FilterTableCellRenderer.CellColors<C> cellColors) - Specified by:
cellColorsin interfaceFilterTableCellRenderer.Builder<R,C> - Parameters:
cellColors- provides cell/row background and foreground color- Returns:
- this builder instance
-
build
- Specified by:
buildin interfaceFilterTableCellRenderer.Builder<R,C> - Returns:
- a new
FilterTableCellRendererinstance based on this builder
-
settings
protected FilterTableCellRenderer.Settings<C> settings(int leftPadding, int rightPadding, boolean alternateRowColoring) - Parameters:
leftPadding- the left paddingrightPadding- the right paddingalternateRowColoring- true if alternate row coloring is enabled- Returns:
- the
FilterTableCellRenderer.Settingsinstance for this renderer
-