public class

WindowsMenuUI

extends BasicMenuUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.ButtonUI
       ↳ javax.swing.plaf.MenuItemUI
         ↳ javax.swing.plaf.basic.BasicMenuItemUI
           ↳ javax.swing.plaf.basic.BasicMenuUI
             ↳ com.sun.java.swing.plaf.windows.WindowsMenuUI

Class Overview

Windows rendition of the component.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

Summary

Nested Classes
class WindowsMenuUI.WindowsMouseInputHandler This class implements a mouse handler that sets the rollover flag to true when the mouse enters the menu and false when it exits. 
Fields
protected boolean hotTrackingOn
protected Integer menuBarHeight
[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicMenuUI
From class javax.swing.plaf.basic.BasicMenuItemUI
Public Constructors
WindowsMenuUI()
Public Methods
static ComponentUI createUI(JComponent x)
Protected Methods
MouseInputListener createMouseInputListener(JComponent c)
Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
void installDefaults()
void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
Draws the background of the menu.
void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
Method which renders the text of the current menu item.
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicMenuUI
From class javax.swing.plaf.basic.BasicMenuItemUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Fields

protected boolean hotTrackingOn

protected Integer menuBarHeight

Public Constructors

public WindowsMenuUI ()

Public Methods

public static ComponentUI createUI (JComponent x)

Protected Methods

protected MouseInputListener createMouseInputListener (JComponent c)

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

protected void installDefaults ()

protected void paintBackground (Graphics g, JMenuItem menuItem, Color bgColor)

Draws the background of the menu.

Parameters
g the paint graphics
menuItem menu item to be painted
bgColor selection background color

protected void paintText (Graphics g, JMenuItem menuItem, Rectangle textRect, String text)

Method which renders the text of the current menu item.

Parameters
g Graphics context
menuItem Current menu item to render
textRect Bounding rectangle to render the text.
text String to render