com.swfit.core.xhtml
Class XHTMLField

java.lang.Object
  |
  +--com.swfit.core.tree.TreeElement
        |
        +--com.swfit.core.tree.TreeLeaf
              |
              +--com.swfit.core.xhtml.XHTMLField

public class XHTMLField
extends TreeLeaf

A representation of XHTML form fields.

Since:
SWFIT1.0
Version:
$Revision: 1.1 $ $Date: 2003/02/02 20:47:25 $
Author:
Olaf Havnes

Field Summary
static int CHECK_BOX
          The fields.
static int DEFAULT_FIELD
          The fields.
static java.lang.String[] FIELDS
           
static int FILE_FIELD
          The fields.
static int HIDDEN_FIELD
          The fields.
static int MULTI_LIST
          The fields.
static int OPTION_LIST
          The fields.
static int PASSWORD_FIELD
          The fields.
static int PLAIN_TEXT
          The fields.
static int RADIO_BUTTON
          The fields.
static int SUBMIT_FIELD
          The fields.
static int TEXT_AREA
          The fields.
static int TEXT_FIELD
          The fields.
static java.lang.String TREE_CODE
           
 
Fields inherited from class com.swfit.core.tree.TreeElement
CODE, NUM_OWNED, OWNED, SEPARATOR
 
Constructor Summary
XHTMLField(java.lang.String name)
          Build a XHTMLField with a given name.
 
Method Summary
 java.lang.String code()
          Describe this TreeElement in a way that will make it possible to rebuild the tree
 void copyDataTo(XHTMLField copy_to)
           
 void copyRenderDataTo(XHTMLField copy_to)
           
static XHTMLField create(java.lang.String name, int field, int style, int index)
          Some static utilities.
 XHTMLField deepCopy()
          Copy this field to various degrees
 XHTMLField deepCopy(java.lang.String new_name)
           
 XHTMLField deepCopy(java.lang.String new_name, TreeBranch new_owner)
           
 XHTMLField deepCopy(TreeBranch new_owner)
           
 int field()
          What kind of field is this ?
 java.lang.String fieldValue()
          If we ask for a single value, we get the first one, if any.
 java.lang.String[] fieldValues()
          The values taking into account that fields behave differently.
 boolean readonly()
          Is this field readonly ?
 boolean[] selected()
          The selected values of this field.
 void setField(int field)
           
 void setField(java.lang.String code)
           
 void setReadonly(boolean readonly)
           
 void setSelected(java.lang.String selected)
           
 void setSelected(java.lang.String[] selected)
           
 void setStyle(int style)
           
 void setSubmittor(boolean submittor)
           
 void setText(java.lang.String text)
           
 void setTexts(java.lang.String[] texts)
           
 void setValue(java.lang.String value)
           
 void setValues(java.lang.String[] values)
           
 java.lang.String style()
          What kind of style has this field? NB: I previously used an underscore here, but that seems to be an illegal character, has been replaced with a dash.
 boolean submittor()
          Should this field fire off a javascript form.submit() command on change ?
 java.lang.String text()
          Return a single text describing the value for this field
 java.lang.String[] texts()
          The texts describing the values of this field - in case the actual values do not tell the user anything
 java.lang.String value()
          Return a single value for this field
 java.lang.String[] values()
          The values of this field
 
Methods inherited from class com.swfit.core.tree.TreeElement
codeName, explainer, horizontal, index, name, owner, setExplainer, setHorizontal, setIndex, setOwner, toTreeBranch, toTreeElement, toTreeLeaf, treeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIDDEN_FIELD

public static final int HIDDEN_FIELD
The fields.

TEXT_FIELD

public static final int TEXT_FIELD
The fields.

TEXT_AREA

public static final int TEXT_AREA
The fields.

PASSWORD_FIELD

public static final int PASSWORD_FIELD
The fields.

CHECK_BOX

public static final int CHECK_BOX
The fields.

RADIO_BUTTON

public static final int RADIO_BUTTON
The fields.

OPTION_LIST

public static final int OPTION_LIST
The fields.

MULTI_LIST

public static final int MULTI_LIST
The fields.

SUBMIT_FIELD

public static final int SUBMIT_FIELD
The fields.

PLAIN_TEXT

public static final int PLAIN_TEXT
The fields.

FILE_FIELD

public static final int FILE_FIELD
The fields.

DEFAULT_FIELD

public static final int DEFAULT_FIELD
The fields.

FIELDS

public static final java.lang.String[] FIELDS

TREE_CODE

public static final java.lang.String TREE_CODE
Constructor Detail

XHTMLField

public XHTMLField(java.lang.String name)
Build a XHTMLField with a given name.
Method Detail

create

public static final XHTMLField create(java.lang.String name,
                                      int field,
                                      int style,
                                      int index)
Some static utilities.

deepCopy

public final XHTMLField deepCopy()
Copy this field to various degrees

deepCopy

public final XHTMLField deepCopy(java.lang.String new_name)

deepCopy

public final XHTMLField deepCopy(TreeBranch new_owner)

deepCopy

public final XHTMLField deepCopy(java.lang.String new_name,
                                 TreeBranch new_owner)

copyDataTo

public final void copyDataTo(XHTMLField copy_to)

copyRenderDataTo

public final void copyRenderDataTo(XHTMLField copy_to)

values

public final java.lang.String[] values()
The values of this field

setValues

public final void setValues(java.lang.String[] values)

setValue

public final void setValue(java.lang.String value)

value

public final java.lang.String value()
Return a single value for this field

selected

public final boolean[] selected()
The selected values of this field. (Store them as Strings, while returning an array of booleans that match the values array.)

setSelected

public final void setSelected(java.lang.String[] selected)

setSelected

public final void setSelected(java.lang.String selected)

fieldValues

public final java.lang.String[] fieldValues()
The values taking into account that fields behave differently. For fi an option list, the values need to be selected to be valid.

fieldValue

public final java.lang.String fieldValue()
If we ask for a single value, we get the first one, if any.

texts

public final java.lang.String[] texts()
The texts describing the values of this field - in case the actual values do not tell the user anything

setTexts

public final void setTexts(java.lang.String[] texts)

setText

public final void setText(java.lang.String text)

text

public final java.lang.String text()
Return a single text describing the value for this field

code

public final java.lang.String code()
Describe this TreeElement in a way that will make it possible to rebuild the tree
Overrides:
code in class TreeElement

field

public final int field()
What kind of field is this ?

setField

public final void setField(int field)

setField

public final void setField(java.lang.String code)

style

public final java.lang.String style()
What kind of style has this field? NB: I previously used an underscore here, but that seems to be an illegal character, has been replaced with a dash.

setStyle

public final void setStyle(int style)

submittor

public final boolean submittor()
Should this field fire off a javascript form.submit() command on change ?

setSubmittor

public final void setSubmittor(boolean submittor)

readonly

public final boolean readonly()
Is this field readonly ?

setReadonly

public final void setReadonly(boolean readonly)


Swfit developer homepage
Copyright © 2003 Orgdot AS. All Rights Reserved.