WindowsRadioButtonMenuItemUIpublic class WindowsRadioButtonMenuItemUI extends BasicRadioButtonMenuItemUI 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. |
Fields Summary |
---|
final WindowsMenuItemUIAccessor | accessor |
Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent b)
return new WindowsRadioButtonMenuItemUI();
| protected void | paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)
if (WindowsMenuItemUI.isVistaPainting()) {
WindowsMenuItemUI.paintBackground(accessor, g, menuItem, bgColor);
return;
}
super.paintBackground(g, menuItem, bgColor);
| protected void | paintText(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.
if (WindowsMenuItemUI.isVistaPainting()) {
WindowsMenuItemUI.paintText(accessor, g, menuItem, textRect, text);
return;
}
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);
|
|