- java.lang.Object
-
- org.icepdf.ri.common.MyAnnotationCallback
-
- All Implemented Interfaces:
AnnotationCallback
public class MyAnnotationCallback extends Object implements AnnotationCallback
This class represents a basic implementation of the AnnotationCallback- Since:
- 2.6
-
-
Constructor Summary
Constructors Constructor Description MyAnnotationCallback(DocumentViewController documentViewController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnewAnnotation(PageViewComponent pageComponent, AnnotationComponent annotationComponent)New annotation created with view tool.voidpageAnnotationsInitialized(Page page)Implemented Annotation Callback method.voidprocessAnnotationAction(Annotation annotation, Action action, int x, int y)Implemented Annotation Callback method.voidremoveAnnotation(PageViewComponent pageComponent, AnnotationComponent annotationComponent)Remove the annotation and ready state for save.voidupdateAnnotation(AnnotationComponent annotationComponent)Update the annotation and ready state for save.
-
-
-
Constructor Detail
-
MyAnnotationCallback
public MyAnnotationCallback(DocumentViewController documentViewController)
-
-
Method Detail
-
processAnnotationAction
public void processAnnotationAction(Annotation annotation, Action action, int x, int y)
Implemented Annotation Callback method. When an annotation is activated in a PageViewComponent it passes the annotation to this method for processing. The PageViewComponent take care of drawing the annotation states but it up to this method to process the annotation.
- Specified by:
processAnnotationActionin interfaceAnnotationCallback- Parameters:
annotation- annotation that was activated by a user via the PageViewComponent.action- the action event that was fired when the annotation was clicked. This can be the A or AA entry.x- x-coordinate of input device click that initiated the annotation action.y- y-coordinate of input device click that initiated the annotation action.
-
pageAnnotationsInitialized
public void pageAnnotationsInitialized(Page page)
Implemented Annotation Callback method. This method is called when a pages annotations been initialized but before the page has been painted. This method blocks the
- Specified by:
pageAnnotationsInitializedin interfaceAnnotationCallback- Parameters:
page- page that has been initialized. The pages annotations are available via an accessor method.
-
newAnnotation
public void newAnnotation(PageViewComponent pageComponent, AnnotationComponent annotationComponent)
New annotation created with view tool.- Specified by:
newAnnotationin interfaceAnnotationCallback- Parameters:
pageComponent- page that annotation was added to.annotationComponent- component that will be created.
-
updateAnnotation
public void updateAnnotation(AnnotationComponent annotationComponent)
Update the annotation and ready state for save.- Specified by:
updateAnnotationin interfaceAnnotationCallback- Parameters:
annotationComponent- annotation component to be added to page.
-
removeAnnotation
public void removeAnnotation(PageViewComponent pageComponent, AnnotationComponent annotationComponent)
Remove the annotation and ready state for save.- Specified by:
removeAnnotationin interfaceAnnotationCallback- Parameters:
annotationComponent- annotation component to be added to page.pageComponent- page that annotation should be removed.
-
-