|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--brf.j2me.dynaworks.env.EventQueue
The EventQueue represents a FIFO stack of events.
An Event is appended to the EventQueue via the 'push()' method. It is appended at the end of the queue and is processed after all previous events have been handled.
The next event from the EventQueue is retreived with the 'pop()' method. The boolean argument to the method decides whether the method should block until there is an Event available.
When an application registers with the Environment, it passes its EventQueue object to the environment. There the implementation dependend event sources (system event loop) are linked to that EventQueue. That ensures that all system and user interaction events are passed to the EventQueue and can be processed by the application.
Application,
Event,
Environment| Field Summary | |
private java.util.Vector |
queue
vector holding the events. |
private java.lang.Object |
semaphore
semaphore for 'wait for event'. |
| Constructor Summary | |
EventQueue()
constructor. |
|
| Method Summary | |
Event |
pop(boolean wait)
push an event onto the event stack (queue = fifo stack). |
boolean |
push(Event e)
push an event onto the event stack (queue = fifo stack). |
void |
reset()
reset the EventQueue. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Vector queue
private java.lang.Object semaphore
| Constructor Detail |
public EventQueue()
| Method Detail |
public boolean push(Event e)
public Event pop(boolean wait)
public void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||