crystalspace.jbind.impl.csutil.event
Class csEventHandler

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.csutil.event.csEventHandler
All Implemented Interfaces:
iBase, iEventHandler, iJPointer, iPointer

public final class csEventHandler
extends csBase
implements iEventHandler

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csEventHandler(iEventHandler handler)
           
csEventHandler(iPointer nPointer)
           
csEventHandler(iPointer nPointer, iEventHandler handler)
           
 
Method Summary
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
 boolean handleEvent(iEvent event)
          This is the basic event handling function.
static void initSCF()
           
protected  boolean isNativePointerValidSafe(long pointer)
           
protected  void nDelete(long pointer)
           
 void setHandler(iEventHandler handler)
           
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csEventHandler

public csEventHandler(iPointer nPointer)

csEventHandler

public csEventHandler(iPointer nPointer,
                      iEventHandler handler)

csEventHandler

public csEventHandler(iEventHandler handler)
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

handleEvent

public boolean handleEvent(iEvent event)
Description copied from interface: iEventHandler
This is the basic event handling function. To receive events, a component must implement iEventHandler and register with an event queue using iEventQueue::RegisterListener(). The event handler should return true if the event was handled. Returning true prevents the event from being passed along to other event handlers. If the event was not handled, then false should be returned, in which case other event handlers are given a shot at the event. Note that broadcast events are sent to all handlers which are interested in them regardless of the return value of this method. NOTE: Do _not_ return true unless you really handled the event and want event dispatch to stop at your handler. Implemented in csEngine::EventHandler, csBaseEventHandler, csKeyboardDriver::eiEventHandler, csMouseDriver::eiEventHandler, csJoystickDriver::eiEventHandler, csApp::csAppPlugin::eiEventHandler, csMovieRecorder::EventHandler, and csPGInputHandler.

Specified by:
handleEvent in interface iEventHandler
Parameters:
event -
Returns:

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject

nDelete

protected void nDelete(long pointer)
Overrides:
nDelete in class csBase
See Also:
csNativeObject.nDelete(long)

setHandler

public void setHandler(iEventHandler handler)