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

  • Method Details Link icon

    • getAnnotationChoices Link icon

      public abstract AnnotationChoices getAnnotationChoices()
    • getSelectionPanel Link icon

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

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

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

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

      public void addSQLLogging(MarkDataBlock dataBlock)
    • createAnnotationEditMenu Link icon

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

      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 -