Package loggerForms
Class LoggerForm
java.lang.Object
loggerForms.LoggerForm
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected LoggerFormholds refernce to itsself so close button can find it's self in the tabPanestatic final intstatic final intprotected JComponent - 
Constructor Summary
ConstructorsConstructorDescriptionLoggerForm(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 - 
Method Summary
Modifier and TypeMethodDescriptionvoidDestroy the form - which for now means killing any NMEA observer.voiddisplayMessage(String message) voidEnable / disable buttonsObject[]Extract the data from the from into an Object array, one object per active control.voidfocusGained(FocusEvent fe, LoggerControl loggerControlComponent) intbooleanvoidbooleanprintErrors(ArrayList<String> errors) voidvoidsets hasCounter to truevoidsetHintAndMessage(LoggerControl loggerControlComponent) Object[]transferControlDataToArray(SQLTypes sqlTypes) Transfers data from the from controls to the data array which will get saved in the data unit.booleantransferDataArrayToForm(Object[] dataArray) Transfers data from the array within a data unit back into the form controls. 
- 
Field Details
- 
loggerForm
holds refernce to itsself so close button can find it's self in the tabPane - 
thingToClose
 - 
NewDataForm
public static final int NewDataForm- See Also:
 
 - 
EditDataForm
public static final int EditDataForm- See Also:
 
 - 
PreviewDataForm
public static final int PreviewDataForm- See Also:
 
 
 - 
 - 
Constructor Details
- 
LoggerForm
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
- 
getInputControls
- Returns:
 - the inputControls
 
 - 
hasCounter
public boolean hasCounter()- Returns:
 - the hasCounter
 
 - 
getCounter
- Returns:
 - the CounterControl
 
 - 
setHasCounter
sets hasCounter to true - 
getNewOrEdit
public int getNewOrEdit()- Returns:
 - the NewOrEdit
 
 - 
getSqlTypes
 - 
readOnGps
public void readOnGps() - 
getFormDescription
- Returns:
 - the formDescription
 
 - 
enableControls
public void enableControls()Enable / disable buttonsfor 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
 - 
getFormWarnings
 - 
getFormErrors
 - 
transferControlDataToArray
Transfers data from the from controls to the data array which will get saved in the data unit.- Returns:
 - array of data objects
 
 - 
transferDataArrayToForm
Transfers data from the array within a data unit back into the form controls.- Parameters:
 dataArray-- Returns:
 - true
 
 - 
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
 - 
getComponent
 - 
setHintAndMessage
 - 
focusGained
 - 
destroyForm
public void destroyForm()Destroy the form - which for now means killing any NMEA observer. - 
getLastRow
- Returns:
 - the lastRow
 
 - 
getSaveButton
- Returns:
 - the saveButton
 
 - 
optionsChange
public void optionsChange() 
 -