Package com.formdev.flatlaf.ui
Class FlatTableCellBorder.Selected
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- javax.swing.border.EmptyBorder
-
- javax.swing.plaf.BorderUIResource.EmptyBorderUIResource
-
- com.formdev.flatlaf.ui.FlatEmptyBorder
-
- com.formdev.flatlaf.ui.FlatLineBorder
-
- com.formdev.flatlaf.ui.FlatTableCellBorder
-
- com.formdev.flatlaf.ui.FlatTableCellBorder.Selected
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.border.Border
,javax.swing.plaf.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 int
maxCheckCellsEditable
-
Fields inherited from class com.formdev.flatlaf.ui.FlatTableCellBorder
showCellFocusIndicator
-
-
Constructor Summary
Constructors Constructor Description Selected()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
protected boolean
shouldShowCellFocusIndicator(javax.swing.JTable table)
Returns whether focus indicator border should be shown.-
Methods inherited from class com.formdev.flatlaf.ui.FlatTableCellBorder
getArc, getBorderInsets, getLineColor, getStyleFromTableUI
-
Methods inherited from class com.formdev.flatlaf.ui.FlatLineBorder
getLineThickness
-
Methods inherited from class com.formdev.flatlaf.ui.FlatEmptyBorder
applyStyleProperty, getBorderInsets, getStyleableValue, getUnscaledBorderInsets, scaleInsets
-
-
-
-
Method Detail
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
- Specified by:
paintBorder
in interfacejavax.swing.border.Border
- Overrides:
paintBorder
in classFlatTableCellBorder
-
shouldShowCellFocusIndicator
protected boolean shouldShowCellFocusIndicator(javax.swing.JTable table)
Returns whether focus indicator border should be shown.- Since:
- 3.1
-
-