2004.04.29


com.jdc.gui.html.form
Class FormField

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.gui.html.form.FormField
Direct Known Subclasses:
TextField

public abstract class FormField
extends Object

FormField is the baseuser interface widget that creates an input field consisting of a label and an input entry field to be displayed to the user for user input.

An input field object consists of a text label, the input entry field, an optional comment or description (not yet implemented), as well as all the attributes for the input field. Note: The optional comment or description will display user instructions, i.e. 1 to 32 characters, 5 digits numeric, etc.

Version:
1.0
Author:
Jay Damon

Nested Class Summary
static interface FormField.Label
          Label contains Cascading Style Sheet class names for class FormField labels.
 
Field Summary
static int COLUMN
          The input field add column constant.
static String DISABLED
          A Cascading Style Sheet class style name representing a normal input field.
static String ENABLED
          A Cascading Style Sheet class style name representing a normal input field.
static String ERROR
          A Cascading Style Sheet class style name representing an input field error.
static String REQUIRED
          A Cascading Style Sheet class style name representing a required input field.
static int ROW
          The input field add row (and column) constant.
static String WARNING
          A Cascading Style Sheet class style name representing an input field warning.
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
FormField()
          Constructs a new FormField object.
 
Method Summary
 void add(int tag)
          Sets the flag(s) to add table row and/or column tags to the input field.
protected  Type getType()
          Returns the input field type.
protected  boolean isAddColumn()
          Returns true if table column tags are to be added to the input field.
protected  boolean isAddRow()
          Returns true if table row (and column) tags are to be added to the input field.
abstract  boolean isChanged()
          Returns true if the input field value entered by the user has changed.
abstract  boolean isError()
          Returns true if the input field value entered by the user is in error.
abstract  void reset()
          Reset the input field, i.e.
protected  void setType(Type type)
          Sets the input field type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLED

public static final String ENABLED
A Cascading Style Sheet class style name representing a normal input field.

See Also:
Constant Field Values

DISABLED

public static final String DISABLED
A Cascading Style Sheet class style name representing a normal input field.

See Also:
Constant Field Values

REQUIRED

public static final String REQUIRED
A Cascading Style Sheet class style name representing a required input field.

See Also:
Constant Field Values

WARNING

public static final String WARNING
A Cascading Style Sheet class style name representing an input field warning.

See Also:
Constant Field Values

ERROR

public static final String ERROR
A Cascading Style Sheet class style name representing an input field error.

See Also:
Constant Field Values

COLUMN

public static final int COLUMN
The input field add column constant.

See Also:
Constant Field Values

ROW

public static final int ROW
The input field add row (and column) constant.

See Also:
Constant Field Values
Constructor Detail

FormField

public FormField()
Constructs a new FormField object.

Method Detail

add

public void add(int tag)
Sets the flag(s) to add table row and/or column tags to the input field.


getType

protected Type getType()
Returns the input field type.

Returns:
The input field type.

isAddColumn

protected boolean isAddColumn()
Returns true if table column tags are to be added to the input field.

Returns:
boolean

isAddRow

protected boolean isAddRow()
Returns true if table row (and column) tags are to be added to the input field.

Returns:
boolean

isChanged

public abstract boolean isChanged()
Returns true if the input field value entered by the user has changed.

Returns:
boolean

isError

public abstract boolean isError()
Returns true if the input field value entered by the user is in error.

Returns:
boolean

reset

public abstract void reset()
Reset the input field, i.e. reset error and warning flags and messages.


setType

protected void setType(Type type)
Sets the input field type.


2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.