API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicMenuUI View Source
Author(s)
Georges Saab
David Karlton
Arnaud Weber
Since
Version
1.162 11/30/05
Serial
Hierarchy
 Object
      ComponentUI
          ButtonUI
              MenuItemUI
                  BasicMenuItemUI
                      BasicMenuUI
Implements
Subclasses
Description
public class BasicMenuUI
  A default L&F implementation of MenuUI.
See also:   
Constructors
public BasicMenuUI ()
Methods
Hide/Show inherited methods
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
protected ChangeListener createChangeListener (JComponent c)
pack-private InputMap createInputMap (int condition) [Inherited From BasicMenuItemUI]
protected MenuDragMouseListener createMenuDragMouseListener (JComponent c) [Overrides BasicMenuItemUI]
protected MenuKeyListener createMenuKeyListener (JComponent c) [Overrides BasicMenuItemUI]
protected MenuListener createMenuListener (JComponent c)
protected MouseInputListener createMouseInputListener (JComponent c) [Overrides BasicMenuItemUI]
protected PropertyChangeListener createPropertyChangeListener (JComponent c) [Overrides BasicMenuItemUI]
publicstatic ComponentUI createUI (JComponent x) [Overrides BasicMenuItemUI]
protected void doClick (MenuSelectionManager msm) [Inherited From BasicMenuItemUI]
  Call this method when a menu item is to be activated.
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
public int getBaseline (JComponent c, int width, int height) [Inherited From ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Inherited From ComponentUI]
  Returns an enum indicating how the baseline of he component changes as the size changes.
pack-private Handler getHandler () [Overrides BasicMenuItemUI]
public Dimension getMaximumSize (JComponent c) [Overrides BasicMenuItemUI]
public Dimension getMinimumSize (JComponent c) [Inherited From BasicMenuItemUI]
public MenuElement getPath () [Inherited From BasicMenuItemUI]
protected Dimension getPreferredMenuItemSize (JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) [Inherited From BasicMenuItemUI]
public Dimension getPreferredSize (JComponent c) [Inherited From BasicMenuItemUI]
protected String getPropertyPrefix () [Overrides BasicMenuItemUI]
protected void installComponents (JMenuItem menuItem) [Inherited From BasicMenuItemUI]
 
protected void installDefaults () [Overrides BasicMenuItemUI]
protected void installKeyboardActions () [Overrides BasicMenuItemUI]
pack-private void installLazyActionMap () [Overrides BasicMenuItemUI]
protected void installListeners () [Overrides BasicMenuItemUI]
public void installUI (JComponent c) [Inherited From BasicMenuItemUI]
pack-privatestatic void loadActionMap (LazyActionMap map) [Overrides BasicMenuItemUI]
public void paint (Graphics g, JComponent c) [Inherited From BasicMenuItemUI]
protected void paintBackground (Graphics g, JMenuItem menuItem, Color bgColor) [Inherited From BasicMenuItemUI]
  Draws the background of the menu item.
protected void paintMenuItem (Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) [Inherited From BasicMenuItemUI]
protected void paintText (Graphics g, JMenuItem menuItem, Rectangle textRect, String text) [Inherited From BasicMenuItemUI]
  Renders the text of the current menu item.
pack-private void printMenuElementArray (MenuElement path, boolean dumpStack) [Inherited From BasicMenuItemUI]
protected void setupPostTimer (JMenu menu)
protected void uninstallComponents (JMenuItem menuItem) [Inherited From BasicMenuItemUI]
 
protected void uninstallDefaults () [Overrides BasicMenuItemUI]
protected void uninstallKeyboardActions () [Overrides BasicMenuItemUI]
protected void uninstallListeners () [Overrides BasicMenuItemUI]
public void uninstallUI (JComponent c) [Inherited From BasicMenuItemUI]
public void update (Graphics g, JComponent c) [Inherited From BasicMenuItemUI]
We draw the background in paintMenuItem() so override update (which fills the background of opaque components by default) to just call paint().
pack-private void updateAcceleratorBinding () [Inherited From BasicMenuItemUI]
pack-private void updateMnemonicBinding ()
Fields
Hide/Show inherited fields
protected Font acceleratorFont [Inherited From BasicMenuItemUI]
protected Color acceleratorForeground [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle acceleratorRect [Inherited From BasicMenuItemUI]
protected Color acceleratorSelectionForeground [Inherited From BasicMenuItemUI]
protected Icon arrowIcon [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle arrowIconRect [Inherited From BasicMenuItemUI]
protected ChangeListener changeListener
protected Icon checkIcon [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle checkIconRect [Inherited From BasicMenuItemUI]
protected int defaultTextIconGap [Inherited From BasicMenuItemUI]
protected Color disabledForeground [Inherited From BasicMenuItemUI]
pack-private Handler handler [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle iconRect [Inherited From BasicMenuItemUI]
pack-privatefinalstatic String MAX_ACC_WIDTH = "maxAccWidth" [Inherited From BasicMenuItemUI]
pack-privatefinalstatic String MAX_ARROW_ICON_WIDTH = "maxArrowIconWidth" [Inherited From BasicMenuItemUI]
pack-privatefinalstatic String MAX_CHECK_ICON_WIDTH = "maxCheckIconWidth" [Inherited From BasicMenuItemUI]
pack-privatefinalstatic StringBuffer MAX_ICON_OFFSET [Inherited From BasicMenuItemUI]
pack-privatefinalstatic String MAX_ICON_WIDTH = "maxIconWidth" [Inherited From BasicMenuItemUI]
pack-privatefinalstatic String MAX_TEXT_WIDTH = "maxTextWidth" [Inherited From BasicMenuItemUI]
protected MenuDragMouseListener menuDragMouseListener [Inherited From BasicMenuItemUI]
protected JMenuItem menuItem [Inherited From BasicMenuItemUI]
protected MenuKeyListener menuKeyListener [Inherited From BasicMenuItemUI]
protected MenuListener menuListener
protected MouseInputListener mouseInputListener [Inherited From BasicMenuItemUI]
protected boolean oldBorderPainted [Inherited From BasicMenuItemUI]
protected PropertyChangeListener propertyChangeListener [Inherited From BasicMenuItemUI]
  PropertyChangeListener returned from createPropertyChangeListener.
pack-privatestatic Rectangle r [Inherited From BasicMenuItemUI]
protected Color selectionBackground [Inherited From BasicMenuItemUI]
protected Color selectionForeground [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle textRect [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle viewRect [Inherited From BasicMenuItemUI]
pack-privatestatic Rectangle zeroRect [Inherited From BasicMenuItemUI]
Nested Classes
  BasicMenuUI.MouseInputHandler
Instantiated and used by a menu item to handle the current menu selection from mouse events.
  BasicMenuUI.ChangeHandler
As of Java 2 platform 1.4, this previously undocumented class is now obsolete.
  BasicMenuItemUI.MouseInputHandler
  BasicMenuItemUI.Handler
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar