jfig.gui
Class MouseWheelZoomPanHandler
java.lang.Object
jfig.gui.MouseWheelZoomPanHandler
- All Implemented Interfaces:
- java.util.EventListener, java.awt.event.MouseWheelListener
- public class MouseWheelZoomPanHandler
- extends java.lang.Object
- implements java.awt.event.MouseWheelListener
MouseWheelZoomPanHandler allows to control zooming and panning
on a FigSwingCanvas via the mouse wheel and modifier keys.
Currently, the behaviour is the following:
- wheel-up: pan up
- wheel-down: pan down
- shift+wheel-up: pan left
- shift+wheel-down: pan right
- control+wheel-up: zoom out
- control+wheel-down: zoom in
To avoid major complications with older JDK releases, almost
all functions are called via reflection.
Field Summary |
protected java.lang.Object |
canvas
|
protected java.lang.Object |
editor
|
protected boolean |
enabled
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
editor
protected java.lang.Object editor
canvas
protected java.lang.Object canvas
enabled
protected boolean enabled
MouseWheelZoomPanHandler
public MouseWheelZoomPanHandler(java.lang.Object editor,
java.lang.Object canvas)
call
public void call(java.lang.String methodname)
setEnabled
public void setEnabled(java.lang.Boolean B)
setEnabled
public void setEnabled(boolean b)
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt)
- Specified by:
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
msg
public void msg(java.lang.String s)