Package com.formdev.flatlaf.ui
Class FlatToolBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ToolBarUI
-
- javax.swing.plaf.basic.BasicToolBarUI
-
- com.formdev.flatlaf.ui.FlatToolBarUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
,SwingConstants
public class FlatToolBarUI extends BasicToolBarUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJToolBar
.- UiDefault:
- ToolBar.font Font, ToolBar.background Color, ToolBar.foreground Color, ToolBar.border Border, ToolBar.dockingBackground Color, ToolBar.dockingForeground Color, ToolBar.floatingBackground Color, ToolBar.floatingForeground Color, ToolBar.isRollover boolean , ToolBar.focusableButtons boolean, ToolBar.arrowKeysOnlyNavigation boolean, ToolBar.floatable boolean, ToolBar.hoverButtonGroupArc int, ToolBar.hoverButtonGroupBackground Color , ToolBar.borderMargins Insets, ToolBar.gripColor Color
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FlatToolBarUI.FlatToolBarFocusTraversalPolicy
Focus traversal policy used for toolbar to modify traversal behaviour: Tab-key moves focus out of toolbar. If moving focus into the toolbar, focus recently focused toolbar button. If the toolbar contains non-button components (e.g.-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicToolBarUI
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
arrowKeysOnlyNavigation
protected Insets
borderMargins
protected boolean
focusableButtons
protected Color
gripColor
protected int
hoverButtonGroupArc
protected Color
hoverButtonGroupBackground
-
Fields inherited from class javax.swing.plaf.basic.BasicToolBarUI
constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKey
-
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
-
Constructor Summary
Constructors Constructor Description FlatToolBarUI()
-
Method Summary
-
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI
canDock, createDockingListener, createDragWindow, createFloatingFrame, createFloatingWindow, createFrameListener, createToolBarFocusListener, dragTo, floatAt, getDockingColor, getFloatingColor, getNonRolloverBorder, getRolloverBorder, installComponents, installKeyboardActions, installListeners, isFloating, isRolloverBorders, paintDragWindow, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setRolloverBorders, uninstallComponents, uninstallKeyboardActions, uninstallListeners
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
-
-
-
-
Field Detail
-
focusableButtons
protected boolean focusableButtons
- Since:
- 1.4
-
arrowKeysOnlyNavigation
protected boolean arrowKeysOnlyNavigation
- Since:
- 2
-
hoverButtonGroupArc
protected int hoverButtonGroupArc
- Since:
- 3
-
hoverButtonGroupBackground
protected Color hoverButtonGroupBackground
- Since:
- 3
-
borderMargins
protected Insets borderMargins
-
gripColor
protected Color gripColor
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicToolBarUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUI
in classBasicToolBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicToolBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicToolBarUI
-
createToolBarContListener
protected ContainerListener createToolBarContListener()
- Overrides:
createToolBarContListener
in classBasicToolBarUI
-
createPropertyListener
protected PropertyChangeListener createPropertyListener()
- Overrides:
createPropertyListener
in classBasicToolBarUI
-
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
-
setButtonsFocusable
protected void setButtonsFocusable(boolean focusable)
- Since:
- 1.4
-
installFocusTraversalPolicy
protected void installFocusTraversalPolicy()
- Since:
- 2
-
uninstallFocusTraversalPolicy
protected void uninstallFocusTraversalPolicy()
- Since:
- 2
-
createFocusTraversalPolicy
protected FocusTraversalPolicy createFocusTraversalPolicy()
- Since:
- 2
-
navigateFocusedComp
protected void navigateFocusedComp(int direction)
Does the same as super.navigateFocusedComp() with the exception that components with empty input map (e.g. JLabel) are skipped.- Overrides:
navigateFocusedComp
in classBasicToolBarUI
-
setBorderToRollover
protected void setBorderToRollover(Component c)
- Overrides:
setBorderToRollover
in classBasicToolBarUI
-
setBorderToNonRollover
protected void setBorderToNonRollover(Component c)
- Overrides:
setBorderToNonRollover
in classBasicToolBarUI
-
setBorderToNormal
protected void setBorderToNormal(Component c)
- Overrides:
setBorderToNormal
in classBasicToolBarUI
-
installRolloverBorders
protected void installRolloverBorders(JComponent c)
- Overrides:
installRolloverBorders
in classBasicToolBarUI
-
installNonRolloverBorders
protected void installNonRolloverBorders(JComponent c)
- Overrides:
installNonRolloverBorders
in classBasicToolBarUI
-
installNormalBorders
protected void installNormalBorders(JComponent c)
- Overrides:
installNormalBorders
in classBasicToolBarUI
-
createRolloverBorder
protected Border createRolloverBorder()
- Overrides:
createRolloverBorder
in classBasicToolBarUI
-
createNonRolloverBorder
protected Border createNonRolloverBorder()
- Overrides:
createNonRolloverBorder
in classBasicToolBarUI
-
setOrientation
public void setOrientation(int orientation)
- Overrides:
setOrientation
in classBasicToolBarUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classComponentUI
-
paintButtonGroup
protected void paintButtonGroup(Graphics g)
- Since:
- 3
-
repaintButtonGroup
protected void repaintButtonGroup(AbstractButton b)
- Since:
- 3
-
-