Package com.formdev.flatlaf.ui
Class FlatTableUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TableUI
-
- javax.swing.plaf.basic.BasicTableUI
-
- com.formdev.flatlaf.ui.FlatTableUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
,FlatViewportUI.ViewportPainter
public class FlatTableUI extends BasicTableUI implements FlatStylingSupport.StyleableUI, FlatViewportUI.ViewportPainter
Provides the Flat LaF UI delegate forJTable
.- UiDefault:
- Table.font Font, Table.background Color, Table.foreground Color, Table.selectionBackground Color, Table.selectionForeground Color, Table.gridColor Color, Table.scrollPaneBorder Border, Table.dropLineColor Color, Table.dropLineShortColor Color , Table.cellNoFocusBorder Border, Table.focusCellHighlightBorder Border, Table.focusSelectedCellHighlightBorder Border, Table.dropCellBackground Color, Table.dropCellForeground Color, Table.alternateRowColor Color, Table.focusCellBackground Color, Table.focusCellForeground Color , Table.rowHeight int, Table.showHorizontalLines boolean, Table.showVerticalLines boolean, Table.showTrailingVerticalLine boolean, Table.intercellSpacing Dimension, Table.selectionInactiveBackground Color, Table.selectionInactiveForeground Color, Table.paintOutsideAlternateRows boolean , Table.cellMargins Insets, Table.cellFocusColor Color, Table.showCellFocusIndicator boolean , Table.consistentHomeEndKeyBehavior boolean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTableUI
BasicTableUI.FocusHandler, BasicTableUI.KeyHandler, BasicTableUI.MouseInputHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
cellFocusColor
protected Insets
cellMargins
protected Dimension
intercellSpacing
protected Color
selectionBackground
protected Color
selectionForeground
protected Color
selectionInactiveBackground
protected Color
selectionInactiveForeground
protected Boolean
showCellFocusIndicator
protected boolean
showHorizontalLines
protected boolean
showTrailingVerticalLine
protected boolean
showVerticalLines
-
Fields inherited from class javax.swing.plaf.basic.BasicTableUI
focusListener, keyListener, mouseInputListener, rendererPane, table
-
-
Constructor Summary
Constructors Constructor Description FlatTableUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(Object style)
protected Object
applyStyleProperty(String key, Object value)
protected FocusListener
createFocusListener()
static ComponentUI
createUI(JComponent c)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
protected boolean
hideLastVerticalLine()
protected void
installDefaults()
protected void
installListeners()
protected void
installStyle()
void
installUI(JComponent c)
void
paint(Graphics g, JComponent c)
void
paintViewport(Graphics g, JComponent c, JViewport viewport)
protected void
uninstallDefaults()
protected void
uninstallListeners()
-
Methods inherited from class javax.swing.plaf.basic.BasicTableUI
createKeyListener, createMouseInputListener, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Field Detail
-
showHorizontalLines
protected boolean showHorizontalLines
-
showVerticalLines
protected boolean showVerticalLines
-
showTrailingVerticalLine
protected boolean showTrailingVerticalLine
- Since:
- 1.6
-
intercellSpacing
protected Dimension intercellSpacing
-
selectionBackground
protected Color selectionBackground
-
selectionForeground
protected Color selectionForeground
-
selectionInactiveBackground
protected Color selectionInactiveBackground
-
selectionInactiveForeground
protected Color selectionInactiveForeground
-
cellMargins
protected Insets cellMargins
- Since:
- 2
-
cellFocusColor
protected Color cellFocusColor
- Since:
- 2
-
showCellFocusIndicator
protected Boolean showCellFocusIndicator
- Since:
- 2
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicTableUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicTableUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicTableUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicTableUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicTableUI
-
createFocusListener
protected FocusListener createFocusListener()
- Overrides:
createFocusListener
in classBasicTableUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classBasicTableUI
-
hideLastVerticalLine
protected boolean hideLastVerticalLine()
-
paintViewport
public void paintViewport(Graphics g, JComponent c, JViewport viewport)
- Specified by:
paintViewport
in interfaceFlatViewportUI.ViewportPainter
- Since:
- 2.3
-
-