org.jdesktop.wonderland.client.input
Class EventClassListener

java.lang.Object
  extended by org.jdesktop.mtgame.EntityComponent
      extended by org.jdesktop.mtgame.ProcessorComponent
          extended by org.jdesktop.wonderland.client.input.EventListenerBaseImpl
              extended by org.jdesktop.wonderland.client.input.EventClassListener
All Implemented Interfaces:
EventListener
Direct Known Subclasses:
EnterExitEvent3DLogger, EventClassFocusListener, KeyEvent3DLogger, MouseEvent3DLogger, SpinObjectEventListener

public class EventClassListener
extends EventListenerBaseImpl

A simplified event listener which provides the input system with an array of event classes. By doing this the listener is telling the input system that it wishes to receive only events of these classes. This class ignores focus. If you wish to honor focus, use EventClassFocusListener instead. This class uses isAssignableFrom to compare the event class with the desired event classes, so if the return array of eventClassesToConsume contains a superclass, events of that class and all subclasses will be consumed.

Author:
deronj

Field Summary
 
Fields inherited from class org.jdesktop.wonderland.client.input.EventListenerBaseImpl
enabled
 
Constructor Summary
EventClassListener()
           
 
Method Summary
 boolean consumesEvent(Event event)
          INTERNAL ONLY.
 java.lang.Class[] eventClassesToConsume()
          Note on subclassing: the subclass should override this method.
 
Methods inherited from class org.jdesktop.wonderland.client.input.EventListenerBaseImpl
addToEntity, commit, commitEvent, compute, computeEvent, initialize, isEnabled, isListeningForEntity, postEvent, propagatesToParent, removeFromEntity, setEnabled
 
Methods inherited from class org.jdesktop.mtgame.ProcessorComponent
addToChain, getArmingCondition, getCurrentTriggerCollection, getLocation, getLODLevel, getRunInRenderer, getSwingSafe, removeFromChain, setArmingCondition, setLocation, setRunInRenderer, setSwingSafe
 
Methods inherited from class org.jdesktop.mtgame.EntityComponent
getEntity, setEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventClassListener

public EventClassListener()
Method Detail

eventClassesToConsume

public java.lang.Class[] eventClassesToConsume()
Note on subclassing: the subclass should override this method.

Returns:
An array of the event classes the listener wishes to consume.

consumesEvent

public boolean consumesEvent(Event event)
INTERNAL ONLY.

Specified by:
consumesEvent in interface EventListener
Overrides:
consumesEvent in class EventListenerBaseImpl
Parameters:
event - The event in question.


Open Wonderland - http://openwonderland.org