|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.grimoire.events.Dispatcher<L>
L - the event listener interface.public class Dispatcher<L>
Dispatches events for a given listener type. When events are fired, the known listeners are fired from the most-recently-added backwards (to allow for listeners that intercept events).
| Constructor Summary | |
|---|---|
Dispatcher()
|
|
| Method Summary | |
|---|---|
void |
addListener(L listener)
Adds a listener to the head of the listener queue. |
void |
fire(Firer<L> firer)
Dispatches an event. |
void |
removeListener(L listener)
Removes a listener from the dispatcher. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dispatcher()
| Method Detail |
|---|
public void addListener(L listener)
listener - the listener to add.public void fire(Firer<L> firer)
Firer.fire(Object) method will
be applied to every listener in the dispatcher, from the most recently
added to the oldest.
firer - the event firer implementation.public void removeListener(L listener)
listener - the listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||