Package com.formdev.flatlaf.ui
Class FlatMenuBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.MenuBarUI
-
- javax.swing.plaf.basic.BasicMenuBarUI
-
- com.formdev.flatlaf.ui.FlatMenuBarUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
public class FlatMenuBarUI extends BasicMenuBarUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJMenuBar.- UiDefault:
- MenuBar.font Font, MenuBar.background Color, MenuBar.foreground Color, MenuBar.border Border , TitlePane.unifiedBackground boolean
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classFlatMenuBarUI.FlatMenuBarLayout
-
Field Summary
Fields Modifier and Type Field Description protected ColorhoverBackgroundprotected InsetsitemMarginsprotected intselectionArcprotected ColorselectionBackgroundprotected InsetsselectionEmbeddedInsetsprotected ColorselectionForegroundprotected InsetsselectionInsetsprotected ColorunderlineSelectionBackgroundprotected ColorunderlineSelectionColorprotected intunderlineSelectionHeight-
Fields inherited from class javax.swing.plaf.basic.BasicMenuBarUI
changeListener, containerListener, menuBar
-
-
Constructor Summary
Constructors Constructor Description FlatMenuBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyStyle(Object style)protected ObjectapplyStyleProperty(String key, Object value)static ComponentUIcreateUI(JComponent c)protected ColorgetBackground(JComponent c)Map<String,Class<?>>getStyleableInfos(JComponent c)ObjectgetStyleableValue(JComponent c, String key)protected voidinstallDefaults()protected voidinstallKeyboardActions()protected voidinstallListeners()protected voidinstallStyle()voidinstallUI(JComponent c)protected voiduninstallDefaults()protected voiduninstallListeners()voidupdate(Graphics g, JComponent c)-
Methods inherited from class javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getPreferredSize, paint
-
-
-
-
Field Detail
-
itemMargins
protected Insets itemMargins
- Since:
- 2
-
selectionInsets
protected Insets selectionInsets
- Since:
- 3
-
selectionEmbeddedInsets
protected Insets selectionEmbeddedInsets
- Since:
- 3
-
selectionArc
protected int selectionArc
- Since:
- 3
-
hoverBackground
protected Color hoverBackground
- Since:
- 2
-
selectionBackground
protected Color selectionBackground
- Since:
- 2.5
-
selectionForeground
protected Color selectionForeground
- Since:
- 2.5
-
underlineSelectionBackground
protected Color underlineSelectionBackground
- Since:
- 2
-
underlineSelectionColor
protected Color underlineSelectionColor
- Since:
- 2
-
underlineSelectionHeight
protected int underlineSelectionHeight
- Since:
- 2
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUIin classBasicMenuBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicMenuBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classBasicMenuBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicMenuBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicMenuBarUI
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActionsin classBasicMenuBarUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
update
public void update(Graphics g, JComponent c)
- Overrides:
updatein classComponentUI
-
getBackground
protected Color getBackground(JComponent c)
-
-