FileDocCategorySizeDatePackage
WindowsCheckBoxMenuItemUI.javaAPI DocJava SE 5 API1657Fri Aug 26 14:54:48 BST 2005com.sun.java.swing.plaf.windows

WindowsCheckBoxMenuItemUI

public class WindowsCheckBoxMenuItemUI extends BasicCheckBoxMenuItemUI
Windows check box menu item.

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.

Fields Summary
Constructors Summary
Methods Summary
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent b)

        return new WindowsCheckBoxMenuItemUI();
    
protected voidpaintText(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Rectangle textRect, java.lang.String text)
Method which renders the text of the current menu item.

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


        ButtonModel model = menuItem.getModel();
        Color oldColor = g.getColor();

        if(model.isEnabled() && model.isArmed()) {
            g.setColor(selectionForeground); // Uses protected field.
        }

        WindowsGraphicsUtils.paintText(g, menuItem, textRect, text, 0);

        g.setColor(oldColor);