- java.lang.Object
-
- org.icepdf.ri.common.tools.DynamicZoomHandler
-
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener,MouseInputListener,ToolHandler
public class DynamicZoomHandler extends Object implements ToolHandler, MouseWheelListener
Handles dynamic zoom which picks up on the mouse wheel rotation to zoom in or out depending on the direction.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description protected JScrollPanedocumentScrollPane
-
Constructor Summary
Constructors Constructor Description DynamicZoomHandler(DocumentViewController documentViewController, JScrollPane documentScrollPane)
-
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)voidmouseDragged(MouseEvent e)voidmouseEntered(MouseEvent e)voidmouseExited(MouseEvent e)voidmouseMoved(MouseEvent e)voidmousePressed(MouseEvent e)voidmouseReleased(MouseEvent e)voidmouseWheelMoved(MouseWheelEvent e)Handles ctl-wheel mouse for document zooming.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.
-
-
-
Field Detail
-
documentScrollPane
protected final JScrollPane documentScrollPane
-
-
Constructor Detail
-
DynamicZoomHandler
public DynamicZoomHandler(DocumentViewController documentViewController, JScrollPane documentScrollPane)
-
-
Method Detail
-
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent e)
Handles ctl-wheel mouse for document zooming.- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
e- mouse wheel event.
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- 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
-
-