Package loggerForms.formdesign
Class FormEditor
java.lang.Object
loggerForms.formdesign.FormEditor
Layer that sits between the form description and the actual edit
dialog for altering a form. this is so we can separate out the
GUI of the edit dialog from the part doing the actual work
serving up options, etc.
- Author:
- Doug
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFormEditor
(FormsControl formsControl, Window parentFrame, FormDescription formDescription) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the controlTitles ArrayListExtracts a fresh list of all item informations from the dialog.getFormProperty
(PropertyTypes propertyType) Get a specific property.makePropertyPanel
(PropertyTypes propertyType) Create the right type of panel for the given propertyvoid
Loads the controlTitles Arraylist with data from the formDescription object.
Important: the ControlTitle objects created here DO NOT hold valid references to the FormEditDialog object.void
Create a temporary preview of a form during the design phase.void
setFormProperty
(PropertyTypes propertyType, ItemInformation itemInformation) Set a form property.
-
Constructor Details
-
FormEditor
-
-
Method Details
-
getControlTitles
- Returns:
- the controlTitles
-
populateControlTitles
public void populateControlTitles()Loads the controlTitles Arraylist with data from the formDescription object.
Important: the ControlTitle objects created here DO NOT hold valid references to the FormEditDialog object. This method should NOT be used in any sort of way that interacts with the user, since the FormEditDialog object is used extensively in the parameters GUI. This method is only used to load the arrayList in preparation for writing the data to the UDF database table, and clearControlTitles is called immediately afterwards to make sure that the data isn't accidentally used somewhere else -
clearControlTitles
public void clearControlTitles()Clears the controlTitles ArrayList -
getPropertyInformation
- Returns:
- the propertyInformation
-
getFormProperty
Get a specific property.Since not all properties will be set, null will often be returned which equivalent to it not being selected.
- Parameters:
propertyType
- Property to fetch- Returns:
- Description of the property or null
-
setFormProperty
Set a form property. If the description is null, this means removing it from the list.- Parameters:
propertyType
- property to set.itemInformation
- description of the property or null
-
getParentFrame
- Returns:
- the parentFrame
-
getFormsControl
- Returns:
- the formsControl
-
getFormDescription
- Returns:
- the formDescription
-
makePropertyPanel
Create the right type of panel for the given property- Parameters:
propertyType
-- Returns:
- a strip panel to go in the dialog.
-
previewForm
public void previewForm()Create a temporary preview of a form during the design phase. -
getAllFormInformations
Extracts a fresh list of all item informations from the dialog.This is put pack into a single list since that's the way that the FormDescription originally received it. Note entirely efficient, but
- Returns:
-