Package Acquisition.filedate
Class StandardFileDate
java.lang.Object
Acquisition.filedate.StandardFileDate
- All Implemented Interfaces:
FileDate
,PamSettings
,SettingsNameProvider
Implementation of FileDate to read the standard file
date format that I use in Logger. I'd have thought that
others would be keen to add alternatives, but no one has !
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionStandardFileDate
(PamSettings parentSetting) StandardSettings needs to implement PamSettings so that it can store it's own configuration settings. -
Method Summary
Modifier and TypeMethodDescriptionGet the JavaFX settings pane for the file date.boolean
doSettings
(Window parent) Get a description of the file date implementation.getName()
Get the name of the file date implementation.long
long
getTimeFromFile
(File file) Get a time in milliseconds from a file date.boolean
True if the file date subclass has associated settingsboolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setLastFormat
(String lastFormat) void
setSettings
(StandardFileDateSettings settings2) Set the settings.
-
Constructor Details
-
StandardFileDate
StandardSettings needs to implement PamSettings so that it can store it's own configuration settings. These settings however need to be coupled to some kind of master settings, e.g. the Acquisition module so that these settings get stored with the same unit name.- Parameters:
parentSetting
-
-
-
Method Details
-
setLastFormat
-
getFormat
-
doSettings
- Specified by:
doSettings
in interfaceFileDate
-
getDescription
Description copied from interface:FileDate
Get a description of the file date implementation.- Specified by:
getDescription
in interfaceFileDate
- Returns:
- a description of the file date implementation.
-
getName
Description copied from interface:FileDate
Get the name of the file date implementation. -
getTimeFromFile
Description copied from interface:FileDate
Get a time in milliseconds from a file date.- Specified by:
getTimeFromFile
in interfaceFileDate
- Parameters:
file
- file- Returns:
- time in milliseconds or 0 if can't work it out.
-
hasSettings
public boolean hasSettings()Description copied from interface:FileDate
True if the file date subclass has associated settings- Specified by:
hasSettings
in interfaceFileDate
- Returns:
- true if it has settings
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
getSettings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
doSettings
Description copied from interface:FileDate
Get the JavaFX settings pane for the file date.- Specified by:
doSettings
in interfaceFileDate
- Returns:
- the settings pane or null if there are no settings.
-
setSettings
Set the settings.- Parameters:
settings
- - the settings to set.
-