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 Link icon

    • StandardFileDate Link icon

      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 Link icon

    • setLastFormat Link icon

      public void setLastFormat(String lastFormat)
    • getFormat Link icon

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

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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

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

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

      public StandardFileDateSettings getSettings()
    • restoreSettings Link icon

      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 Link icon

      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 Link icon

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