buoy.widget
Class RadioButtonGroup
public class RadioButtonGroup
A RadioButtonGroup manages a set of
BRadioButtons
and
BRadioButtonMenuItems
. It ensures that only
one member of the group is selected at any time. It provides methods for determining which member
is currently selected, and for changing the selection.
RadioButtonGroup extends
EventSource
. It generates a
SelectionChangedEvent
whenever the user changes the selected radio button. Therefore, you can simply add an event
link to a RadioButtonGroup, rather than adding one to each radio button independently.
Object | getRadioButton(int i) - Get the i'th radio button in this group.
|
int | getRadioButtonCount() - Get the number of members in this group.
|
Iterator | getRadioButtons() - Get an Iterator listing all members of the group.
|
Object | getSelection() - Get the currently selected radio button, or null if none is selected.
|
void | setSelection(Object sel) - Select a particular radio button, and deselect all others in the group.
|
RadioButtonGroup
public RadioButtonGroup()
Create a new RadioButtonGroup.
getRadioButton
public Object getRadioButton(int i)
Get the i'th radio button in this group.
getRadioButtonCount
public int getRadioButtonCount()
Get the number of members in this group.
getRadioButtons
public Iterator getRadioButtons()
Get an Iterator listing all members of the group.
getSelection
public Object getSelection()
Get the currently selected radio button, or null if none is selected.
setSelection
public void setSelection(Object sel)
Select a particular radio button, and deselect all others in the group.
Written by Peter Eastman.