|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.views.common.SelectionBoxHandler
org.icepdf.core.views.common.AnnotationHandler
public class AnnotationHandler
This classes purpose is to manage annotation selected state and the broadcaset of resized and moved for multiple selected components. The other purpose of this class is to handle the drawing of a selection box and handle the creation of new link annotation when the link annotation tool is selected
| Field Summary |
|---|
| Fields inherited from class org.icepdf.core.views.common.SelectionBoxHandler |
|---|
currentRect, dash1, previousRectDrawn, rectToDraw, selectionBoxColour, stroke |
| Constructor Summary | |
|---|---|
AnnotationHandler(AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
|
|
| Method Summary | |
|---|---|
AnnotationComponent |
addAnnotationComponent(Annotation annotation)
Wraps the specified annotaiton with a new Annotation component and adds it to the PageViewComponent as a child. |
void |
addSelectedAnnotation(AnnotationComponentImpl annotationComponent)
Adds an Annotation component to the list of selected. |
void |
clearSelectedList()
Clears the slected list of AnnotationComponent, PageViewComponent focus should be called after this method is called to insure deselection of all AnnotationComponents. |
void |
createNewLinkAnnotation()
Creates a new link annotation when the link annotation creation tool is selected. |
void |
initializeAnnotationComponents(java.util.ArrayList<Annotation> annotations)
Initializes the annotation components given the annotations collections. |
boolean |
isMultipleSelect()
Determines if there are more then one selected component. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
moveSelectedAnnotations(int x,
int y)
Moves all selected annotation components by the x,y translation. |
void |
paintAnnotations(java.awt.Graphics g)
Paints all annotation content for a given page view. |
void |
removeAnnotationComponent(AnnotationComponent annotation)
Removes the specified annotation from the page view. |
void |
removeSelectedAnnotation(AnnotationComponentImpl annotationComponent)
Adds an Annotation component to the list of selected. |
void |
resizeSelectedAnnotations(int width,
int height)
Resizes all selected annotation components by the width and height values. |
void |
setDocumentViewController(DocumentViewController documentViewController)
DocumentController callback |
| Methods inherited from class org.icepdf.core.views.common.SelectionBoxHandler |
|---|
clearRectangle, getCurrentRect, getRectToDraw, paintSelectionBox, resetRectangle, setCurrentRect, setRectToDraw, setSelectionSize, updateDrawableRect, updateSelectionSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationHandler(AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel)
| Method Detail |
|---|
public void setDocumentViewController(DocumentViewController documentViewController)
documentViewController - document controller.public void initializeAnnotationComponents(java.util.ArrayList<Annotation> annotations)
annotations - annotations to wrap with annotations components.public AnnotationComponent addAnnotationComponent(Annotation annotation)
annotation - new annotation to add to PageView.public void removeAnnotationComponent(AnnotationComponent annotation)
annotation - annotation component to removed.public void createNewLinkAnnotation()
public void addSelectedAnnotation(AnnotationComponentImpl annotationComponent)
annotationComponent - component to add to list of selected annotationspublic void removeSelectedAnnotation(AnnotationComponentImpl annotationComponent)
annotationComponent - remove the specified annotation from the
selection listpublic void clearSelectedList()
public boolean isMultipleSelect()
public void moveSelectedAnnotations(int x,
int y)
x - x-axis offset to be applied to all selected annotation.y - y-axis offset to be applied to all selected annotation.
public void resizeSelectedAnnotations(int width,
int height)
width - width offset to be applied to all selected annotation.height - height offset to be applied to all selected annotation.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void paintAnnotations(java.awt.Graphics g)
g - parent PageViewComponent graphics context to paint annotations
to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||