radiobuttongroup
RadioButtonGroup Class
-
Manages the interaction between any number of Button derived classes
-
Provides the abstract method onSelect for executing code when a Radio Button is selected by the user.
Sample Usage:
/** Parameters:
* Screen screen,
* String UID,
* Form form
*/
RadioButtonGroup rbg = new RadioButtonGroup(screen, "rbg") {
@Override
public void onSelect(int index, Button value) {
System.out.println((String)value);
}
};
/** Parameters:
* Vector2f position
* String caption
* Object value
*/
rbg.addButton(new ButtonAdapter(screen, new Vector2f(10,10));
rbg.addButton(new CheckBox(screen, new Vector2f(10,30));
rbg.addButton(new RadioButton(screen, new Vector2f(10,50));
rbg.setDisplayElement(null); // null adds the button list to the screen layer