java.lang.Object | +--com.sun.kjava.RadioGroup
An object representing a group of RadioButtons. At most one RadioButton in a RadioGroup can be selected at one time.
RadioButton
Constructor Summary | |
RadioGroup(int numButtons)
Create a new RadioGroup. |
Method Summary | |
void |
add(RadioButton theButton)
Add a RadioButton to the RadioGroup. |
RadioButton |
buttonAt(int i)
Get the RadioButton at an index. |
RadioButton |
getSelected()
Get the currently selected RadioButton. |
boolean |
hasSelection()
Is any one of the RadioButtons in the group selected? |
void |
setSelected(RadioButton theButton)
Set the currently-selected RadioButton. |
int |
size()
How many RadioButtons in this group? |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RadioGroup(int numButtons)
numButtons
- the number of RadioButtons it will containMethod Detail |
public void add(RadioButton theButton)
theButton
- the RadioButton to addpublic RadioButton buttonAt(int i)
i
- the index of the RadioButton to returnpublic void setSelected(RadioButton theButton)
theButton
- the RadioButton to selectpublic RadioButton getSelected()
public boolean hasSelection()
public int size()