|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JMenuItem
javax.swing.JRadioButtonMenuItem
public class JRadioButtonMenuItem
This class represents JRadioButtonMenuItem. Its behaviour is very similar to JRadioButton. Just like JRadioButton, user can check and uncheck this menu item by clicking on it. JRadioButtonMenuItem uses ToggleButtonModel to keep track of its selection. If the JRadioButtonMenuItem is included in the button group, then only one JRadioButtonMenuItem can be selected at one time.
Nested Class Summary | |
---|---|
protected class |
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
Provides the accessibility features for the JRadioButtonMenuItem component. |
Nested classes/interfaces inherited from class javax.swing.JMenuItem |
---|
JMenuItem.AccessibleJMenuItem |
Nested classes/interfaces inherited from class javax.swing.AbstractButton |
---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JRadioButtonMenuItem()
Creates a new JRadioButtonMenuItem object. |
|
JRadioButtonMenuItem(Action action)
Creates a new JRadioButtonMenuItem using specified action |
|
JRadioButtonMenuItem(Icon icon)
Creates a new JRadioButtonMenuItem with specified icon |
|
JRadioButtonMenuItem(Icon icon,
boolean selected)
Creates a new JRadioButtonMenuItem with specified icon and given selected state |
|
JRadioButtonMenuItem(String text)
Creates a new JRadioButtonMenuItem with specified label |
|
JRadioButtonMenuItem(String text,
boolean selected)
Creates a new JRadioButtonMenuItem with specified label and marked selected if 'selected' is true. |
|
JRadioButtonMenuItem(String text,
Icon icon)
Creates a new JRadioButtonMenuItem with specified label and icon |
|
JRadioButtonMenuItem(String text,
Icon icon,
boolean selected)
Creates a new JRadioButtonMenuItem with specified label, icon and selected state. |
Method Summary | |
---|---|
AccessibleContext |
getAccessibleContext()
Returns the object that provides accessibility features for this JRadioButtonMenuItem component. |
String |
getUIClassID()
This method returns a name to identify which look and feel class will be the UI delegate for the menuItem. |
protected String |
paramString()
Returns a string describing the attributes for the JRadioButtonMenuItem component, for use in debugging. |
void |
requestFocus()
This method overrides JComponent.requestFocus with an empty implementation, since JRadioButtonMenuItems should not receve focus in general. |
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
- Icon to be used for this menu itempublic JRadioButtonMenuItem(String text)
text
- Label for this menu itempublic JRadioButtonMenuItem(Action action)
action
- Action for this menu itempublic JRadioButtonMenuItem(String text, Icon icon)
text
- Label for this menu itemicon
- Icon for this menu itempublic JRadioButtonMenuItem(String text, boolean selected)
text
- Text for this menu itemselected
- Selected state of this menu itempublic JRadioButtonMenuItem(Icon icon, boolean selected)
icon
- Icon for this menu itemselected
- Selected state for this menu itempublic JRadioButtonMenuItem(String text, Icon icon, boolean selected)
text
- Label for this menu itemicon
- Icon to be use for this menu itemselected
- selected state of this menu itemMethod Detail |
---|
public String getUIClassID()
getUIClassID
in class JMenuItem
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void requestFocus()
requestFocus
in class JComponent
Component.AccessibleAWTComponent.requestFocus()
protected String paramString()
JRadioButtonMenuItem
component, for use in debugging. The
return value is guaranteed to be non-null
, but the format of
the string may vary between implementations.
paramString
in class JMenuItem
JRadioButtonMenuItem
.public AccessibleContext getAccessibleContext()
JRadioButtonMenuItem
component.
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JMenuItem
JRadioButtonMenuItem.AccessibleJRadioButtonMenuItem
).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |