edu.umd.cs.piccolo.event
Class PBasicInputEventHandler

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

public class PBasicInputEventHandler
extends java.lang.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  java.lang.String paramString()
          Returns a string representing the state of this node.
 void processEvent(PInputEvent event, int type)
           
 void setEventFilter(PInputEventFilter newEventFilter)
           
 java.lang.String toString()
          Returns a string representation of this object for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PBasicInputEventHandler

public PBasicInputEventHandler()
Method Detail

processEvent

public void processEvent(PInputEvent event,
                         int type)
Specified by:
processEvent in interface PInputEventListener

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)

toString

public java.lang.String toString()
Returns a string representation of this object for debugging purposes.

Overrides:
toString in class java.lang.Object

paramString

protected java.lang.String paramString()
Returns a string representing the state of this node. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Returns:
a string representation of this node's state


Copyright © 2008 by University of Maryland, College Park, MD 20742, USA All rights reserved.