Module is.codion.swing.common.ui
Class FilteredTableCellRenderer.Settings<C>
java.lang.Object
is.codion.swing.common.ui.component.table.FilteredTableCellRenderer.Settings<C>
- Type Parameters:
C
- the column identifier type
- Enclosing interface:
- FilteredTableCellRenderer
Settings for a
FilteredTableCellRenderer
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final double
protected static final double
protected static final int
protected static final float
-
Constructor Summary
ModifierConstructorDescriptionprotected
Settings
(int leftPadding, int rightPadding, boolean alternateRowColoring) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
alternateRowColor
(int row) protected final Color
protected final Color
backgroundColor
(FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, boolean columnShadingEnabled, boolean selected, Color cellBackgroundColor) protected final Color
protected final Color
protected final Color
protected Color
backgroundColorShaded
(FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, Color cellBackgroundColor) Adds shading to the given cell, if applicableprotected void
Updates the colors according the the selected look and feel
-
Field Details
-
SELECTION_COLOR_BLEND_RATIO
protected static final float SELECTION_COLOR_BLEND_RATIO- See Also:
-
DARKENING_FACTOR
protected static final double DARKENING_FACTOR- See Also:
-
DOUBLE_DARKENING_FACTOR
protected static final double DOUBLE_DARKENING_FACTOR- See Also:
-
FOCUSED_CELL_BORDER_THICKNESS
protected static final int FOCUSED_CELL_BORDER_THICKNESS- See Also:
-
-
Constructor Details
-
Settings
protected Settings(int leftPadding, int rightPadding, boolean alternateRowColoring) - Parameters:
leftPadding
- the left paddingrightPadding
- the right paddingalternateRowColoring
- true if alternate row coloring should be enabled
-
-
Method Details
-
updateColors
protected void updateColors()Updates the colors according the the selected look and feel -
backgroundColor
protected final Color backgroundColor(FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, boolean columnShadingEnabled, boolean selected, Color cellBackgroundColor) -
backgroundColorShaded
protected Color backgroundColorShaded(FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, Color cellBackgroundColor) Adds shading to the given cell, if applicable- Parameters:
tableModel
- the table modelrow
- the rowcolumnIdentifier
- the column identifiercellBackgroundColor
- the cell specific background color, if any- Returns:
- a shaded background color
-
backgroundColor
-
backgroundColorShaded
-
backgroundColorAlternate
-
backgroundColorAlternateShaded
-
alternateRowColor
protected boolean alternateRowColor(int row) - Parameters:
row
- the row- Returns:
- true if the given row should use the alternate row color
-