Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jrex.event
Class JRexEventManager

    java.lang.Object
      org.mozilla.jrex.event.JRexEventManager

All Implemented Interfaces:
  Runnable

public final class JRexEventManager
extends Object
implements Runnable

The JRex EventManager class. This class maintains a event queue for which jrex event's can be posted. All the native events that should be propagated to java are posted to the EventManager via postEvent. The Event Manager identifies the event handler according to the event type and dispatches the event. It supports synchronus(The event posting thread will block till event is executed) and asynchronus mode event posting. All mouse and key event posted by native engine are not handled by JRex EventManager instead the events are pumped into java event queue. Note:- If you are posting event manually the notifier object should be of type JRexEventLock When initialized this class pre-loads all the mozilla event related classes. Classes are loaded manually to register method & field signatures for JNI, Helps in speeding up jni calls(ie,native to java call). The list of class to be loaded is listed in 'jrex.cls' file. If any new mozilla event is added the class should be listed in jrex.cls' file.

Version:
  1.0
Author:
  C.N.Medappa
See Also:
  `JRexEventType`

Nested Class Summary
`static class` | `JRexEventManager.JRexEventLock`

Method Summary
`static JRexEventManager` | `getInstance()` Method to get instance of JRex EventManager.
`void` | `postEvent(JRexEvent event)` Posts the JRexEvent to the internal Queue, no coalescing is done.
`Object` | `postSyncEvent(JRexEvent event)` Posts the JRexEvent to the internal Queue.
`void` | `run()` The event dispatch threads run method.
`void` | `startEventManager()` Method to start EventManager, results in creation of event qeue and starts event dispatch thread.
`void` | `stopEventManager()` Method to stop EventManager.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static JRexEventManager getInstance()

  Method to get instance of JRex EventManager.

### startEventManager

    public void startEventManager()

  Method to start EventManager, results in creation of event qeue and starts event dispatch thread.

### postEvent

    public void postEvent(JRexEvent event)

  Posts the JRexEvent to the internal Queue, no coalescing is done. The call will return without waiting for the event to processed.

  Parameters:
    `event` - an instance of `org.mozilla.jrex.event.JRexEvent`

### postSyncEvent

    public Object postSyncEvent(JRexEvent event)

  Posts the JRexEvent to the internal Queue. The call will wait for the event to processed.

  Parameters:
    `event` - an instance of `org.mozilla.jrex.event.JRexEvent`

### stopEventManager

    public void stopEventManager()

  Method to stop EventManager.

### run

    public void run()

  The event dispatch threads run method.

  Specified by:
    `run` in interface `Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 C.N.Medappa. All Rights Reserved.