public class MetalMenuUI extends MetalMenuItemUI
Modifier and Type | Class and 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.
|
Modifier and Type | Field and Description |
---|---|
protected ChangeListener |
changeListener |
protected MenuListener |
menuListener |
protected PropertyChangeListener |
propertyChangeListener |
_painter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
Constructor and Description |
---|
MetalMenuUI() |
doClick, getMinimumSize, getPainter, getPath, getPreferredMenuItemSize, getRightMargin, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, paintText, uninstallComponents, uninstallUI, update
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected ChangeListener changeListener
protected PropertyChangeListener propertyChangeListener
protected MenuListener menuListener
public static ComponentUI createUI(JComponent x)
protected void installDefaults()
installDefaults
in class MetalMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
in class MetalMenuItemUI
protected void installListeners()
installListeners
in class MetalMenuItemUI
protected void installKeyboardActions()
installKeyboardActions
in class MetalMenuItemUI
protected void updateMnemonicBinding()
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class MetalMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class MetalMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
protected void uninstallDefaults()
uninstallDefaults
in class MetalMenuItemUI
protected void uninstallListeners()
uninstallListeners
in class MetalMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
in class MetalMenuItemUI
protected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener
in class MetalMenuItemUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class MetalMenuItemUI
protected static void setupPostTimer(JMenu menu)
protected static void appendPath(MenuElement[] path, MenuElement elem)
protected void setMouseOver(boolean over)
protected boolean isMouseOver()
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class MetalMenuItemUI
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
paintBackground
in class MetalMenuItemUI
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background color