Class FormEditor

java.lang.Object
loggerForms.formdesign.FormEditor

public class FormEditor extends Object
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
  • Constructor Details

  • Method Details

    • getControlTitles

      public ArrayList<ControlTitle> 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

      public Hashtable<PropertyTypes,ItemInformation> getPropertyInformation()
      Returns:
      the propertyInformation
    • getFormProperty

      public ItemInformation getFormProperty(PropertyTypes propertyType)
      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

      public void setFormProperty(PropertyTypes propertyType, ItemInformation itemInformation)
      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

      public Window getParentFrame()
      Returns:
      the parentFrame
    • getFormsControl

      public FormsControl getFormsControl()
      Returns:
      the formsControl
    • getFormDescription

      public FormDescription getFormDescription()
      Returns:
      the formDescription
    • makePropertyPanel

      public PropertyPanel makePropertyPanel(PropertyTypes propertyType)
      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

      public ArrayList<ItemInformation> 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: