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 javax.swing.plaf.basic.BasicMenuBarUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJMenuBar
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FlatMenuBarUI.FlatMenuBarLayout
private static class
FlatMenuBarUI.TakeFocusAction
Activates the menu bar and shows mnemonics.
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBoolean
borderShared
protected java.awt.Color
hoverBackground
protected java.awt.Insets
itemMargins
private java.util.Map<java.lang.String,java.lang.Object>
oldStyleValues
private java.beans.PropertyChangeListener
propertyChangeListener
protected int
selectionArc
protected java.awt.Color
selectionBackground
protected java.awt.Insets
selectionEmbeddedInsets
protected java.awt.Color
selectionForeground
protected java.awt.Insets
selectionInsets
protected java.awt.Color
underlineSelectionBackground
protected java.awt.Color
underlineSelectionColor
protected int
underlineSelectionHeight
-
Constructor Summary
Constructors Constructor Description FlatMenuBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(java.lang.Object style)
protected java.lang.Object
applyStyleProperty(java.lang.String key, java.lang.Object value)
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent c)
protected java.awt.Color
getBackground(javax.swing.JComponent c)
java.util.Map<java.lang.String,java.lang.Class<?>>
getStyleableInfos(javax.swing.JComponent c)
java.lang.Object
getStyleableValue(javax.swing.JComponent c, java.lang.String key)
protected void
installDefaults()
protected void
installKeyboardActions()
protected void
installListeners()
protected void
installStyle()
void
installUI(javax.swing.JComponent c)
protected void
uninstallDefaults()
protected void
uninstallListeners()
void
update(java.awt.Graphics g, javax.swing.JComponent c)
(package private) static boolean
useUnifiedBackground(java.awt.Component c)
-
Methods inherited from class javax.swing.plaf.basic.BasicMenuBarUI
createChangeListener, createContainerListener, getMaximumSize, getMinimumSize, uninstallKeyboardActions, uninstallUI
-
-
-
-
Field Detail
-
itemMargins
protected java.awt.Insets itemMargins
- Since:
- 2
-
selectionInsets
protected java.awt.Insets selectionInsets
- Since:
- 3
-
selectionEmbeddedInsets
protected java.awt.Insets selectionEmbeddedInsets
- Since:
- 3
-
selectionArc
protected int selectionArc
- Since:
- 3
-
hoverBackground
protected java.awt.Color hoverBackground
- Since:
- 2
-
selectionBackground
protected java.awt.Color selectionBackground
- Since:
- 2.5
-
selectionForeground
protected java.awt.Color selectionForeground
- Since:
- 2.5
-
underlineSelectionBackground
protected java.awt.Color underlineSelectionBackground
- Since:
- 2
-
underlineSelectionColor
protected java.awt.Color underlineSelectionColor
- Since:
- 2
-
underlineSelectionHeight
protected int underlineSelectionHeight
- Since:
- 2
-
propertyChangeListener
private java.beans.PropertyChangeListener propertyChangeListener
-
oldStyleValues
private java.util.Map<java.lang.String,java.lang.Object> oldStyleValues
-
borderShared
private java.util.concurrent.atomic.AtomicBoolean borderShared
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUI
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActions
in classjavax.swing.plaf.basic.BasicMenuBarUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(java.lang.Object style)
- Since:
- 2
-
applyStyleProperty
protected java.lang.Object applyStyleProperty(java.lang.String key, java.lang.Object value)
- Since:
- 2
-
getStyleableInfos
public java.util.Map<java.lang.String,java.lang.Class<?>> getStyleableInfos(javax.swing.JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public java.lang.Object getStyleableValue(javax.swing.JComponent c, java.lang.String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
update
in classjavax.swing.plaf.ComponentUI
-
getBackground
protected java.awt.Color getBackground(javax.swing.JComponent c)
-
useUnifiedBackground
static boolean useUnifiedBackground(java.awt.Component c)
- Since:
- 2
-
-