Package com.formdev.flatlaf.ui
Class FlatTableCellBorder
- 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
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.border.Border
,javax.swing.plaf.UIResource
- Direct Known Subclasses:
FlatTableCellBorder.Default
,FlatTableCellBorder.Focused
,FlatTableCellBorder.Selected
public class FlatTableCellBorder extends FlatLineBorder
Cell border forDefaultTableCellRenderer
(used byJTable
).Uses separate cell margins from UI defaults to allow easy customizing.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlatTableCellBorder.Default
Border for unselected cell that uses margins, but does not paint focus indicator border.static class
FlatTableCellBorder.Focused
Border for focused unselected cell that uses margins and paints focus indicator border.static class
FlatTableCellBorder.Selected
Border for selected cell that uses margins and paints focus indicator border.
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Component
c
protected boolean
showCellFocusIndicator
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatTableCellBorder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getArc()
Returns the (unscaled) arc diameter of the border corners.java.awt.Insets
getBorderInsets(java.awt.Component c, java.awt.Insets insets)
java.awt.Color
getLineColor()
(package private) static <T> T
getStyleFromTableUI(java.awt.Component c, java.util.function.Function<FlatTableUI,T> f)
Because this border is always shared for all tables, get border specific style from FlatTableUI.void
paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
-
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
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)
- Overrides:
getBorderInsets
in classFlatEmptyBorder
-
getLineColor
public java.awt.Color getLineColor()
- Overrides:
getLineColor
in classFlatLineBorder
-
getArc
public int getArc()
Description copied from class:FlatLineBorder
Returns the (unscaled) arc diameter of the border corners.- Overrides:
getArc
in classFlatLineBorder
-
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 classFlatLineBorder
-
getStyleFromTableUI
static <T> T getStyleFromTableUI(java.awt.Component c, java.util.function.Function<FlatTableUI,T> f)
Because this border is always shared for all tables, get border specific style from FlatTableUI.
-
-