Class StandardFileDate

java.lang.Object
Acquisition.filedate.StandardFileDate
All Implemented Interfaces:
FileDate, PamSettings, SettingsNameProvider

public class StandardFileDate extends Object implements FileDate, PamSettings
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 Details

    • StandardFileDate

      public StandardFileDate(PamSettings parentSetting)
      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

      public void setLastFormat(String lastFormat)
    • getFormat

      public String getFormat()
      Specified by:
      getFormat in interface FileDate
    • doSettings

      public boolean doSettings(Window parent)
      Specified by:
      doSettings in interface FileDate
    • getDescription

      public String getDescription()
      Description copied from interface: FileDate
      Get a description of the file date implementation.
      Specified by:
      getDescription in interface FileDate
      Returns:
      a description of the file date implementation.
    • getName

      public String getName()
      Description copied from interface: FileDate
      Get the name of the file date implementation.
      Specified by:
      getName in interface FileDate
      Returns:
      the name of the file date implementation.
    • getTimeFromFile

      public long getTimeFromFile(File file)
      Description copied from interface: FileDate
      Get a time in milliseconds from a file date.
      Specified by:
      getTimeFromFile in interface FileDate
      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 interface FileDate
      Returns:
      true if it has settings
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getSettings

      public StandardFileDateSettings getSettings()
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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

      public FileDatePane doSettings()
      Description copied from interface: FileDate
      Get the JavaFX settings pane for the file date.
      Specified by:
      doSettings in interface FileDate
      Returns:
      the settings pane or null if there are no settings.
    • setSettings

      public void setSettings(StandardFileDateSettings settings2)
      Set the settings.
      Parameters:
      settings - - the settings to set.