at.tuwien.ifs.somtoolbox.apps.viewer.handlers
Class MyWheelZoomEventHandler

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
      extended by at.tuwien.ifs.somtoolbox.apps.viewer.handlers.MyWheelZoomEventHandler
All Implemented Interfaces:
edu.umd.cs.piccolo.event.PInputEventListener, EventListener

public class MyWheelZoomEventHandler
extends edu.umd.cs.piccolo.event.PBasicInputEventHandler

Handles zooming by the mouse wheel.

Version:
$Id: MyWheelZoomEventHandler.java 3589 2010-05-21 10:42:01Z mayer $
Author:
Robert Neumayer

Field Summary
private static double maxScale
           
private static double minScale
           
 
Constructor Summary
MyWheelZoomEventHandler()
           
 
Method Summary
 void mouseWheelRotated(edu.umd.cs.piccolo.event.PInputEvent e)
           
static void processZoomEvent(edu.umd.cs.piccolo.event.PInputEvent e, int zoomDirection, edu.umd.cs.piccolo.PCamera camera)
          This method actually handles the zoom event; the method is also used by the key event handler in SOMPane.
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minScale

private static double minScale

maxScale

private static double maxScale
Constructor Detail

MyWheelZoomEventHandler

public MyWheelZoomEventHandler()
Method Detail

mouseWheelRotated

public void mouseWheelRotated(edu.umd.cs.piccolo.event.PInputEvent e)
Overrides:
mouseWheelRotated in class edu.umd.cs.piccolo.event.PBasicInputEventHandler

processZoomEvent

public static void processZoomEvent(edu.umd.cs.piccolo.event.PInputEvent e,
                                    int zoomDirection,
                                    edu.umd.cs.piccolo.PCamera camera)
This method actually handles the zoom event; the method is also used by the key event handler in SOMPane.