org.w3c.tools.forms
Class IntegerField

java.lang.Object
  extended by org.w3c.tools.forms.FormField
      extended by org.w3c.tools.forms.IntegerField
Direct Known Subclasses:
RangedIntegerField

public class IntegerField
extends FormField

An editor for integer field.


Field Summary
 
Fields inherited from class org.w3c.tools.forms.FormField
manager, name, title
 
Constructor Summary
IntegerField(FormManager manager, java.lang.String name, java.lang.String title, int value)
           
IntegerField(FormManager manager, java.lang.String name, java.lang.String title, java.lang.Integer ival)
           
 
Method Summary
 boolean acceptChange(java.lang.Integer ival)
          Do we accept this new value as our setting ?
 java.awt.Component getEditor()
          Get an editor to edit this form field.
 int getIntValue()
          Get this field integer value.
 java.lang.Object getValue()
          Get our value, in its native type.
 void setValue(java.lang.Integer ival, boolean notify, boolean update)
          Set our value.
 void setValue(java.lang.Object value, boolean notify, boolean update)
          Set our value.
 
Methods inherited from class org.w3c.tools.forms.FormField
getName, getTitle, gotFocus, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerField

public IntegerField(FormManager manager,
                    java.lang.String name,
                    java.lang.String title,
                    java.lang.Integer ival)

IntegerField

public IntegerField(FormManager manager,
                    java.lang.String name,
                    java.lang.String title,
                    int value)
Method Detail

getEditor

public java.awt.Component getEditor()
Get an editor to edit this form field.


getIntValue

public int getIntValue()
Get this field integer value.

Returns:
The current field's value.

acceptChange

public boolean acceptChange(java.lang.Integer ival)
Do we accept this new value as our setting ?


getValue

public java.lang.Object getValue()
Get our value, in its native type.

Specified by:
getValue in class FormField

setValue

public void setValue(java.lang.Integer ival,
                     boolean notify,
                     boolean update)
              throws IllegalFieldValueException
Set our value.

Parameters:
value - The proposed value.
Throws:
IllegalFieldValueException - if the value isn't accepted

setValue

public void setValue(java.lang.Object value,
                     boolean notify,
                     boolean update)
              throws IllegalFieldValueException
Set our value.

Specified by:
setValue in class FormField
Parameters:
value - The proposed value.
notify - Should we notify the manager for this change ?
update - Update the editor view, if true.
Throws:
IllegalFieldValueException - if the value isn't accepted