Package com.formdev.flatlaf.ui
Class FlatTableCellBorder.Selected
-
- All Implemented Interfaces:
Serializable,Border,UIResource
- Enclosing class:
- FlatTableCellBorder
public static class FlatTableCellBorder.Selected extends FlatTableCellBorder
Border for selected cell that uses margins and paints focus indicator border. The focus indicator is shown under following conditions:- always if enabled via UI property
Table.showCellFocusIndicator=true - for row selection mode if exactly one row is selected and at least one cell in that row is editable
- for column selection mode if exactly one column is selected and at least one cell in that column is editable
- never for cell selection mode
To avoid possible performance issues, checking for editable cells is limited to
maxCheckCellsEditable. If there are more cells to check, the focus indicator is always shown.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.formdev.flatlaf.ui.FlatTableCellBorder
FlatTableCellBorder.Default, FlatTableCellBorder.Focused, FlatTableCellBorder.Selected
-
-
Field Summary
Fields Modifier and Type Field Description intmaxCheckCellsEditable-
Fields inherited from class com.formdev.flatlaf.ui.FlatTableCellBorder
showCellFocusIndicator
-
Fields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top
-
-
Constructor Summary
Constructors Constructor Description Selected()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)protected booleanshouldShowCellFocusIndicator(JTable table)Returns whether focus indicator border should be shown.-
Methods inherited from class com.formdev.flatlaf.ui.FlatTableCellBorder
getBorderInsets, getLineColor
-
Methods inherited from class com.formdev.flatlaf.ui.FlatLineBorder
getArc, getLineThickness
-
Methods inherited from class com.formdev.flatlaf.ui.FlatEmptyBorder
applyStyleProperty, getBorderInsets, getStyleableValue, getUnscaledBorderInsets, scaleInsets
-
Methods inherited from class javax.swing.border.EmptyBorder
isBorderOpaque
-
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
-
-
-
Method Detail
-
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classFlatTableCellBorder
-
shouldShowCellFocusIndicator
protected boolean shouldShowCellFocusIndicator(JTable table)
Returns whether focus indicator border should be shown.- Since:
- 3.1
-
-