Package org.oscim.event
Class EventDispatcher<E extends EventListener,T>
java.lang.Object
org.oscim.event.EventDispatcher<E,T>
- Type Parameters:
T- the event source typeE- the event 'data' type
The Class EventDispatcher.
Events MUST be dispatched from main-loop! To add events from other
threads use:
Map.post(new Runnable(){ public void run(tell(event,data);)};);
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mListeners
The list of listeners.
-
-
Constructor Details
-
EventDispatcher
public EventDispatcher()
-
-
Method Details
-
bind
Bind listener for event notifications. -
unbind
Remove listener. -
tell
Tell listeners whats going on.- Parameters:
event- the eventdata- the data
-
fire
-
clear
public void clear()Remove all listeners.
-