- java.lang.Object
-
- org.icepdf.ri.common.tools.PanningHandler
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,EventListener,MouseInputListener,ToolHandler
public class PanningHandler extends Object implements ToolHandler
Container logic used for view panning via mouse dragging for page views. Panning can be handle in the view and doesn't need to be handled by the page components.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description PanningHandler(DocumentViewController documentViewController, DocumentViewModel documentViewModel, AbstractDocumentView parentComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinstallTool()Callback code that allows post construct task to take place when the tool is selected via theAbstractDocumentView.setToolMode(int)call.voidmouseClicked(MouseEvent e)Invoked when the mouse button has been clicked (pressed and released) on a component.voidmouseDragged(MouseEvent e)Mouse dragged, initiates page panning if the tool is selected.voidmouseEntered(MouseEvent e)Invoked when the mouse enters a component.voidmouseExited(MouseEvent e)Invoked when the mouse exits a component.voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)Invoked when a mouse button has been pressed on a component.voidmouseReleased(MouseEvent e)Invoked when a mouse button has been released on a component.voidpaintTool(Graphics g)Paints the tools pre-annotation creation state.voiduninstallTool()Callback code that allows pre destroy task to take place when the tool is unselected via theAbstractDocumentView.setToolMode(int)call.
-
-
-
Constructor Detail
-
PanningHandler
public PanningHandler(DocumentViewController documentViewController, DocumentViewModel documentViewModel, AbstractDocumentView parentComponent)
-
-
Method Detail
-
mouseDragged
public void mouseDragged(MouseEvent e)
Mouse dragged, initiates page panning if the tool is selected.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Parameters:
e- awt mouse event
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseClicked
public void mouseClicked(MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component.- Specified by:
mouseClickedin interfaceMouseListener
-
mousePressed
public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceMouseListener
-
paintTool
public void paintTool(Graphics g)
Description copied from interface:ToolHandlerPaints the tools pre-annotation creation state.- Specified by:
paintToolin interfaceToolHandler- Parameters:
g- graphics context
-
installTool
public void installTool()
Description copied from interface:ToolHandlerCallback code that allows post construct task to take place when the tool is selected via theAbstractDocumentView.setToolMode(int)call.- Specified by:
installToolin interfaceToolHandler
-
uninstallTool
public void uninstallTool()
Description copied from interface:ToolHandlerCallback code that allows pre destroy task to take place when the tool is unselected via theAbstractDocumentView.setToolMode(int)call.- Specified by:
uninstallToolin interfaceToolHandler
-
-