|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.AbstractButton | +--javax.swing.JMenuItem | +--javax.swing.JRadioButtonMenuItem
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.
Used with a ButtonGroup
object to create a group of menu items
in which only one item at a time can be selected. (Create a ButtonGroup
object and use its add
method to include the JRadioButtonMenuItem
objects in the group.)
For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JRadioButtonMenuItem key assignments.
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.
ButtonGroup
, Serialized FormInner Class Summary | |
protected class |
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
The class used to obtain the accessible role for this object. |
Inner classes inherited from class javax.swing.JMenuItem |
JMenuItem.AccessibleJMenuItem |
Inner classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton,
AbstractButton.ButtonChangeListener |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
JRadioButtonMenuItem()
Creates a JRadioButtonMenuItem with no set text or icon. |
|
JRadioButtonMenuItem(Icon icon)
Creates a JRadioButtonMenuItem with an icon. |
|
JRadioButtonMenuItem(Icon icon,
boolean selected)
Creates a radio button menu item with the specified image and selection state, but no text. |
|
JRadioButtonMenuItem(String text)
Creates a JRadioButtonMenuItem with text. |
|
JRadioButtonMenuItem(String text,
boolean b)
Creates a radiobutton menu item with the specified text and selection state. |
|
JRadioButtonMenuItem(String text,
Icon icon)
Creates a JRadioButtonMenuItem with the specified text and Icon. |
|
JRadioButtonMenuItem(String text,
Icon icon,
boolean selected)
Creates a radio button menu item that has the specified text, image, and selection state. |
Method Summary | |
AccessibleContext |
getAccessibleContext()
Get the AccessibleContext associated with this JComponent |
String |
getUIClassID()
Returns the name of the L&F class that renders this component. |
protected void |
init(String text,
Icon icon)
Initialize the JRadioButtonMenuItem with the specified text and Icon. |
protected String |
paramString()
Returns a string representation of this JRadioButtonMenuItem. |
void |
requestFocus()
Override Component.requestFocus() to not grab focus. |
void |
updateUI()
Notification from the UIFactory that the L&F has changed. |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public JRadioButtonMenuItem()
public JRadioButtonMenuItem(Icon icon)
icon
- the Icon to display on the RadioButtonMenuItem.public JRadioButtonMenuItem(String text)
text
- the text of the RadioButtonMenuItem.public JRadioButtonMenuItem(String text, Icon icon)
text
- the text of the RadioButtonMenuItemicon
- the icon to display on the RadioButtonMenuItempublic JRadioButtonMenuItem(String text, boolean b)
text
- the text of the CheckBoxMenuItem.b
- the selected state of the checkboxmenuitempublic JRadioButtonMenuItem(Icon icon, boolean selected)
icon
- the image that the button should displayselected
- if true, the button is initially selected;
otherwise, the button is initially unselectedpublic JRadioButtonMenuItem(String text, Icon icon, boolean selected)
text
- the string displayed on the radio buttonicon
- the image that the button should displayMethod Detail |
protected void init(String text, Icon icon)
text
- the text to displayicon
- the icon to displaypublic void updateUI()
JComponent.updateUI()
public String getUIClassID()
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
public void requestFocus()
protected String paramString()
null
.
Overriding paramString() to provide information about the specific new aspects of the JFC components.
public AccessibleContext getAccessibleContext()
|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |