org.icepdf.ri.common.tools
Class LineArrowAnnotationHandler

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.LineAnnotationHandler
              extended by org.icepdf.ri.common.tools.LineArrowAnnotationHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener, ToolHandler

public class LineArrowAnnotationHandler
extends LineAnnotationHandler

LineArrowAnnotationHandler tool is responsible for painting representation of a line arrow on the screen during a click and drag mouse event. The first point is recorded on mousePressed and the line is drawn from first point the current location of the mouse. An open arrow is drawn at the starting point.

Once the mouseReleased event is fired this handler will create new LineArrowAnnotation 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.LineAnnotationHandler
borderStyle, endLineEnding, endOfLine, internalColor, lineColor, startLineEnding, startOfLine, stroke
 
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
LineArrowAnnotationHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent, DocumentViewModel documentViewModel)
           
 
Method Summary
 void paintTool(java.awt.Graphics g)
          Paints the tools pre-annotation creation state.
 
Methods inherited from class org.icepdf.ri.common.tools.LineAnnotationHandler
convertToPageSpace, installTool, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, 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, convertToPageSpace, getPageTransform, getPageTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineArrowAnnotationHandler

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

paintTool

public void paintTool(java.awt.Graphics g)
Description copied from interface: ToolHandler
Paints the tools pre-annotation creation state.

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