Class w3c.tools.forms.FormManager
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.forms.FormManager

java.lang.Object
   |
   +----w3c.tools.forms.FormManager

public class FormManager
extends Object

Variable Index

 o cursor
The current field being edited, as an index in our fields.
 o fields
Our list of fields, at runtime.
 o finished
Is this form description completed ?
 o panel
The form grphical UI.
 o title
The form's title.
 o vfields
Our list of field, at description time.

Constructor Index

 o FormManager(String)
Create a new, empty form.

Method Index

 o addField(FormField)
Add a field to the form.
 o createPanel()
Construct the Panel to edit the form.
 o finish()
Mark the description of the form as completed.
 o getPanel()
Get the graphical object for editing the form.
 o gotFocus(FormField)
Some of our field got the focus, update our cursor.
 o gotoField(int)
Move to the field whose index is given.
 o main(String[])
Test.
 o nextField()
Move the focus to the next editable field.
 o notifyChange(FormField)
Callback for field value's change.

Variables

 o vfields
  protected Vector vfields
Our list of field, at description time.
 o fields
  protected FormField fields[]
Our list of fields, at runtime.
 o cursor
  protected int cursor
The current field being edited, as an index in our fields.
 o finished
  protected boolean finished
Is this form description completed ?
 o title
  protected String title
The form's title.
 o panel
  protected FormPanel panel
The form grphical UI.

Constructors

 o FormManager
  public FormManager(String title)
Create a new, empty form.
Parameters:
title - The form's title.

Methods

 o notifyChange
  public void notifyChange(FormField field)
Callback for field value's change.
Parameters:
field - The field that changed.
 o createPanel
  protected FormPanel createPanel()
Construct the Panel to edit the form.
Returns:
A Panel instance, layed out for this form edition.
 o gotoField
  public void gotoField(int idx)
Move to the field whose index is given.
Parameters:
n - The field to move to.
 o nextField
  public void nextField()
Move the focus to the next editable field.
 o gotFocus
  protected void gotFocus(FormField field)
Some of our field got the focus, update our cursor.
Parameters:
field - The field that now has the focus.
 o addField
  public void addField(FormField field)
Add a field to the form.
Parameters:
name - The field name (the key by wich this field will be accessible.)
field - The field to be created.
 o finish
  public void finish()
Mark the description of the form as completed. Once this method is called, no more fields can be added to the form. This method will perform any required compilation of the form.
 o getPanel
  public Panel getPanel()
Get the graphical object for editing the form.
 o main
  public static void main(String args[]) throws IllegalFieldValueException
Test.

All Packages  Class Hierarchy  This Package  Previous  Next  Index