buoy.widget
Class BRadioButtonMenuItem
- MenuWidget
public class BRadioButtonMenuItem
A BRadioButtonMenuItem is a menu item for selecting between several options. It is normally used as part
of a
RadioButtonGroup
. Each BRadioButtonMenuItem represents a single option. Choosing it from the menu
selects it, and deselects all other members of its RadioButtonGroup.
In addition to the event types generated by all Widgets, BRadioButtonMenuItems generate the following event types:
BRadioButtonMenuItem(String text, Icon image, boolean state, RadioButtonGroup group) - Create a new BRadioButtonMenuItem.
|
BRadioButtonMenuItem(String text, boolean state, RadioButtonGroup group) - Create a new BRadioButtonMenuItem.
|
BRadioButtonMenuItem(String text, Shortcut shortcut, Icon image, boolean state, RadioButtonGroup group) - Create a new BRadioButtonMenuItem.
|
BRadioButtonMenuItem(String text, Shortcut shortcut, boolean state, RadioButtonGroup group) - Create a new BRadioButtonMenuItem.
|
BRadioButtonMenuItem(RadioButtonGroup group) - Create a new BRadioButtonMenuItem with no label, which is initially deselected.
|
getActionCommand , getComponent , getIcon , getMnemonic , getShortcut , getText , setActionCommand , setIcon , setMnemonic , setShortcut , setText |
addEventLink , dispatchEvent , getBackground , getBounds , getComponent , getCursor , getFont , getMaximumSize , getMinimumSize , getName , getParent , getPreferredSize , hasFocus , isEnabled , isFocusable , isVisible , repaint , requestFocus , setBackground , setCursor , setEnabled , setFocusable , setFont , setName , setVisible |
BRadioButtonMenuItem
public BRadioButtonMenuItem(String text,
Icon image,
boolean state,
RadioButtonGroup group)
Create a new BRadioButtonMenuItem.
text
- the text to display on the BRadioButtonMenuItemimage
- the image to display next to the menu itemstate
- the initial selection state of the BRadioButtonMenuItemgroup
- the RadioButtonGroup this menu item is part of
BRadioButtonMenuItem
public BRadioButtonMenuItem(String text,
boolean state,
RadioButtonGroup group)
Create a new BRadioButtonMenuItem.
text
- the text to display on the BRadioButtonMenuItemstate
- the initial selection state of the BRadioButtonMenuItemgroup
- the RadioButtonGroup this menu item is part of
BRadioButtonMenuItem
public BRadioButtonMenuItem(String text,
Shortcut shortcut,
Icon image,
boolean state,
RadioButtonGroup group)
Create a new BRadioButtonMenuItem.
text
- the text to display on the BRadioButtonMenuItemshortcut
- a keyboard shortcut which will activate this menu itemimage
- the image to display next to the menu itemstate
- the initial selection state of the BRadioButtonMenuItemgroup
- the RadioButtonGroup this menu item is part of
BRadioButtonMenuItem
public BRadioButtonMenuItem(String text,
Shortcut shortcut,
boolean state,
RadioButtonGroup group)
Create a new BRadioButtonMenuItem.
text
- the text to display on the BRadioButtonMenuItemshortcut
- a keyboard shortcut which will activate this menu itemstate
- the initial selection state of the BRadioButtonMenuItemgroup
- the RadioButtonGroup this menu item is part of
BRadioButtonMenuItem
public BRadioButtonMenuItem(RadioButtonGroup group)
Create a new BRadioButtonMenuItem with no label, which is initially deselected.
group
- the RadioButtonGroup this menu item is part of
getGroup
public RadioButtonGroup getGroup()
Get the RadioButtonGroup this menu item is part of.
getState
public boolean getState()
Get the selection state of this menu item.
setGroup
public void setGroup(RadioButtonGroup newGroup)
Set the RadioButtonGroup this menu item is part of.
setState
public void setState(boolean selected)
Set the selection state of this menu item. If you set the selection state to true,
the state of every other member of its RadioButtonGroup will be set to false.
Written by Peter Eastman.