    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

##

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

##

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

##

OptionField

     public OptionField(FormManager manager,
                        String name,
                        String title,
                        String options[],
                        int value) throws IllegalFieldValueException

  Create an option field.

##

acceptChange

     public boolean acceptChange(int idx)

  Do we accept to change to the given (valid) index ?

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

getIntValue

     public int getIntValue()

  Get the selected option as its index in our array of options.

getStringValue

     public String getStringValue()

  Get the selected option as a String.

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

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.

setValue

     public void setValue(String value,
                          boolean notify,
                          boolean update) throws IllegalFieldValueException

  Set this option's value.

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