edu.umd.cs.piccolo.event
Class PBasicInputEventHandler
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PBasicInputEventHandler
public PBasicInputEventHandler()
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 emittedtype
- 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.