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 class
FlatMenuBarUI.FlatMenuBarLayout
-
Field Summary
Fields Modifier and Type Field Description protected Color
hoverBackground
protected Insets
itemMargins
protected int
selectionArc
protected Color
selectionBackground
protected Insets
selectionEmbeddedInsets
protected Color
selectionForeground
protected Insets
selectionInsets
protected Color
underlineSelectionBackground
protected Color
underlineSelectionColor
protected int
underlineSelectionHeight
-
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 void
applyStyle(Object style)
protected Object
applyStyleProperty(String key, Object value)
static ComponentUI
createUI(JComponent c)
protected Color
getBackground(JComponent c)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
protected void
installDefaults()
protected void
installKeyboardActions()
protected void
installListeners()
protected void
installStyle()
void
installUI(JComponent c)
protected void
uninstallDefaults()
protected void
uninstallListeners()
void
update(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:
installUI
in classBasicMenuBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicMenuBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicMenuBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicMenuBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicMenuBarUI
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActions
in 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:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
update
public void update(Graphics g, JComponent c)
- Overrides:
update
in classComponentUI
-
getBackground
protected Color getBackground(JComponent c)
-
-