All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JRadioButtonMenuItem

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.AbstractButton
                                   |
                                   +----com.sun.java.swing.JMenuItem
                                           |
                                           +----com.sun.java.swing.JRadioButtonMenuItem

public class JRadioButtonMenuItem
extends JMenuItem
implements Accessible
An implementation of a RadioButtonMenuItem. A RadioButtonMenuItem is a menu item that is part of a group of menu items in which only one item in the group can be selected. The selected item displays its selected state. Selecting it causes any other selected item to switch to the unselected state.

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 Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.


Constructor Index

 o JRadioButtonMenuItem()
Creates a JRadioButtonMenuItem with no set text or icon.
 o JRadioButtonMenuItem(Icon)
Creates a JRadioButtonMenuItem with an icon.
 o JRadioButtonMenuItem(String)
Creates a JRadioButtonMenuItem with text.
 o JRadioButtonMenuItem(String, Icon)
Creates a JRadioButtonMenuItem with the specified text and Icon.

Method Index

 o getAccessibleContext()
Get the AccessibleContext associated with this JComponent
 o getUIClassID()
Returns the name of the L&F class that renders this component.
 o init(String, Icon)
Initialize the JRadioButtonMenuItem with the specified text and Icon.
 o requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true
 o setUI(RadioButtonMenuItemUI)
Sets the L&F object that renders this component.
 o updateUI()
Notification from the UIFactory that the L&F has changed.

Constructors

 o JRadioButtonMenuItem
 public JRadioButtonMenuItem()
Creates a JRadioButtonMenuItem with no set text or icon.

 o JRadioButtonMenuItem
 public JRadioButtonMenuItem(Icon icon)
Creates a JRadioButtonMenuItem with an icon.

Parameters:
icon - the Icon to display on the RadioButtonMenuItem.
 o JRadioButtonMenuItem
 public JRadioButtonMenuItem(String text)
Creates a JRadioButtonMenuItem with text.

Parameters:
text - the text of the RadioButtonMenuItem.
 o JRadioButtonMenuItem
 public JRadioButtonMenuItem(String text,
                             Icon icon)
Creates a JRadioButtonMenuItem with the specified text and Icon.

Parameters:
text - the text of the RadioButtonMenuItem
icon - the icon to display on the RadioButtonMenuItem

Methods

 o init
 protected void init(String text,
                     Icon icon)
Initialize the JRadioButtonMenuItem with the specified text and Icon.

Parameters:
text - the text to display
icon - the icon to display
Overrides:
init in class JMenuItem
 o setUI
 public void setUI(RadioButtonMenuItemUI ui)
Sets the L&F object that renders this component.

Parameters:
ui - the RadioButtonMenuItemUI L&F object
See Also:
getUI
 o updateUI
 public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.

Overrides:
updateUI in class JMenuItem
See Also:
updateUI
 o getUIClassID
 public String getUIClassID()
Returns the name of the L&F class that renders this component.

Returns:
"RadioButtonMenuItemUI"
Overrides:
getUIClassID in class JMenuItem
See Also:
getUIClassID, getUI
 o requestFocus
 public void requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true

Overrides:
requestFocus in class JComponent
 o getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JMenuItem

All Packages  Class Hierarchy  This Package  Previous  Next  Index