com.yospace.yae.yogi
Class RadioButtonGroup

java.lang.Object
  |
  +--com.yospace.yae.yogi.RadioButtonGroup

public class RadioButtonGroup
extends java.lang.Object

The RadioButtonGroup class is used to group together a set of YogiRadioButtons. Exactly one YogiRadioButton in a RadioButtonGroup can be selected at any given time. Selecting any YogiRadioButton sets its selected state to true and forces any other YogiRadioButton which is currently selected to false.

To create a new RadioButtonGroup, a reference to the Panelet with which this group is associated, and a String identifier, the ID, which is not the same as any other group's identifier associated with that Panelet, are required.


Method Summary
 java.lang.String getId()
          Accessor method for the ID of the radio button group.
 YogiRadioButton getSelectedRadioButton()
          Gets the currently selected YogiRadioButton from this group.
 void setSelectedRadioButton(YogiRadioButton button)
          Sets the currently selected YogiRadioButton in this group to be the specified YogiRadioButton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public java.lang.String getId()
Accessor method for the ID of the radio button group.
Returns:
the group's ID (unique within the context of the Panelet with which it is associated).

getSelectedRadioButton

public YogiRadioButton getSelectedRadioButton()
Gets the currently selected YogiRadioButton from this group. The return value will be the YogiRadioButton in this group that is currently selected or null if all YogiRadioButtons in the group are unselected.
Returns:
the YogiRadioButton that is currently selected, or null if none is selected.

setSelectedRadioButton

public void setSelectedRadioButton(YogiRadioButton button)
Sets the currently selected YogiRadioButton in this group to be the specified YogiRadioButton. This method sets the selected state of that check box to true and sets all other check boxes in the group to be false.

If the radio button argument is null, all radio buttons in this radio button group are deselected. If the radio button argument belongs to a different radio button group, this method does nothing.

Parameters:
button - the YogiRadioButton to set as selected.

Copyright 2002 Yospace Holdings Ltd. All Rights Reserved.