Package loggerForms

Class LoggerForm

java.lang.Object
loggerForms.LoggerForm

public class LoggerForm extends Object
A LoggerForm is the central component of all form types, inclucing normal forms popup forms and subtab forms. Therefore the form itself is capable of providing a single JComponent (a JPanel). some other part of the software will either place this into the main tab panel, a sub tab panel or it's own dialog frame (for a pop-up).
Author:
Graham Weatherup
  • Field Details Link icon

    • loggerForm Link icon

      protected LoggerForm loggerForm
      holds refernce to itsself so close button can find it's self in the tabPane
    • thingToClose Link icon

      protected JComponent thingToClose
    • NewDataForm Link icon

      public static final int NewDataForm
      See Also:
    • EditDataForm Link icon

      public static final int EditDataForm
      See Also:
    • PreviewDataForm Link icon

      public static final int PreviewDataForm
      See Also:
  • Constructor Details Link icon

    • LoggerForm Link icon

      public LoggerForm(FormDescription formDescription, int NewOrEdit)
      called when creating a form for new data input(normal/subtabs/popup), or to edit old data JComponent component that the form is put in should maybe be included to say whether it will go in window/frame to rename/remove as necessary
      Parameters:
      formDescription -
  • Method Details Link icon

    • getInputControls Link icon

      public ArrayList<LoggerControl> getInputControls()
      Returns:
      the inputControls
    • hasCounter Link icon

      public boolean hasCounter()
      Returns:
      the hasCounter
    • getCounter Link icon

      public CounterControl getCounter()
      Returns:
      the CounterControl
    • setHasCounter Link icon

      public void setHasCounter(CounterControl cc)
      sets hasCounter to true
    • getNewOrEdit Link icon

      public int getNewOrEdit()
      Returns:
      the NewOrEdit
    • getSqlTypes Link icon

      public SQLTypes getSqlTypes()
    • readOnGps Link icon

      public void readOnGps()
    • getFormDescription Link icon

      public FormDescription getFormDescription()
      Returns:
      the formDescription
    • enableControls Link icon

      public void enableControls()
      Enable / disable buttons

      for now this is basically just disabling buttons if we're in viewer mode. A More sophisticated function might consider enabling / disabling depending on whether or not a form can be saved.

    • displayMessage Link icon

      public void displayMessage(String message)
    • getFormWarnings Link icon

      public String getFormWarnings()
    • getFormErrors Link icon

      public String getFormErrors()
    • transferControlDataToArray Link icon

      public Object[] transferControlDataToArray(SQLTypes sqlTypes)
      Transfers data from the from controls to the data array which will get saved in the data unit.
      Returns:
      array of data objects
    • transferDataArrayToForm Link icon

      public boolean transferDataArrayToForm(Object[] dataArray)
      Transfers data from the array within a data unit back into the form controls.
      Parameters:
      dataArray -
      Returns:
      true
    • extractFormData Link icon

      public Object[] extractFormData()
      Extract the data from the from into an Object array, one object per active control. These match up with a list in the SQL logging
      Returns:
      list of data objects extracted from the form.
    • printErrors Link icon

      public boolean printErrors(ArrayList<String> errors)
    • getComponent Link icon

      public PamPanel getComponent()
    • setHintAndMessage Link icon

      public void setHintAndMessage(LoggerControl loggerControlComponent)
    • focusGained Link icon

      public void focusGained(FocusEvent fe, LoggerControl loggerControlComponent)
    • destroyForm Link icon

      public void destroyForm()
      Destroy the form - which for now means killing any NMEA observer.
    • getLastRow Link icon

      public PamPanel getLastRow()
      Returns:
      the lastRow
    • getSaveButton Link icon

      public JButton getSaveButton()
      Returns:
      the saveButton
    • optionsChange Link icon

      public void optionsChange()