edu.umd.cs.piccolox.event
Class PZoomToEventHandler

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
      extended by edu.umd.cs.piccolox.event.PZoomToEventHandler
All Implemented Interfaces:
PInputEventListener, EventListener

public class PZoomToEventHandler
extends PBasicInputEventHandler

PZoomToEventHandler is used to zoom the camera view to the node clicked on with button one.

Version:
1.0
Author:
Jesse Grosjean

Constructor Summary
PZoomToEventHandler()
          Constructs a PZoomToEventHandler that only recognizes BUTTON1 events.
 
Method Summary
 void mousePressed(PInputEvent event)
          Zooms the camera's view to the pressed node when button 1 is pressed.
protected  void zoomTo(PInputEvent event)
          Zooms the camera to the picked node of the event.
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PZoomToEventHandler

public PZoomToEventHandler()
Constructs a PZoomToEventHandler that only recognizes BUTTON1 events.

Method Detail

mousePressed

public void mousePressed(PInputEvent event)
Zooms the camera's view to the pressed node when button 1 is pressed.

Overrides:
mousePressed in class PBasicInputEventHandler
Parameters:
event - event representing the mouse press

zoomTo

protected void zoomTo(PInputEvent event)
Zooms the camera to the picked node of the event.

Parameters:
event - Event from which to extract the zoom target


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.