|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.aplu.jgamegrid.GGRadioButtonGroup
public class GGRadioButtonGroup
A radio button group contains a certain number of radio buttons. The group takes care of unselecting the previously selected button when the user selects another button in the group. Initially, if all buttons added to the group are deselected, no button is selected. When a selected button is added to the group, any previously selected button is deselected. A button should not be contained in more than one button group.
Constructor Summary | |
---|---|
GGRadioButtonGroup()
Creates a GGRadioButtonGroup instance that contains no button. |
|
GGRadioButtonGroup(GGRadioButton... radioButtons)
Creates a GGRadionButton instance that contains the given GGRadioButtons. |
Method Summary | |
---|---|
void |
add(GGRadioButton... radioButtons)
Adds the given GGRadioButtons to the group. |
void |
add(GGRadioButton radioButton)
Adds the given GGRadioButton to the group. |
void |
addRadioButtonListener(GGRadioButtonListener listener)
Registers the given GGRadioButtonListener to get notifications when the currently selected button changes because the user clicks another button. |
java.util.ArrayList<GGRadioButton> |
getButtons()
Returns a list of all buttons added to the group. |
GGRadioButton |
getSelectedButton()
Returns the currently selected button. |
int |
getSelectedButtonId()
Returns the id of the currently selected button. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GGRadioButtonGroup()
public GGRadioButtonGroup(GGRadioButton... radioButtons)
radioButtons
- the GGRadioButtons to be added to the groupMethod Detail |
---|
public void add(GGRadioButton... radioButtons)
radioButtons
- the GGRadioButtons to be added to the grouppublic void add(GGRadioButton radioButton)
radioButton
- the GGRadioButton to be added to the grouppublic GGRadioButton getSelectedButton()
public int getSelectedButtonId()
public java.util.ArrayList<GGRadioButton> getButtons()
public void addRadioButtonListener(GGRadioButtonListener listener)
listener
- the GGRadioButtonListener to register
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |