com.partnersoft.modules.inspection.gui
Class InspectionFormBuilder

java.lang.Object
  extended by com.partnersoft.gui.GUIBuilder
      extended by com.partnersoft.gui.GUIFormBuilder2
          extended by com.partnersoft.modules.inspection.gui.InspectionFormBuilder

public class InspectionFormBuilder
extends com.partnersoft.gui.GUIFormBuilder2

An inspection-schema-aware extension of GUIFormBuilder2.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
InspectionFormBuilder(InspectionKit kit)
           
 
Method Summary
 com.partnersoft.gui.ReadOnlyStringField addInspectionBuiltinField(java.lang.String fieldName)
           
 com.partnersoft.gui.ReadOnlyStringField addInspectionBuiltinField(java.lang.String fieldName, java.lang.Object layoutInfo)
           
 javax.swing.JLabel addInspectionBuiltinLabel(java.lang.String fieldName)
           
 javax.swing.JLabel addInspectionBuiltinLabel(java.lang.String fieldName, java.lang.Object layoutInfo)
           
 void addInspectionBuiltinLabelAndField(java.lang.String fieldName)
           
 com.partnersoft.gui.GUIField addInspectionField(java.lang.String fieldName)
          Adds the given inspection field, with the correct type and description.
 com.partnersoft.gui.GUIField addInspectionField(java.lang.String fieldName, java.lang.Object layoutInfo)
          Adds the given inspection field, with the correct type and description, using the given layout info.
 javax.swing.JLabel addInspectionLabel(java.lang.String fieldName)
          Adds the given inspection field's label as listed in the schema.
 javax.swing.JLabel addInspectionLabel(java.lang.String fieldName, java.lang.Object layoutInfo)
          Adds the given inspection field's label as listed in the schema, using the given layout info.
 void addInspectionLabelAndField(java.lang.String fieldName)
          Adds the given inspection field along with its label (label first).
 void assignAllListeners(com.partnersoft.gui.GUIForm form)
          Assigns all field listeners for the provided form.
 void buildStandardTabbedLayout()
          This does a standard layout with tabs, based on the fields.csv tab entries.
 void buildStandardTabbedLayout(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 buildStandardTabbedLayout(java.lang.String... tabs)
          This does a standard layout with just the named tabs, based on the fields.csv tab entries.
 void endInspectionTabbedPane()
           
 javax.swing.JTabbedPane getTabbedPane()
          Returns the JTabbedPane for the last form built if built using one of the buildStandardTabbedLayout()s.
 void startInspectionTabbedPane()
          Sets a border layout, starts a tabbed Pane, and saves the tabbed Pane as this builder's JTabbedPane.
 
Methods inherited from class com.partnersoft.gui.GUIFormBuilder2
addButton, addButton, addCheckboxField, addCheckboxField, addComboField, addComboField, addDateAndTimeField, addDateAndTimeField, addDateField, addDateField, addField, addField, addField, addField, addFilenameField, addFilenameField, addIntegerField, addIntegerField, addNamedBlobField, addNamedBlobField, addNumberField, addNumberField, addPasswordField, addPasswordField, addPicklistField, addPicklistField, addReadOnlyStringField, addReadOnlyStringField, addStringField, addStringField, addTextAreaField, addTextAreaField, addTimeField, addTimeField, finishForm
 
Methods inherited from class com.partnersoft.gui.GUIBuilder
addBorder, addBorder, addComponent, addComponent, addLabel, addLabel, addLowFatLabel, addLowFatLabel, endPanel, finish, getBackgroundColor, getCurrentPanel, getFont, getForegroundColor, getLabelHorizontalAlignment, getLabelVerticalAlignment, layoutBorder, layoutCard, layoutCentered, layoutFlow, layoutFlow, layoutForm, layoutGrid, layoutGrid, layoutGridBag, layoutGroup, layoutNewspaper, layoutNewspaper, layoutStretchAndStack, setBackgroundColor, setFont, setForegroundColor, setLabelHorizontalAlignment, setLabelVerticalAlignment, 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

InspectionFormBuilder

public InspectionFormBuilder(InspectionKit kit)
Method Detail

addInspectionField

public com.partnersoft.gui.GUIField addInspectionField(java.lang.String fieldName)
Adds the given inspection field, with the correct type and description.


addInspectionField

public com.partnersoft.gui.GUIField addInspectionField(java.lang.String fieldName,
                                                       java.lang.Object layoutInfo)
Adds the given inspection field, with the correct type and description, using the given layout info.

Returns:

addInspectionLabel

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

Returns:

addInspectionLabel

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

Returns:

addInspectionLabelAndField

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


addInspectionBuiltinField

public com.partnersoft.gui.ReadOnlyStringField addInspectionBuiltinField(java.lang.String fieldName)

addInspectionBuiltinField

public com.partnersoft.gui.ReadOnlyStringField addInspectionBuiltinField(java.lang.String fieldName,
                                                                         java.lang.Object layoutInfo)

addInspectionBuiltinLabel

public javax.swing.JLabel addInspectionBuiltinLabel(java.lang.String fieldName)

addInspectionBuiltinLabel

public javax.swing.JLabel addInspectionBuiltinLabel(java.lang.String fieldName,
                                                    java.lang.Object layoutInfo)

addInspectionBuiltinLabelAndField

public void addInspectionBuiltinLabelAndField(java.lang.String fieldName)

startInspectionTabbedPane

public void startInspectionTabbedPane()
Sets a border layout, starts a tabbed Pane, and saves the tabbed Pane as this builder's JTabbedPane.


endInspectionTabbedPane

public void endInspectionTabbedPane()

buildStandardTabbedLayout

public void buildStandardTabbedLayout()
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.


buildStandardTabbedLayout

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

Also adds listeners to fields that have matching scripts in module/scripts/FieldListeners/


assignAllListeners

public void assignAllListeners(com.partnersoft.gui.GUIForm form)
Assigns all field listeners for the provided form. Scripts are assumed to be in scripts/FieldListeners

Parameters:
form - - Finished GUIForm containing fields requiring listeners.

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()
Returns the JTabbedPane for the last form built if built using one of the buildStandardTabbedLayout()s.

Returns: