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

Constructor Index

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

Method Index

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

Constructors

 o 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.
 o 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.

Methods

 o acceptChange
 public boolean acceptChange(Double dval)
Do we want to accept this new value ?

Returns:
A boolean, true if we accept this new value.
 o 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
 o getDoubleValue
 public Double getDoubleValue()
Get this field's value as a Double.

Returns:
An instance of Double.
 o 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
 o 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.
 o getEditor
 public Component getEditor()
Get an editor for this field.

Overrides:
getEditor in class FormField

All Packages  Class Hierarchy  This Package  Previous  Next  Index