org.icepdf.ri.common.tools
Class CircleAnnotationHandler

java.lang.Object
  extended by org.icepdf.ri.common.tools.CommonToolHandler
      extended by org.icepdf.ri.common.tools.SelectionBoxHandler
          extended by org.icepdf.ri.common.tools.SquareAnnotationHandler
              extended by org.icepdf.ri.common.tools.CircleAnnotationHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener, ToolHandler

public class CircleAnnotationHandler
extends SquareAnnotationHandler

CircleAnnotationHandler tool is responsible for painting representation of a circle on the screen during a click and drag mouse event. The box created by this mouse event will be used to draw circle within its bounds.

Once the mouseReleased event is fired this handler will create new CircleAnnotation and respective AnnotationComponent. The addition of the Annotation object to the page is handled by the annotation callback.

Since:
5.0

Field Summary
 
Fields inherited from class org.icepdf.ri.common.tools.SquareAnnotationHandler
borderStyle, DEFAULT_STROKE_WIDTH, internalColor, lineColor, rectangle, stroke, strokeWidth, useInternalColor
 
Fields inherited from class org.icepdf.ri.common.tools.SelectionBoxHandler
currentRect, dash1, previousRectDrawn, rectToDraw, selectionBoxColour
 
Fields inherited from class org.icepdf.ri.common.tools.CommonToolHandler
documentViewController, documentViewModel, pageViewComponent
 
Constructor Summary
CircleAnnotationHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent, DocumentViewModel documentViewModel)
           
 
Method Summary
 void mouseReleased(java.awt.event.MouseEvent e)
          Create the annotation objects need to draw and manipulated the annotation using the GUI properties panels.
 void paintTool(java.awt.Graphics g)
          Paint a rough circle representing what the annotation will look like when created.
 
Methods inherited from class org.icepdf.ri.common.tools.SquareAnnotationHandler
convertToPageSpace, installTool, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, setSelectionRectangle, uninstallTool
 
Methods inherited from class org.icepdf.ri.common.tools.SelectionBoxHandler
clearRectangle, getCurrentRect, getRectToDraw, isOverPageComponent, paintSelectionBox, resetRectangle, setCurrentRect, setRectToDraw, setSelectionSize, updateDrawableRect, updateSelectionSize
 
Methods inherited from class org.icepdf.ri.common.tools.CommonToolHandler
convertMouseToPageSpace, convertRectangleToPageSpace, convertToPageSpace, convertToPageSpace, getPageTransform, getPageTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleAnnotationHandler

public CircleAnnotationHandler(DocumentViewController documentViewController,
                               AbstractPageViewComponent pageViewComponent,
                               DocumentViewModel documentViewModel)
Method Detail

paintTool

public void paintTool(java.awt.Graphics g)
Paint a rough circle representing what the annotation will look like when created.

Specified by:
paintTool in interface ToolHandler
Overrides:
paintTool in class SquareAnnotationHandler
Parameters:
g - graphics context

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Create the annotation objects need to draw and manipulated the annotation using the GUI properties panels.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class SquareAnnotationHandler
Parameters:
e - mouse event.