com.partnersoft.gui.forms
Class FormBuilder

java.lang.Object
  extended by com.partnersoft.gui.GUIBuilder
      extended by com.partnersoft.gui.forms.FormBuilder

public class FormBuilder
extends GUIBuilder

A schema- and Forms-aware GUI building tool.

FormBuilder inherits from GUIBuilder and has all of its layout and component-adding tools. It also manages a Form, and adds FormFields to the form while also adding them to the layout. Convenience methods abound, but of particular note are the schema-aware methods of the form add*BySchema() and buildStandard*BySchema() methods. These make it easy to generate basic data-entry forms for predefined CogSchemas.

Copyright 2008-2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
FormBuilder()
           
FormBuilder(java.awt.Container starterPanel)
           
 
Method Summary
 FormButton addButton(java.lang.String label, java.lang.String actionMethod)
          This adds a button with the specified label, that calls the named method on the action handler.
 FormButton addButton(java.lang.String label, java.lang.String actionMethod, java.lang.Object layoutInfo)
          This adds a button with the specified label, that calls the named method on the action handler.
 FormCheckboxField addCheckboxField(java.lang.String name)
          Adds a checkbox field with the given name, with no layout info.
 FormCheckboxField addCheckboxField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a checkbox field with the given name, with the specified layout info.
 FormColorField addColorField(java.lang.String name)
           
 FormColorField addColorField(java.lang.String name, java.lang.Object fieldLayoutInfo)
           
 FormComboField addComboField(java.lang.String name, java.util.Collection items)
          Adds a combo box field with the given name and collection of possibilities, with no layout info.
 FormComboField addComboField(java.lang.String name, java.util.Collection items, java.lang.Object fieldLayoutInfo)
          Adds a combo box field with the given name and collection of possibilities, with the specified layout info.
 FormComboField addComboFieldWithValues(java.lang.String name, java.lang.String... values)
           
 void addComponent(java.awt.Component component, java.lang.Object layoutInfo)
           
 FormDateAndTimeField addDateAndTimeField(java.lang.String name)
          Adds a date field with the given name, with no layout info.
 FormDateAndTimeField addDateAndTimeField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a date field with the given name, with the specified layout info.
 FormDateField addDateField(java.lang.String name)
          Adds a date field with the given name, with no layout info.
 FormDateField addDateField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a date field with the given name, with the specified layout info.
 FormDurationField addDurationField(java.lang.String name)
           
 FormDurationField addDurationField(java.lang.String name, java.lang.Object fieldLayoutInfo)
           
 FormField addField(java.lang.String name, FormField field)
          Adds the given FormField component, associated with the given field name, with no layout info.
 FormField addField(java.lang.String name, FormField field, java.lang.Object layoutInfo)
          Adds the given FormField component, associated with the given field name and layout info.
 FormField addField(java.lang.String name, java.lang.String fieldType)
          Acts like addFOOField for the given fieldType "FOO".
 FormField addField(java.lang.String name, java.lang.String fieldType, int size, java.lang.Object layoutInfo)
          Acts like addFOOField for the given fieldType "FOO".
 FormField addField(java.lang.String name, java.lang.String fieldType, java.lang.Object layoutInfo)
          Acts like addFOOField for the given fieldType "FOO".
 FormField addFieldBySchema(CogStructureField field)
          Adds the given field, with the correct type and description based on the schema.
 FormField addFieldBySchema(CogStructureField field, java.lang.Object layoutInfo)
          Adds the given field, with the correct type and description, using the given layout info.
 FormField addFieldBySchema(java.lang.String fieldName)
          Adds the given field, with the correct type and description based on the schema.
 FormField addFieldBySchema(java.lang.String fieldName, java.lang.Object layoutInfo)
          Adds the given field, with the correct type and description, using the given layout info.
 FormFilePathField addFilePathField(java.lang.String name)
          Adds a filename field with the given name, with no layout info.
 FormFilePathField addFilePathField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a filename field with the given name, with the specified layout info.
 FormFilePathListField addFilePathListField(java.lang.String name)
           
 FormFilePathListField addFilePathListField(java.lang.String name, java.lang.Object fieldLayoutInfo)
           
 FormIntegerField addIntegerField(java.lang.String name)
          Adds a Integer field with the given name, with no layout info.
 FormIntegerField addIntegerField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a Integer field with the given name, with the specified layout info.
 void addLabelAndFieldBySchema(CogStructureField field)
          Adds the given field along with its label (label first).
 void addLabelAndFieldBySchema(java.lang.String fieldName)
          Adds the given field along with its label (label first).
 javax.swing.JLabel addLabelBySchema(CogStructureField field)
          Adds the given field's label as listed in the schema.
 javax.swing.JLabel addLabelBySchema(CogStructureField field, java.lang.Object layoutInfo)
          Adds the given field's label as listed in the schema, using the given layout info.
 javax.swing.JLabel addLabelBySchema(java.lang.String fieldName)
          Adds the given field's label as listed in the schema.
 javax.swing.JLabel addLabelBySchema(java.lang.String fieldName, java.lang.Object layoutInfo)
          Adds the given field's label as listed in the schema, using the given layout info.
 FormNamedBlobField addNamedBlobField(java.lang.String name)
           
 FormNamedBlobField addNamedBlobField(java.lang.String name, java.lang.Object fieldLayoutInfo)
           
 FormNumberField addNumberField(java.lang.String name)
          Adds a Number field with the given name, with no layout info.
 FormNumberField addNumberField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a Number field with the given name, with the specified layout info.
 FormPasswordField addPasswordField(java.lang.String name)
          Adds a password field with the given name, with no layout info.
 FormPasswordField addPasswordField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a password field with the given name, with the specified layout info.
 FormPicklistField addPicklistField(java.lang.String name, java.util.Collection items)
          Adds a picklist field with the given name and collection of possibilities, with no layout info.
 FormPicklistField addPicklistField(java.lang.String name, java.util.Collection items, java.lang.Object fieldLayoutInfo)
          Adds a picklist field with the given name and collection of possibilities, with the specified layout info.
 FormPicklistField addPicklistFieldWithValues(java.lang.String name, java.lang.String... values)
           
 FormRandomIntegerField addRandomIntegerField(java.lang.String name, int size)
          Adds a randomizeable Integer field with the given name, with no layout info.
 FormRandomIntegerField addRandomIntegerField(java.lang.String name, int size, java.lang.Object fieldLayoutInfo)
          Adds a randomizable Integer field with the given name, with the specified layout info.
 FormReadOnlyStringField addReadOnlyStringField(java.lang.String name)
          Adds a read-only string field with the given name, with no layout info.
 FormReadOnlyStringField addReadOnlyStringField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a string field with the given name, with the specified layout info.
 FormStringField addStringField(java.lang.String name)
          Adds a string field with the given name, with no layout info.
 FormStringField addStringField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a string field with the given name, with the specified layout info.
 FormField addSubformFieldBySchema(java.lang.String path, CogStructureField field)
          Adds the given field, with the correct type and description based on the schema.
 FormField addSubformFieldBySchema(java.lang.String path, CogStructureField field, java.lang.Object layoutInfo)
          Adds the given field, with the correct type and description, using the given layout info.
 void addSubformLabelAndFieldBySchema(java.lang.String path, CogStructureField field)
          Adds the given field along with its label (label first).
 FormTextField addTextField(java.lang.String name)
          Adds a string field with the given name, with no layout info.
 FormTextField addTextField(java.lang.String name, int columns, int rows)
          Adds a string field with the given name, with no layout info.
 FormTextField addTextField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a string field with the given name, with the specified layout info.
 FormTextField addTextField(java.lang.String name, java.lang.Object fieldLayoutInfo, int columns, int rows)
          Adds a string field with the given name, with the specified layout info.
 FormTimeField addTimeField(java.lang.String name)
          Adds a date field with the given name, with no layout info.
 FormTimeField addTimeField(java.lang.String name, java.lang.Object fieldLayoutInfo)
          Adds a date field with the given name, with the specified layout info.
 void buildStandardTabbedLayout(boolean scrollable, java.lang.String... tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayout(java.lang.String... tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayoutBySchema()
          This does a standard layout with tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayoutBySchema(boolean scrollable)
          This does a standard layout with tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayoutBySchema(boolean scrollable, java.util.List<java.lang.String> tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayoutBySchema(java.util.List<java.lang.String> tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void buildSubformBySchema(java.lang.String fieldName)
          This does a standard layout with tabs, based on the fields.csv tab entries.
 void buildSubformBySchema(java.lang.String fieldName, java.util.List<java.lang.String> tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void defineCustomField(java.lang.String name, FormField field)
          Adds the given field as a custom implementation.
 Form finishForm()
           
static FormBuilder forScrollPane()
          Convenience factory method to generate a form builder for a scroll pane.
static FormBuilder forTabbedPane()
          Convenience factory method to generate a form builder for a tabbed pane.
 CogStructureType getEditedType()
           
 java.lang.String getEditedTypeName()
           
 Form getForm()
          Returns the Form object.
 CogSchema getSchema()
          Gets the current CogSchema used by this FormBuilder.
 FormField removeField(java.lang.String name, FormField field)
           
 void replaceField(java.lang.String name, FormField newField)
           
 void setActionMethodProvider(java.lang.Object newProvider)
          Sets the action method provider for the form.
 void setEditedType(CogStructureType newType)
           
 void setEditedTypeName(java.lang.String string)
           
 void setSchema(CogSchema newSchema)
          Set the CogSchema used by this FormBuilder.
 
Methods inherited from class com.partnersoft.gui.GUIBuilder
addBorder, addBorder, addComponent, addLabel, addLabel, addLowFatLabel, addLowFatLabel, endPanel, finish, getBackgroundColor, getCurrentPanel, getFont, getForegroundColor, getLabelHorizontalAlignment, getLabelVerticalAlignment, layoutBorder, layoutBox, layoutCard, layoutCentered, layoutFlow, layoutFlow, layoutForm, layoutGrid, layoutGrid, layoutGridBag, layoutGroup, layoutNewspaper, layoutNewspaper, layoutStretchAndStack, setBackgroundColor, setFont, setForegroundColor, setLabelHorizontalAlignment, setLabelVerticalAlignment, setLayout, startContainer, startContainer, startHorizontallySplitPane, startHorizontallySplitPane, startLayeredPane, startLayeredPane, startPanel, startPanel, startScrollPane, startScrollPane, startTabbedPane, startTabbedPane, startVerticallySplitPane, startVerticallySplitPane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormBuilder

public FormBuilder(java.awt.Container starterPanel)

FormBuilder

public FormBuilder()
Method Detail

forTabbedPane

public static FormBuilder forTabbedPane()
Convenience factory method to generate a form builder for a tabbed pane.


forScrollPane

public static FormBuilder forScrollPane()
Convenience factory method to generate a form builder for a scroll pane.


setActionMethodProvider

public void setActionMethodProvider(java.lang.Object newProvider)
Sets the action method provider for the form. This object provides the methods used by form buttons to do their dirty work.


defineCustomField

public void defineCustomField(java.lang.String name,
                              FormField field)
Adds the given field as a custom implementation. The various buildStandardFoo() methods will then prefer this field instead of whatever they would build on their own. Does not actually add the field to the form, however.


addFieldBySchema

public FormField addFieldBySchema(java.lang.String fieldName)
Adds the given field, with the correct type and description based on the schema.


addFieldBySchema

public FormField addFieldBySchema(java.lang.String fieldName,
                                  java.lang.Object layoutInfo)
Adds the given field, with the correct type and description, using the given layout info.

Returns:

addFieldBySchema

public FormField addFieldBySchema(CogStructureField field)
Adds the given field, with the correct type and description based on the schema.


addFieldBySchema

public FormField addFieldBySchema(CogStructureField field,
                                  java.lang.Object layoutInfo)
Adds the given field, with the correct type and description, using the given layout info.

Returns:

addSubformFieldBySchema

public FormField addSubformFieldBySchema(java.lang.String path,
                                         CogStructureField field)
Adds the given field, with the correct type and description based on the schema.


addSubformFieldBySchema

public FormField addSubformFieldBySchema(java.lang.String path,
                                         CogStructureField field,
                                         java.lang.Object layoutInfo)
Adds the given field, with the correct type and description, using the given layout info.

Returns:

addLabelBySchema

public javax.swing.JLabel addLabelBySchema(java.lang.String fieldName)
Adds the given field's label as listed in the schema.

Returns:

addLabelBySchema

public javax.swing.JLabel addLabelBySchema(java.lang.String fieldName,
                                           java.lang.Object layoutInfo)
Adds the given field's label as listed in the schema, using the given layout info.

Returns:

addLabelBySchema

public javax.swing.JLabel addLabelBySchema(CogStructureField field)
Adds the given field's label as listed in the schema.

Returns:

addLabelBySchema

public javax.swing.JLabel addLabelBySchema(CogStructureField field,
                                           java.lang.Object layoutInfo)
Adds the given field's label as listed in the schema, using the given layout info.

Returns:

addLabelAndFieldBySchema

public void addLabelAndFieldBySchema(java.lang.String fieldName)
Adds the given field along with its label (label first).


addLabelAndFieldBySchema

public void addLabelAndFieldBySchema(CogStructureField field)
Adds the given field along with its label (label first).


addSubformLabelAndFieldBySchema

public void addSubformLabelAndFieldBySchema(java.lang.String path,
                                            CogStructureField field)
Adds the given field along with its label (label first).


buildStandardTabbedLayoutBySchema

public void buildStandardTabbedLayoutBySchema()
This does a standard layout with tabs, based on the fields.csv tab entries.


buildStandardTabbedLayout

public void buildStandardTabbedLayout(java.lang.String... tabs)
This does a standard layout with just the named tabs, based on the fields.csv tab entries.


buildStandardTabbedLayoutBySchema

public void buildStandardTabbedLayoutBySchema(java.util.List<java.lang.String> tabs)
This does a standard layout with just the named tabs, based on the fields.csv tab entries.


buildStandardTabbedLayoutBySchema

public void buildStandardTabbedLayoutBySchema(boolean scrollable)
This does a standard layout with tabs, based on the fields.csv tab entries.


buildStandardTabbedLayout

public void buildStandardTabbedLayout(boolean scrollable,
                                      java.lang.String... tabs)
This does a standard layout with just the named tabs, based on the fields.csv tab entries.


buildStandardTabbedLayoutBySchema

public void buildStandardTabbedLayoutBySchema(boolean scrollable,
                                              java.util.List<java.lang.String> tabs)
This does a standard layout with just the named tabs, based on the fields.csv tab entries.


buildSubformBySchema

public void buildSubformBySchema(java.lang.String fieldName)
This does a standard layout with tabs, based on the fields.csv tab entries.


buildSubformBySchema

public void buildSubformBySchema(java.lang.String fieldName,
                                 java.util.List<java.lang.String> tabs)
This does a standard layout with just the named tabs, based on the fields.csv tab entries.


finishForm

public Form finishForm()

addButton

public FormButton addButton(java.lang.String label,
                            java.lang.String actionMethod)
This adds a button with the specified label, that calls the named method on the action handler. The label goes on the button itself (there is no separate label as with the addField functions). No layout info is used.


addButton

public FormButton addButton(java.lang.String label,
                            java.lang.String actionMethod,
                            java.lang.Object layoutInfo)
This adds a button with the specified label, that calls the named method on the action handler. The label goes on the button itself (there is no separate label as with the addField functions). Provide your own layout info.


addPasswordField

public FormPasswordField addPasswordField(java.lang.String name)
Adds a password field with the given name, with no layout info. Does not add a label. Returns the created PasswordField in case you need to monkey with it.


addPasswordField

public FormPasswordField addPasswordField(java.lang.String name,
                                          java.lang.Object fieldLayoutInfo)
Adds a password field with the given name, with the specified layout info. Does not add a label. Returns the created PasswordField in case you need to monkey with it.


addTextField

public FormTextField addTextField(java.lang.String name,
                                  int columns,
                                  int rows)
Adds a string field with the given name, with no layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addTextField

public FormTextField addTextField(java.lang.String name)
Adds a string field with the given name, with no layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addStringField

public FormStringField addStringField(java.lang.String name)
Adds a string field with the given name, with no layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addStringField

public FormStringField addStringField(java.lang.String name,
                                      java.lang.Object fieldLayoutInfo)
Adds a string field with the given name, with the specified layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addReadOnlyStringField

public FormReadOnlyStringField addReadOnlyStringField(java.lang.String name)
Adds a read-only string field with the given name, with no layout info. Does not add a label. Returns the created ReadOnlyStringField in case you need to monkey with it.


addReadOnlyStringField

public FormReadOnlyStringField addReadOnlyStringField(java.lang.String name,
                                                      java.lang.Object fieldLayoutInfo)
Adds a string field with the given name, with the specified layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addNumberField

public FormNumberField addNumberField(java.lang.String name)
Adds a Number field with the given name, with no layout info. Does not add a label. Returns the created NumberField in case you need to monkey with it.


addNumberField

public FormNumberField addNumberField(java.lang.String name,
                                      java.lang.Object fieldLayoutInfo)
Adds a Number field with the given name, with the specified layout info. Does not add a label. Returns the created NumberField in case you need to monkey with it.


addIntegerField

public FormIntegerField addIntegerField(java.lang.String name)
Adds a Integer field with the given name, with no layout info. Does not add a label. Returns the created IntegerField in case you need to monkey with it.


addIntegerField

public FormIntegerField addIntegerField(java.lang.String name,
                                        java.lang.Object fieldLayoutInfo)
Adds a Integer field with the given name, with the specified layout info. Does not add a label. Returns the created IntegerField in case you need to monkey with it.


addRandomIntegerField

public FormRandomIntegerField addRandomIntegerField(java.lang.String name,
                                                    int size)
Adds a randomizeable Integer field with the given name, with no layout info. Does not add a label. Returns the created RandomIntegerField in case you need to monkey with it.


addRandomIntegerField

public FormRandomIntegerField addRandomIntegerField(java.lang.String name,
                                                    int size,
                                                    java.lang.Object fieldLayoutInfo)
Adds a randomizable Integer field with the given name, with the specified layout info. Does not add a label. Returns the created RandomIntegerField in case you need to monkey with it.


addTextField

public FormTextField addTextField(java.lang.String name,
                                  java.lang.Object fieldLayoutInfo,
                                  int columns,
                                  int rows)
Adds a string field with the given name, with the specified layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addTextField

public FormTextField addTextField(java.lang.String name,
                                  java.lang.Object fieldLayoutInfo)
Adds a string field with the given name, with the specified layout info. Does not add a label. Returns the created StringField in case you need to monkey with it.


addPicklistField

public FormPicklistField addPicklistField(java.lang.String name,
                                          java.util.Collection items)
Adds a picklist field with the given name and collection of possibilities, with no layout info. Does not add a label. Returns the created PicklistField in case you need to monkey with it.


addPicklistField

public FormPicklistField addPicklistField(java.lang.String name,
                                          java.util.Collection items,
                                          java.lang.Object fieldLayoutInfo)
Adds a picklist field with the given name and collection of possibilities, with the specified layout info. Does not add a label. Returns the created PicklistField in case you need to monkey with it.


addPicklistFieldWithValues

public FormPicklistField addPicklistFieldWithValues(java.lang.String name,
                                                    java.lang.String... values)

addComboField

public FormComboField addComboField(java.lang.String name,
                                    java.util.Collection items)
Adds a combo box field with the given name and collection of possibilities, with no layout info. Does not add a label. Returns the created ComboField in case you need to monkey with it.


addComboField

public FormComboField addComboField(java.lang.String name,
                                    java.util.Collection items,
                                    java.lang.Object fieldLayoutInfo)
Adds a combo box field with the given name and collection of possibilities, with the specified layout info. Does not add a label. Returns the created PicklistField in case you need to monkey with it.


addComboFieldWithValues

public FormComboField addComboFieldWithValues(java.lang.String name,
                                              java.lang.String... values)

addCheckboxField

public FormCheckboxField addCheckboxField(java.lang.String name)
Adds a checkbox field with the given name, with no layout info. No label is added. Returns the created CheckboxField in case you need to monkey with it.


addCheckboxField

public FormCheckboxField addCheckboxField(java.lang.String name,
                                          java.lang.Object fieldLayoutInfo)
Adds a checkbox field with the given name, with the specified layout info. No label is added. Returns the created CheckboxField in case you need to monkey with it.


addDateAndTimeField

public FormDateAndTimeField addDateAndTimeField(java.lang.String name)
Adds a date field with the given name, with no layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addDateAndTimeField

public FormDateAndTimeField addDateAndTimeField(java.lang.String name,
                                                java.lang.Object fieldLayoutInfo)
Adds a date field with the given name, with the specified layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addTimeField

public FormTimeField addTimeField(java.lang.String name)
Adds a date field with the given name, with no layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addTimeField

public FormTimeField addTimeField(java.lang.String name,
                                  java.lang.Object fieldLayoutInfo)
Adds a date field with the given name, with the specified layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addDateField

public FormDateField addDateField(java.lang.String name)
Adds a date field with the given name, with no layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addDateField

public FormDateField addDateField(java.lang.String name,
                                  java.lang.Object fieldLayoutInfo)
Adds a date field with the given name, with the specified layout info. No label is added. Returns the created DateField in case you need to monkey with it.


addFilePathField

public FormFilePathField addFilePathField(java.lang.String name)
Adds a filename field with the given name, with no layout info. No label is added. Returns the created FilenameField in case you need to monkey with it.


addFilePathField

public FormFilePathField addFilePathField(java.lang.String name,
                                          java.lang.Object fieldLayoutInfo)
Adds a filename field with the given name, with the specified layout info. No label is added. Returns the created FilenameField in case you need to monkey with it.


addFilePathListField

public FormFilePathListField addFilePathListField(java.lang.String name)

addFilePathListField

public FormFilePathListField addFilePathListField(java.lang.String name,
                                                  java.lang.Object fieldLayoutInfo)

addNamedBlobField

public FormNamedBlobField addNamedBlobField(java.lang.String name)

addNamedBlobField

public FormNamedBlobField addNamedBlobField(java.lang.String name,
                                            java.lang.Object fieldLayoutInfo)

addColorField

public FormColorField addColorField(java.lang.String name)

addColorField

public FormColorField addColorField(java.lang.String name,
                                    java.lang.Object fieldLayoutInfo)

addDurationField

public FormDurationField addDurationField(java.lang.String name,
                                          java.lang.Object fieldLayoutInfo)

addDurationField

public FormDurationField addDurationField(java.lang.String name)

addField

public FormField addField(java.lang.String name,
                          FormField field)
Adds the given FormField component, associated with the given field name, with no layout info. Does not add a label.


addField

public FormField addField(java.lang.String name,
                          FormField field,
                          java.lang.Object layoutInfo)
Adds the given FormField component, associated with the given field name and layout info. Does not add a label.


addField

public FormField addField(java.lang.String name,
                          java.lang.String fieldType)
Acts like addFOOField for the given fieldType "FOO".


addField

public FormField addField(java.lang.String name,
                          java.lang.String fieldType,
                          java.lang.Object layoutInfo)
Acts like addFOOField for the given fieldType "FOO".


addField

public FormField addField(java.lang.String name,
                          java.lang.String fieldType,
                          int size,
                          java.lang.Object layoutInfo)
Acts like addFOOField for the given fieldType "FOO".


removeField

public FormField removeField(java.lang.String name,
                             FormField field)

setSchema

public void setSchema(CogSchema newSchema)
Set the CogSchema used by this FormBuilder. Beware; you should not change this after you start adding fields.


getSchema

public CogSchema getSchema()
Gets the current CogSchema used by this FormBuilder.


setEditedType

public void setEditedType(CogStructureType newType)

setEditedTypeName

public void setEditedTypeName(java.lang.String string)

getEditedType

public CogStructureType getEditedType()

getEditedTypeName

public java.lang.String getEditedTypeName()

getForm

public Form getForm()
Returns the Form object.


replaceField

public void replaceField(java.lang.String name,
                         FormField newField)

addComponent

public void addComponent(java.awt.Component component,
                         java.lang.Object layoutInfo)
Overrides:
addComponent in class GUIBuilder