Package annotation.handler
Class OneStopAnnotationHandler
java.lang.Object
annotation.handler.AnnotationHandler
annotation.handler.AnnotationChoiceHandler
annotation.handler.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 Summary
ConstructorsConstructorDescriptionOneStopAnnotationHandler(SettingsNameProvider settingsNameProvider, PamDataBlock<PamDataUnit> pamDataBlock)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidCheck that logging on the datablock is all set up for the current annotation selectionabstract voidAdd some annotation types for the annotation handlergetDialogMenuItem(Window window) Get a standard menu item for showing the Annotation dialog.getDialogMenuItem(Window window, String menuName) Get a standard menu item for showing the Annotation dialog.longbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) booleanshowDialog(Window window) This can be used to open annotation choice information in it's own dialogMethods inherited from class annotation.handler.AnnotationChoiceHandler
addSQLLogging, createAnnotationEditMenu, getNumUsedAnnotationTypes, getSelectionPanel, getUsedAnnotationTypes, loadAnnotationChoices, updateAnnotationMethods inherited from class annotation.handler.AnnotationHandler
addAnnotation, addAnnotations, addAnnotationSqlAddons, addAnnotationType, annotateDataUnit, findAnnotationType, findAnnotationTypeFromCode, getAnnotationMenuItems, getAvailableAnnotationTypes, getPamDataBlock, removeAnnotation, removeAnnotations, removeAnnotationType, updateAnnotations 
- 
Constructor Details
- 
OneStopAnnotationHandler
public OneStopAnnotationHandler(SettingsNameProvider settingsNameProvider, PamDataBlock<PamDataUnit> pamDataBlock)  
 - 
 - 
Method Details
- 
createAnnotationTypes
public abstract void createAnnotationTypes()Add some annotation types for the annotation handler - 
getAnnotationChoices
- Specified by:
 getAnnotationChoicesin classAnnotationChoiceHandler
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- 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
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
showDialog
This can be used to open annotation choice information in it's own dialogan 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
Get a standard menu item for showing the Annotation dialog.- Parameters:
 window-- Returns:
 - menu item
 
 - 
getDialogMenuItem
Get a standard menu item for showing the Annotation dialog.- Parameters:
 window-menuName- String name for the menu item- Returns:
 - menu item
 
 - 
checkSQLLogging
public void checkSQLLogging()Check that logging on the datablock is all set up for the current annotation selection 
 -