Class w3c.tools.forms.OptionField
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.forms.OptionField

java.lang.Object
   |
   +----w3c.tools.forms.FormField
           |
           +----w3c.tools.forms.OptionField

public class OptionField
extends FormField

Constructor Index

 o OptionField(FormManager, String, String, String[], int)
Create an option field.

Method Index

 o acceptChange(int)
Do we accept to change to the given (valid) index ?
 o getEditor()
Get an editor to edit this option's value.
 o getIntValue()
Get the selected option as its index in our array of options.
 o getStringValue()
Get the selected option as a String.
 o getValue()
Get this field's value in its native type.
 o setValue(int, boolean, boolean)
Set this option's value.
 o setValue(Object, boolean, boolean)
Set this option's value.
 o setValue(String, boolean, boolean)
Set this option's value.

Constructors

 o OptionField
  public OptionField(FormManager manager,
                     String name,
                     String title,
                     String options[],
                     int value) throws IllegalFieldValueException
Create an option field.

Methods

 o acceptChange
  public boolean acceptChange(int idx)
Do we accept to change to the given (valid) index ?
 o getValue
  public Object getValue()
Get this field's value in its native type.
Returns:
The currently selected option as a String.
Overrides:
getValue in class FormField
 o getIntValue
  public int getIntValue()
Get the selected option as its index in our array of options.
 o getStringValue
  public String getStringValue()
Get the selected option as a String.
 o setValue
  public void setValue(Object value,
                       boolean notify,
                       boolean update) throws IllegalFieldValueException
Set this option's value.
Parameters:
value - The new value.
update - Should we update the editor view.
Overrides:
setValue in class FormField
 o setValue
  public void setValue(int idx,
                       boolean notify,
                       boolean update) throws IllegalFieldValueException
Set this option's value.
Parameters:
idx - The index of the option to set.
update - Should we update our editor's view.
 o setValue
  public void setValue(String value,
                       boolean notify,
                       boolean update) throws IllegalFieldValueException
Set this option's value.
 o getEditor
  public Component getEditor()
Get an editor to edit this option's value.
Overrides:
getEditor in class FormField

All Packages  Class Hierarchy  This Package  Previous  Next  Index