org.icepdf.ri.common.views
Interface AnnotationCallback

All Known Implementing Classes:
MyAnnotationCallback

public interface AnnotationCallback

Annotation callback allows developers to control how Annotation and their actions are executed. Developers also have have the option to change annotation visibility attributes such as border style, border color and border stroke width before the annotation is painted.

Since:
2.6
Author:
ICEsoft Technologies, Inc.
See Also:
DocumentViewController.setAnnotationCallback(AnnotationCallback)

Method Summary
 void newAnnotation(PageViewComponent page, AnnotationComponent annotationComponent)
          New annotation created with view tool.
 void pageAnnotationsInitialized(org.icepdf.core.pobjects.Page page)
          Implemented Annotation Callback method.
 void processAnnotationAction(org.icepdf.core.pobjects.annotations.Annotation annotation, org.icepdf.core.pobjects.actions.Action action, int x, int y)
          Implemented Annotation Callback method.
 void removeAnnotation(PageViewComponent pageComponent, AnnotationComponent annotationComponent)
          Remove the annotation and ready state for save.
 void updateAnnotation(AnnotationComponent annotationComponent)
          Update the annotation and ready state for save.
 

Method Detail

processAnnotationAction

void processAnnotationAction(org.icepdf.core.pobjects.annotations.Annotation annotation,
                             org.icepdf.core.pobjects.actions.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.

Form Widgets submit and reset actions are also handled by this callback.

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

void pageAnnotationsInitialized(org.icepdf.core.pobjects.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

Parameters:
page - page that has been initialized. The pages annotations are available via an accessor method.

newAnnotation

void newAnnotation(PageViewComponent page,
                   AnnotationComponent annotationComponent)
New annotation created with view tool.

Parameters:
page - page that annotation was added to.
annotationComponent - annotation component to be added to page.

updateAnnotation

void updateAnnotation(AnnotationComponent annotationComponent)
Update the annotation and ready state for save.

Parameters:
annotationComponent - annotation component to be added to page.

removeAnnotation

void removeAnnotation(PageViewComponent pageComponent,
                      AnnotationComponent annotationComponent)
Remove the annotation and ready state for save.

Parameters:
pageComponent - page that annotation should be removed.
annotationComponent - annotation component to be added to page.