Package annotation.handler
Class AnnotationHandler
java.lang.Object
annotation.handler.AnnotationHandler
- Direct Known Subclasses:
AnnotationChoiceHandler
Manage annotation options for a datablock
This contains a list of available annotations for the type of data in the datablock. It can provide a Swing panel for selecting different annotation options and also interact with the AnnotationChoices class to save annotation options and selections.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnnotation
(DataAnnotationType anType, PamDataUnit pamDataUnit) Add an annotation to a detection group.boolean
addAnnotations
(DataAnnotationType annotationType, PamDataUnit... pamDataUnits) int
addAnnotationSqlAddons
(SQLLogging baseSQLLogging) Add all the SQLLogging addons to the database table.void
addAnnotationType
(DataAnnotationType annotationType) Add an annotation type to the list of available types for this datablock.boolean
annotateDataUnit
(Window parentFrame, PamDataUnit dataUnit) createAnnotationEditMenu
(PamDataUnit dataUnit) Create a menu for editing annotations for a data unit.findAnnotationType
(Class annotationTypeClass) Find an annotation type of a particular class.find an annotation type from it's 4 character code.getAnnotationMenuItems
(DataMenuParent menuParent, Point mousePosition, PamDataUnit... dataUnits) int
boolean
removeAnnotation
(DataAnnotationType anType, PamDataUnit pamDataUnit) boolean
removeAnnotations
(DataAnnotationType annotationType, PamDataUnit... pamDataUnits) boolean
removeAnnotationType
(DataAnnotationType annotationType) 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.boolean
updateAnnotations
(DataAnnotationType annotationType, PamDataUnit... pamDataUnits)
-
Constructor Details
-
AnnotationHandler
- Parameters:
pamDataBlock
-
-
-
Method Details
-
findAnnotationTypeFromCode
find an annotation type from it's 4 character code. Used when recreating annotations read back from binary data.- Parameters:
code
- 4 character code- Returns:
-
findAnnotationType
Find an annotation type of a particular class.- Parameters:
annotationTypeClass
- class of annotation type- Returns:
- Instance of that type or null
-
addAnnotationType
Add an annotation type to the list of available types for this datablock.- Parameters:
annotationType
-
-
removeAnnotationType
-
getAvailableAnnotationTypes
- Returns:
- the availableAnnotationTypes
-
getUsedAnnotationTypes
- 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).
-
getNumUsedAnnotationTypes
public int getNumUsedAnnotationTypes()- Returns:
- the number of used annotation types.
-
addAnnotationSqlAddons
Add all the SQLLogging addons to the database table. Make sure the table is cleared of additions before calling this in case it gets called multiple times.- Parameters:
baseSQLLogging
- BAse SQLLogging (associated with a PamDataBlock) to add the extra fields to.
-
addAnnotation
Add an annotation to a detection group.- Parameters:
anType
-pamDataUnit
-- Returns:
-
removeAnnotation
-
createAnnotationEditMenu
Create a menu for editing annotations for a data unit.- Parameters:
dataUnit
- Existing data unit- Returns:
- menu item.
-
updateAnnotation
Update an existing annotation - or create a blank one if there isn't already one in the data unit.- Parameters:
pamDataUnit
-annotationType
-
-
updateAnnotations
-
addAnnotations
-
removeAnnotations
-
annotateDataUnit
-