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
,FlatTitlePane.TitleBarCaptionHitTest
,SwingConstants
public class FlatToolBarUI
extends BasicToolBarUI
implements FlatStylingSupport.StyleableUI, FlatTitlePane.TitleBarCaptionHitTest
Provides the Flat LaF UI delegate for
JToolBar
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
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
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Insets
protected boolean
private FocusTraversalPolicy
protected Color
protected int
protected Color
private Boolean
protected Color
protected Integer
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyStyle
(Object style) protected Object
applyStyleProperty
(String key, Object value) private static boolean
protected RootPaneContainer
createFloatingWindow
(JToolBar toolbar) protected FocusTraversalPolicy
protected Border
protected PropertyChangeListener
protected Border
protected ContainerListener
static ComponentUI
private ButtonGroup
getStyleableValue
(JComponent c, String key) protected void
protected void
protected void
protected void
protected void
protected void
void
isTitleBarCaptionAt
(int x, int y) Invoked for a component that is enabled and has mouse listeners, to check whether it processes mouse input at the given x/y location.protected void
navigateFocusedComp
(int direction) Does the same as super.navigateFocusedComp() with the exception that components with empty input map (e.g.void
paint
(Graphics g, JComponent c) protected void
protected void
protected void
protected void
protected void
private void
setButtonFocusable
(Component c, boolean focusable) protected void
setButtonsFocusable
(boolean focusable) void
setOrientation
(int orientation) protected void
protected void
void
Methods inherited from class javax.swing.plaf.basic.BasicToolBarUI
canDock, createDockingListener, createDragWindow, createFloatingFrame, 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 Details
-
focusableButtons
protected boolean focusableButtons- Since:
- 1.4
-
hoverButtonGroupArc
protected int hoverButtonGroupArc- Since:
- 3
-
hoverButtonGroupBackground
- Since:
- 3
-
borderMargins
-
gripColor
-
separatorWidth
- Since:
- 3.3
-
separatorColor
- Since:
- 3.3
-
focusTraversalPolicy
-
oldFloatable
-
oldStyleValues
-
-
Constructor Details
-
FlatToolBarUI
public FlatToolBarUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicToolBarUI
-
uninstallUI
- Overrides:
uninstallUI
in classBasicToolBarUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicToolBarUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicToolBarUI
-
createFloatingWindow
- Overrides:
createFloatingWindow
in classBasicToolBarUI
-
createToolBarContListener
- Overrides:
createToolBarContListener
in classBasicToolBarUI
-
createPropertyListener
- Overrides:
createPropertyListener
in classBasicToolBarUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
setButtonsFocusable
protected void setButtonsFocusable(boolean focusable) - Since:
- 1.4
-
setButtonFocusable
-
installFocusTraversalPolicy
protected void installFocusTraversalPolicy()- Since:
- 2
-
uninstallFocusTraversalPolicy
protected void uninstallFocusTraversalPolicy()- Since:
- 2
-
createFocusTraversalPolicy
- Since:
- 2
-
canBeFocusOwner
-
setBorderToRollover
- Overrides:
setBorderToRollover
in classBasicToolBarUI
-
setBorderToNonRollover
- Overrides:
setBorderToNonRollover
in classBasicToolBarUI
-
setBorderToNormal
- Overrides:
setBorderToNormal
in classBasicToolBarUI
-
installRolloverBorders
- Overrides:
installRolloverBorders
in classBasicToolBarUI
-
installNonRolloverBorders
- Overrides:
installNonRolloverBorders
in classBasicToolBarUI
-
installNormalBorders
- Overrides:
installNormalBorders
in classBasicToolBarUI
-
createRolloverBorder
- Overrides:
createRolloverBorder
in classBasicToolBarUI
-
createNonRolloverBorder
- Overrides:
createNonRolloverBorder
in classBasicToolBarUI
-
setOrientation
public void setOrientation(int orientation) - Overrides:
setOrientation
in classBasicToolBarUI
-
paint
- Overrides:
paint
in classComponentUI
-
paintButtonGroup
- Since:
- 3
-
repaintButtonGroup
- Since:
- 3
-
getButtonGroup
-
isTitleBarCaptionAt
Description copied from interface:FlatTitlePane.TitleBarCaptionHitTest
Invoked for a component that is enabled and has mouse listeners, to check whether it processes mouse input at the given x/y location. Useful for components that do not use mouse input on whole component bounds. E.g. a tabbed pane with a few tabs has some empty space beside the tabs that can be used to move the window.- Specified by:
isTitleBarCaptionAt
in interfaceFlatTitlePane.TitleBarCaptionHitTest
- Returns:
true
if the component is not interested in mouse input at the given locationfalse
if the component wants process mouse input at the given locationnull
if the component children should be checked- Since:
- 3.4
-