Class AnnotationChoiceHandler

java.lang.Object
annotation.handler.AnnotationHandler
annotation.handler.AnnotationChoiceHandler
Direct Known Subclasses:
GroupAnnotationHandler, MapGroupAnnotationHandler, OneStopAnnotationHandler, PrintScreenAnnotationChoiceHandler, SonobuoyAnnotationHandler, SpectrogramMarkAnnotationHandler

public abstract class AnnotationChoiceHandler extends AnnotationHandler
Annotation handler that provides functionality for the programmer to set things up so that the user can chose which types of annotation to use.
Author:
Doug
  • Constructor Details

  • Method Details

    • getAnnotationChoices

      public abstract AnnotationChoices getAnnotationChoices()
    • getSelectionPanel

      public AnnotationsSelectionPanel getSelectionPanel()
      Returns:
      a dialog panel that can be used in Swing dialogs.
    • getNumUsedAnnotationTypes

      public int getNumUsedAnnotationTypes()
      Overrides:
      getNumUsedAnnotationTypes in class AnnotationHandler
      Returns:
      the number of used annotation types.
    • getUsedAnnotationTypes

      public List<DataAnnotationType<?>> getUsedAnnotationTypes()
      Overrides:
      getUsedAnnotationTypes in class AnnotationHandler
      Returns:
      a list of selected annotation types (which is the same as the list of available annotation types unless this is overridden in a handler that offers choice).
    • loadAnnotationChoices

      public void loadAnnotationChoices()
      Call this after settings have been loaded to load individual settings for the various annotation types.
    • addSQLLogging

      public void addSQLLogging(MarkDataBlock dataBlock)
    • createAnnotationEditMenu

      public JMenuItem createAnnotationEditMenu(PamDataUnit dataUnit)
      Create a menu for editing annotations for a data unit.
      Overrides:
      createAnnotationEditMenu in class AnnotationHandler
      Parameters:
      dataUnit - Existing data unit
      Returns:
      menu item.
    • updateAnnotation

      public boolean updateAnnotation(PamDataUnit pamDataUnit, DataAnnotationType annotationType)
      Update an existing annotation - or create a blank one if there isn't already one in the data unit.
      Overrides:
      updateAnnotation in class AnnotationHandler
      Parameters:
      pamDataUnit -
      annotationType -