org.jscience.sociology.forms
Class RadioButton

java.lang.Object
  extended by org.jscience.sociology.forms.FormElement
      extended by org.jscience.sociology.forms.ChoiceBox
          extended by org.jscience.sociology.forms.RadioButton
All Implemented Interfaces:
java.io.Serializable

public class RadioButton
extends ChoiceBox

This class extends ChoiceBox and represents the radiobutton field.

See Also:
FormElement, ChoiceBox, Serialized Form

Constructor Summary
RadioButton()
           
 
Method Summary
 java.lang.String chosen(java.lang.String value)
          Will return "checked" or "".
 
Methods inherited from class org.jscience.sociology.forms.ChoiceBox
addToValues
 
Methods inherited from class org.jscience.sociology.forms.FormElement
getErrorMessage, getName, getValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadioButton

public RadioButton()
Method Detail

chosen

public java.lang.String chosen(java.lang.String value)
Will return "checked" or "". In case the choice represented by value is unchecked, the empty string will be returned.

This method is used in the presentation layer of this API.

This method is internally used by generateXML() and generateXmlAsString() methods of class Form.

Specified by:
chosen in class ChoiceBox
Parameters:
value - the value of the RadioButton item whose status is returned by this method.
Returns:
"checked" or "".