Package loggerForms.controls
Class LoggerControl
java.lang.Object
loggerForms.controls.LoggerControl
- Direct Known Subclasses:
CharAreaControl,CheckboxControl,LatLongControl,LatLongTimeControl,LookupControl,SimpleControl,SubFormControl,TimestampControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprotected JPanelprotected ControlDescriptionprotected JPopupMenuprotected Stringdefect described will stop form being allowed to be saved.protected Classprotected Stringform can still save but with defect describedprotected LoggerFormprotected Types -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddF1KeyListener(JComponent component) static voidaddFocusListenerToAllSubComponants(FocusListener l, Component component) static voidaddMouseListenerToAllSubComponants(MouseListener l, Component component) intAutomatically update a control.voidclear()voidvoidclear DataWarning fieldvoidabstract intfillNMEAControlData(NMEADataUnit dataUnit) Called once a correct NMEA data unit has been found to write the data into the control.The NMEA datablock name must be stored somewhere - how about as Topic ?abstract ObjectgetData()abstract Stringvoidabstract voidthis will populate the Field with either last entered data or most up to date entryabstract voidReturn to the default value based on the associated control descriptionvoidsetToolTipToAllSubJComponants(Component component) intTries to find the appropriate NMEA string by searching multiple data blocks if necessary.intupdateNMEAData(NMEADataUnit nmeaData) Used when NMEA data is being updated in response to the arrival of a new NMEA string (i.e.
-
Field Details
-
controlMenu
-
controlDescription
-
loggerForm
-
component
-
dataError
defect described will stop form being allowed to be saved. -
dataWarning
form can still save but with defect described -
dataType
-
sqlType
-
AUTO_UPDATE_SUCCESS
public static final int AUTO_UPDATE_SUCCESS- See Also:
-
AUTO_UPDATE_FAIL
public static final int AUTO_UPDATE_FAIL- See Also:
-
AUTO_UPDATE_CANT
public static final int AUTO_UPDATE_CANT- See Also:
-
-
Constructor Details
-
LoggerControl
-
-
Method Details
-
setToolTipToAllSubJComponants
- Parameters:
listener-jComponent-
-
addMouseListenerToAllSubComponants
- Parameters:
listener-jComponent-
-
addFocusListenerToAllSubComponants
-
addF1KeyListener
-
f1Pressed
public void f1Pressed() -
getDataError
- Returns:
-
getData
- Returns:
- data from field(s) of component
-
setData
this will populate the Field with either last entered data or most up to date entry -
setDefault
public abstract void setDefault()Return to the default value based on the associated control description -
autoUpdate
public int autoUpdate()Automatically update a control. This is only possible for controls such as time, timestamps and NMEA items.- Returns:
- AUTO_UPDATE_SUCCESS, AUTO_UPDATE_FAIL or AUTO_UPDATE_CANT
-
clear
public void clear() -
getControlDescription
- Returns:
- the controlDescription
-
getLoggerForm
- Returns:
- the loggerForm
-
getComponent
- Returns:
- the component
-
lFocusGained
-
getDataWarning
- Returns:
- the dataWarning
-
clearDataWarning
public void clearDataWarning()clear DataWarning field -
clearDataError
public void clearDataError() -
updateNMEAData
public int updateNMEAData()Tries to find the appropriate NMEA string by searching multiple data blocks if necessary. IF the previous call was Successful, then it will just go straight to that same data block, otherwise, it will search all available datablocks.- Returns:
-
fillNMEAControlData
Called once a correct NMEA data unit has been found to write the data into the control.- Parameters:
dataUnit- NMEA data unit- Returns:
- success flag.
-
updateNMEAData
Used when NMEA data is being updated in response to the arrival of a new NMEA string (i.e. on forms which save all NMEA data from a single string). An actual string is passed in, but there is just a chance that it will be the wrong type in which case the default is used.- Parameters:
nmeaData-
-
findNMEADataBlock
The NMEA datablock name must be stored somewhere - how about as Topic ?- Returns:
-