org.icepdf.ri.common.tools
Class AnnotationSelectionHandler

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

public class AnnotationSelectionHandler
extends java.awt.event.MouseAdapter
implements ToolHandler

The AnnotationSelectionHandler is responsible for deselecting all annotations when the a mouse click event has been fired.

Since:
5.0

Field Summary
protected  DocumentViewController documentViewController
           
protected  DocumentViewModel documentViewModel
           
protected  AbstractPageViewComponent pageViewComponent
           
 
Constructor Summary
AnnotationSelectionHandler(DocumentViewController documentViewController, AbstractPageViewComponent pageViewComponent, DocumentViewModel documentViewModel)
           
 
Method Summary
 void installTool()
          Callback code that allows post construct task to take place when the tool is selected via the AbstractDocumentView.setToolMode(int) call.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void paintTool(java.awt.Graphics g)
          Paints the tools pre-annotation creation state.
 void uninstallTool()
          Callback code that allows pre destroy task to take place when the tool is unselected via the AbstractDocumentView.setToolMode(int) call.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.MouseListener
mouseEntered, mouseExited, mousePressed, mouseReleased
 

Field Detail

documentViewController

protected DocumentViewController documentViewController

documentViewModel

protected DocumentViewModel documentViewModel

pageViewComponent

protected AbstractPageViewComponent pageViewComponent
Constructor Detail

AnnotationSelectionHandler

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

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class java.awt.event.MouseAdapter

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
Parameters:
g - graphics context

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

installTool

public void installTool()
Description copied from interface: ToolHandler
Callback code that allows post construct task to take place when the tool is selected via the AbstractDocumentView.setToolMode(int) call.

Specified by:
installTool in interface ToolHandler

uninstallTool

public void uninstallTool()
Description copied from interface: ToolHandler
Callback code that allows pre destroy task to take place when the tool is unselected via the AbstractDocumentView.setToolMode(int) call.

Specified by:
uninstallTool in interface ToolHandler