Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing.plaf.basic
Class BasicMenuItemUI

    java.lang.Object
      |
      +--javax.swing.plaf.ComponentUI
            |
            +--javax.swing.plaf.ButtonUI
                  |
                  +--javax.swing.plaf.MenuItemUI
                        |
                        +--javax.swing.plaf.basic.BasicMenuItemUI

Direct Known Subclasses:
  BasicCheckBoxMenuItemUI, BasicMenuUI, BasicRadioButtonMenuItemUI

public class BasicMenuItemUI
extends MenuItemUI

BasicMenuItem implementation

Inner Class Summary
`protected class` | `BasicMenuItemUI.MouseInputHandler`

Field Summary
`protected java.awt.Font` | `acceleratorFont`
`protected java.awt.Color` | `acceleratorForeground`
`protected java.awt.Color` | `acceleratorSelectionForeground`
`protected Icon` | `arrowIcon`
`protected Icon` | `checkIcon`
`protected int` | `defaultTextIconGap`
`protected java.awt.Color` | `disabledForeground`
`protected MenuDragMouseListener` | `menuDragMouseListener`
`protected JMenuItem` | `menuItem`
`protected MenuKeyListener` | `menuKeyListener`
`protected MouseInputListener` | `mouseInputListener`
`protected boolean` | `oldBorderPainted`
`protected java.awt.Color` | `selectionBackground`
`protected java.awt.Color` | `selectionForeground`

Constructor Summary
`BasicMenuItemUI()`

Method Summary
`protected MenuDragMouseListener` | `createMenuDragMouseListener(JComponent c)`
`protected MenuKeyListener` | `createMenuKeyListener(JComponent c)`
`protected MouseInputListener` | `createMouseInputListener(JComponent c)`
`static ComponentUI` | `createUI(JComponent c)`
`java.awt.Dimension` | `getMaximumSize(JComponent c)`
`java.awt.Dimension` | `getMinimumSize(JComponent c)`
`MenuElement[]` | `getPath()`
`protected java.awt.Dimension` | `getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)`
`java.awt.Dimension` | `getPreferredSize(JComponent c)`
`protected java.lang.String` | `getPropertyPrefix()`
`protected void` | `installDefaults()`
`protected void` | `installKeyboardActions()`
`protected void` | `installListeners()`
`void` | `installUI(JComponent c)`
`void` | `paint(java.awt.Graphics g, JComponent c)`
`protected void` | `paintMenuItem(java.awt.Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, java.awt.Color background, java.awt.Color foreground, int defaultTextIconGap)`
`protected void` | `uninstallDefaults()`
`protected void` | `uninstallKeyboardActions()`
`protected void` | `uninstallListeners()`
`void` | `uninstallUI(JComponent c)`
`void` | `update(java.awt.Graphics g, JComponent c)` We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().

Methods inherited from class javax.swing.plaf.ComponentUI
`contains, getAccessibleChild, getAccessibleChildrenCount`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### menuItem

    protected JMenuItem menuItem

### selectionBackground

    protected java.awt.Color selectionBackground

### selectionForeground

    protected java.awt.Color selectionForeground

### disabledForeground

    protected java.awt.Color disabledForeground

### acceleratorForeground

    protected java.awt.Color acceleratorForeground

### acceleratorSelectionForeground

    protected java.awt.Color acceleratorSelectionForeground

### defaultTextIconGap

    protected int defaultTextIconGap

### acceleratorFont

    protected java.awt.Font acceleratorFont

### mouseInputListener

    protected MouseInputListener mouseInputListener

### menuDragMouseListener

    protected MenuDragMouseListener menuDragMouseListener

### menuKeyListener

    protected MenuKeyListener menuKeyListener

### arrowIcon

    protected Icon arrowIcon

### checkIcon

    protected Icon checkIcon

### oldBorderPainted

    protected boolean oldBorderPainted

Constructor Detail

### BasicMenuItemUI

    public BasicMenuItemUI()

Method Detail

### createUI

    public static ComponentUI createUI(JComponent c)

### installUI

    public void installUI(JComponent c)

  Overrides:
    installUI in class ComponentUI

### installDefaults

    protected void installDefaults()

### getPropertyPrefix

    protected java.lang.String getPropertyPrefix()

### installListeners

    protected void installListeners()

### installKeyboardActions

    protected void installKeyboardActions()

### uninstallUI

    public void uninstallUI(JComponent c)

  Overrides:
    uninstallUI in class ComponentUI

### uninstallDefaults

    protected void uninstallDefaults()

### uninstallListeners

    protected void uninstallListeners()

### uninstallKeyboardActions

    protected void uninstallKeyboardActions()

### createMouseInputListener

    protected MouseInputListener createMouseInputListener(JComponent c)

### createMenuDragMouseListener

    protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)

### createMenuKeyListener

    protected MenuKeyListener createMenuKeyListener(JComponent c)

### getMinimumSize

    public java.awt.Dimension getMinimumSize(JComponent c)

  Overrides:
    getMinimumSize in class ComponentUI

### getPreferredSize

    public java.awt.Dimension getPreferredSize(JComponent c)

  Overrides:
    getPreferredSize in class ComponentUI

### getMaximumSize

    public java.awt.Dimension getMaximumSize(JComponent c)

  Overrides:
    getMaximumSize in class ComponentUI

### getPreferredMenuItemSize

    protected java.awt.Dimension getPreferredMenuItemSize(JComponent c,
                                                          Icon checkIcon,
                                                          Icon arrowIcon,
                                                          int defaultTextIconGap)

### update

    public void update(java.awt.Graphics g,
                       JComponent c)

  We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
  Overrides:
    update in class ComponentUI

### paint

    public void paint(java.awt.Graphics g,
                      JComponent c)

  Overrides:
    paint in class ComponentUI

### paintMenuItem

    protected void paintMenuItem(java.awt.Graphics g,
                                 JComponent c,
                                 Icon checkIcon,
                                 Icon arrowIcon,
                                 java.awt.Color background,
                                 java.awt.Color foreground,
                                 int defaultTextIconGap)

### getPath

    public MenuElement[] getPath()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.