edu.umd.cs.piccolo.event
Class PBasicInputEventHandler

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
All Implemented Interfaces:
PInputEventListener, EventListener
Direct Known Subclasses:
PDragSequenceEventHandler, PInputManager

public class PBasicInputEventHandler
extends Object
implements PInputEventListener

PBasicInputEventHandler is the standard class in Piccolo that is used to register for mouse and keyboard events on a PNode. Note the events that you get depends on the node that you have registered with. For example you will only get mouse moved events when the mouse is over the node that you have registered with, not when the mouse is over some other node.

Version:
1.0
Author:
Jesse Grosjean

Constructor Summary
PBasicInputEventHandler()
           
 
Method Summary
 boolean acceptsEvent(PInputEvent event, int type)
           
 PInputEventFilter getEventFilter()
           
 void keyboardFocusGained(PInputEvent event)
           
 void keyboardFocusLost(PInputEvent event)
           
 void keyPressed(PInputEvent event)
           
 void keyReleased(PInputEvent event)
           
 void keyTyped(PInputEvent event)
           
 void mouseClicked(PInputEvent event)
           
 void mouseDragged(PInputEvent event)
           
 void mouseEntered(PInputEvent event)
           
 void mouseExited(PInputEvent event)
           
 void mouseMoved(PInputEvent event)
           
 void mousePressed(PInputEvent event)
           
 void mouseReleased(PInputEvent event)
           
 void mouseWheelRotated(PInputEvent event)
           
 void mouseWheelRotatedByBlock(PInputEvent event)
           
protected  String paramString()
          Deprecated. see http://code.google.com/p/piccolo2d/issues/detail?id=99
 void processEvent(PInputEvent event, int type)
          Called whenever an event is emitted.
 void setEventFilter(PInputEventFilter newEventFilter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBasicInputEventHandler

public PBasicInputEventHandler()
Method Detail

processEvent

public void processEvent(PInputEvent event,
                         int type)
Description copied from interface: PInputEventListener
Called whenever an event is emitted. Used to notify listeners that an event is available for proecessing.

Specified by:
processEvent in interface PInputEventListener
Parameters:
event - event that was emitted
type - type of event

acceptsEvent

public boolean acceptsEvent(PInputEvent event,
                            int type)

getEventFilter

public PInputEventFilter getEventFilter()

setEventFilter

public void setEventFilter(PInputEventFilter newEventFilter)

keyPressed

public void keyPressed(PInputEvent event)

keyReleased

public void keyReleased(PInputEvent event)

keyTyped

public void keyTyped(PInputEvent event)

mouseClicked

public void mouseClicked(PInputEvent event)

mousePressed

public void mousePressed(PInputEvent event)

mouseDragged

public void mouseDragged(PInputEvent event)

mouseEntered

public void mouseEntered(PInputEvent event)

mouseExited

public void mouseExited(PInputEvent event)

mouseMoved

public void mouseMoved(PInputEvent event)

mouseReleased

public void mouseReleased(PInputEvent event)

mouseWheelRotated

public void mouseWheelRotated(PInputEvent event)

mouseWheelRotatedByBlock

public void mouseWheelRotatedByBlock(PInputEvent event)

keyboardFocusGained

public void keyboardFocusGained(PInputEvent event)

keyboardFocusLost

public void keyboardFocusLost(PInputEvent event)

paramString

protected String paramString()
Deprecated. see http://code.google.com/p/piccolo2d/issues/detail?id=99



Copyright © 1995-2011 Piccolo2D. All Rights Reserved.