Package com.jidesoft.plaf.metal
Class MetalMenuUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.MenuItemUI
-
- com.jidesoft.plaf.metal.MetalMenuItemUI
-
- com.jidesoft.plaf.metal.MetalMenuUI
-
- Direct Known Subclasses:
MetalJideSplitButtonUI
public class MetalMenuUI extends MetalMenuItemUI
A metal L&F implementation of MenuUI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MetalMenuUI.ChangeHandler
As of Java 2 platform 1.4, this previously undocumented class is now obsolete.protected class
MetalMenuUI.MouseInputHandler
Instantiated and used by a menu item to handle the current menu selection from mouse events.
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.event.ChangeListener
changeListener
protected javax.swing.event.MenuListener
menuListener
protected java.beans.PropertyChangeListener
propertyChangeListener
-
Fields inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI
_painter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
-
-
Constructor Summary
Constructors Constructor Description MetalMenuUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
appendPath(javax.swing.MenuElement[] path, javax.swing.MenuElement elem)
protected javax.swing.ActionMap
createActionMap()
Invoked to create the ActionMap.protected javax.swing.event.ChangeListener
createChangeListener(javax.swing.JComponent c)
protected javax.swing.event.MenuDragMouseListener
createMenuDragMouseListener(javax.swing.JComponent c)
protected javax.swing.event.MenuKeyListener
createMenuKeyListener(javax.swing.JComponent c)
protected javax.swing.event.MenuListener
createMenuListener(javax.swing.JComponent c)
protected javax.swing.event.MouseInputListener
createMouseInputListener(javax.swing.JComponent c)
protected java.beans.PropertyChangeListener
createPropertyChangeListener(javax.swing.JComponent c)
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent x)
protected javax.swing.ActionMap
getActionMap()
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.java.awt.Dimension
getMaximumSize(javax.swing.JComponent c)
java.awt.Dimension
getPreferredSize(javax.swing.JComponent c)
protected java.lang.String
getPropertyPrefix()
protected void
installDefaults()
protected void
installKeyboardActions()
protected void
installListeners()
protected boolean
isMouseOver()
Get the temporary flag to indicate if the mouse has entered the menu.protected void
paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)
Draws the background of the menu item.protected void
setMouseOver(boolean over)
Set the temporary flag to indicate if the mouse has entered the menu.protected static void
setupPostTimer(javax.swing.JMenu menu)
protected void
uninstallDefaults()
protected void
uninstallKeyboardActions()
protected void
uninstallListeners()
protected void
updateMnemonicBinding()
-
Methods inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI
createInputMap, doClick, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, getRightMargin, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, paintText, uninstallComponents, uninstallUI, update
-
-
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classMetalMenuItemUI
-
getPropertyPrefix
protected java.lang.String getPropertyPrefix()
- Overrides:
getPropertyPrefix
in classMetalMenuItemUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classMetalMenuItemUI
-
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActions
in classMetalMenuItemUI
-
updateMnemonicBinding
protected void updateMnemonicBinding()
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
- Overrides:
uninstallKeyboardActions
in classMetalMenuItemUI
-
getActionMap
protected javax.swing.ActionMap getActionMap()
The ActionMap for BasicMenUI can not be shared, this is subclassed to create a new one for each invocation.- Overrides:
getActionMap
in classMetalMenuItemUI
-
createActionMap
protected javax.swing.ActionMap createActionMap()
Invoked to create the ActionMap.- Overrides:
createActionMap
in classMetalMenuItemUI
-
createMouseInputListener
protected javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
- Overrides:
createMouseInputListener
in classMetalMenuItemUI
-
createMenuListener
protected javax.swing.event.MenuListener createMenuListener(javax.swing.JComponent c)
-
createChangeListener
protected javax.swing.event.ChangeListener createChangeListener(javax.swing.JComponent c)
-
createPropertyChangeListener
protected java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JComponent c)
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classMetalMenuItemUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classMetalMenuItemUI
-
createMenuDragMouseListener
protected javax.swing.event.MenuDragMouseListener createMenuDragMouseListener(javax.swing.JComponent c)
- Overrides:
createMenuDragMouseListener
in classMetalMenuItemUI
-
createMenuKeyListener
protected javax.swing.event.MenuKeyListener createMenuKeyListener(javax.swing.JComponent c)
- Overrides:
createMenuKeyListener
in classMetalMenuItemUI
-
getMaximumSize
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
- Overrides:
getMaximumSize
in classMetalMenuItemUI
-
setupPostTimer
protected static void setupPostTimer(javax.swing.JMenu menu)
-
appendPath
protected static void appendPath(javax.swing.MenuElement[] path, javax.swing.MenuElement elem)
-
setMouseOver
protected void setMouseOver(boolean over)
Set the temporary flag to indicate if the mouse has entered the menu.
-
isMouseOver
protected boolean isMouseOver()
Get the temporary flag to indicate if the mouse has entered the menu.
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in classMetalMenuItemUI
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)
Draws the background of the menu item.- Overrides:
paintBackground
in classMetalMenuItemUI
- Parameters:
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background color- Since:
- 1.4
-
-