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
FieldsModifier and TypeFieldDescriptionprotected static final doubleprotected static final doubleprotected static final intprotected static final float -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSettings(int leftPadding, int rightPadding, boolean alternateRowColoring) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanalternateRowColor(int row) protected final Colorprotected final ColorbackgroundColor(is.codion.swing.common.model.component.table.FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, boolean columnShadingEnabled, boolean selected, Color cellBackgroundColor) protected final Colorprotected final Colorprotected final Colorprotected ColorbackgroundColorShaded(is.codion.swing.common.model.component.table.FilteredTableModel<?, C> tableModel, int row, C columnIdentifier, Color cellBackgroundColor) Adds shading to the given cell, if applicableprotected voidUpdates 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
-
backgroundColorShaded
protected Color backgroundColorShaded(is.codion.swing.common.model.component.table.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
-