Class OneStopAnnotationHandler

All Implemented Interfaces:
PamSettings, SettingsNameProvider
Direct Known Subclasses:
ManualAnnotationHandler

public abstract class OneStopAnnotationHandler extends AnnotationChoiceHandler implements PamSettings
Annotation manager that should be able to do absolutely everything (almost) self contained within itself without having to add about 4 different functions to it's parent controller or process
Author:
dg50
  • Constructor Details Link icon

  • Method Details Link icon

    • createAnnotationTypes Link icon

      public abstract void createAnnotationTypes()
      Add some annotation types for the annotation handler
    • getAnnotationChoices Link icon

      public AnnotationChoices getAnnotationChoices()
      Specified by:
      getAnnotationChoices in class AnnotationChoiceHandler
    • 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
    • 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
    • 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.
    • showDialog Link icon

      public boolean showDialog(Window window)
      This can be used to open annotation choice information in it's own dialog

      an alternative is to call getSelectionPanel() and incorporate it into a greater dialog, but if you do, you must call checkSQLLogging after the dialog closes.

      Parameters:
      window -
      Returns:
      true if dialog selected OK (not cancelled)
    • getDialogMenuItem Link icon

      public JMenuItem getDialogMenuItem(Window window)
      Get a standard menu item for showing the Annotation dialog.
      Parameters:
      window -
      Returns:
      menu item
    • getDialogMenuItem Link icon

      public JMenuItem getDialogMenuItem(Window window, String menuName)
      Get a standard menu item for showing the Annotation dialog.
      Parameters:
      window -
      menuName - String name for the menu item
      Returns:
      menu item
    • checkSQLLogging Link icon

      public void checkSQLLogging()
      Check that logging on the datablock is all set up for the current annotation selection