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 classFocus 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 BasicToolBarUI
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Insetsprotected booleanprivate FocusTraversalPolicyprotected Colorprotected intprotected Colorprivate Booleanprotected Colorprotected IntegerFields inherited from class BasicToolBarUI
constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKeyFields inherited from interface 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 voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) private static booleanprotected RootPaneContainercreateFloatingWindow(JToolBar toolbar) protected FocusTraversalPolicyprotected Borderprotected PropertyChangeListenerprotected Borderprotected ContainerListenerstatic ComponentUIprivate ButtonGroupgetStyleableValue(JComponent c, String key) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidisTitleBarCaptionAt(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 voidnavigateFocusedComp(int direction) Does the same as super.navigateFocusedComp() with the exception that components with empty input map (e.g.voidpaint(Graphics g, JComponent c) protected voidprotected voidprotected voidprotected voidprotected voidprivate voidsetButtonFocusable(Component c, boolean focusable) protected voidsetButtonsFocusable(boolean focusable) voidsetOrientation(int orientation) protected voidprotected voidvoidMethods inherited from class 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, uninstallListenersMethods inherited from class 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:
installUIin classBasicToolBarUI
-
uninstallUI
- Overrides:
uninstallUIin classBasicToolBarUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicToolBarUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicToolBarUI
-
createFloatingWindow
- Overrides:
createFloatingWindowin classBasicToolBarUI
-
createToolBarContListener
- Overrides:
createToolBarContListenerin classBasicToolBarUI
-
createPropertyListener
- Overrides:
createPropertyListenerin classBasicToolBarUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein 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:
setBorderToRolloverin classBasicToolBarUI
-
setBorderToNonRollover
- Overrides:
setBorderToNonRolloverin classBasicToolBarUI
-
setBorderToNormal
- Overrides:
setBorderToNormalin classBasicToolBarUI
-
installRolloverBorders
- Overrides:
installRolloverBordersin classBasicToolBarUI
-
installNonRolloverBorders
- Overrides:
installNonRolloverBordersin classBasicToolBarUI
-
installNormalBorders
- Overrides:
installNormalBordersin classBasicToolBarUI
-
createRolloverBorder
- Overrides:
createRolloverBorderin classBasicToolBarUI
-
createNonRolloverBorder
- Overrides:
createNonRolloverBorderin classBasicToolBarUI
-
setOrientation
public void setOrientation(int orientation) - Overrides:
setOrientationin classBasicToolBarUI
-
paint
- Overrides:
paintin classComponentUI
-
paintButtonGroup
- Since:
- 3
-
repaintButtonGroup
- Since:
- 3
-
getButtonGroup
-
isTitleBarCaptionAt
Description copied from interface:FlatTitlePane.TitleBarCaptionHitTestInvoked 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.Note:
- This method is invoked often when mouse is moved over window title bar area and should therefore return quickly.
- This method is invoked on 'AWT-Windows' thread (not 'AWT-EventQueue' thread) while processing Windows messages. It must not change any component property or layout because this could cause a dead lock.
- Specified by:
isTitleBarCaptionAtin interfaceFlatTitlePane.TitleBarCaptionHitTest- Returns:
trueif the component is not interested in mouse input at the given locationfalseif the component wants process mouse input at the given locationnullif the component children should be checked- Since:
- 3.4
-