    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.tools.forms.DoubleField

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

public class DoubleField
extends FormField

##

DoubleField(FormManager, String, String)
  Create a new uninitialized double field.
DoubleField(FormManager, String, String, Double)
  Create a new double field.

##

acceptChange(Double)
  Do we want to accept this new value ?
getDoubleValue()
  Get this field's value as a Double.
getEditor()
  Get an editor for this field.
getValue()
  Get this field's value in its native format (ie Double).
setValue(Double, boolean, boolean)
  Set this field's value to the given Double value.
setValue(Object, boolean, boolean)
  Set this field's value to thegiven object.

##

DoubleField

      public DoubleField(FormManager manager,
                         String name,
                         String title,
                         Double value) throws IllegalFieldValueException

  Create a new double field.
  Parameters:
    manager - The associated form manager.
    name - The name for this field.
    title - This field's title.
    value - The initial value for the field.
  Throws: IllegalFieldValueException
    If the default value isn't accepted by the field.

DoubleField

      public DoubleField(FormManager manager,
                         String name,
                         String title)

  Create a new uninitialized double field.
  Parameters:
    manager - The asociated form manager.
    name - The field's name.
    title - The field's title.

##

acceptChange

      public boolean acceptChange(Double dval)

  Do we want to accept this new value ?
  Returns:
    A boolean, true if we accept this new value.

getValue

      public Object getValue()

  Get this field's value in its native format (ie Double).
  Returns:
    An instance of Double.
  Overrides:
    getValue in class FormField

getDoubleValue

      public Double getDoubleValue()

  Get this field's value as a Double.
  Returns:
    An instance of Double.

setValue

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

  Set this field's value to thegiven object.
  Parameters:
    value - The new value for the field.
    update - Should the editor updates its view ?
  Throws: IllegalFieldValueException
    If the provided value is not a Double object.
  Overrides:
    setValue in class FormField

setValue

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

  Set this field's value to the given Double value.
  Parameters:
    value - The double value to set the field to.
    update - Should the editor updates its view ?
  Throws: IllegalFieldValueException
    If the value couldn't be set.

getEditor

      public Component getEditor()

  Get an editor for this field.
  Overrides:
    getEditor in class FormField

    All Packages  Class Hierarchy  This Package  Previous  Next  Index