|
ADK CVS | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttryllian.util.event.EventDispatcher
A general event-registration and firing utility. It allows listeners to be added and removed during event dispatching and is thread-safe.
| Constructor Summary | |
EventDispatcher()
Creates a new EventDispatcher. |
|
EventDispatcher(ExceptionHandler handler)
Creates an EventDispatcher with an ExceptionHandler installed. |
|
| Method Summary | |
void |
addListener(java.util.EventListener listener)
Adds an object as listener. |
void |
fireEvent(java.util.EventObject event,
EventCallback callback)
Fires an event. |
boolean |
isEmpty()
Returns true if no listeners have been registered. |
void |
removeAllListeners()
Removes all listeners. |
void |
removeListener(java.util.EventListener listener)
Removes an object that was previously registered as a listener from the list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EventDispatcher()
public EventDispatcher(ExceptionHandler handler)
handler - handles RuntimeExceptions| Method Detail |
public void addListener(java.util.EventListener listener)
listener - the object that wants to listen to events.public void removeListener(java.util.EventListener listener)
listener - the object that wants to stop listeningpublic void removeAllListeners()
public boolean isEmpty()
public void fireEvent(java.util.EventObject event,
EventCallback callback)
event - the event to firecallback - the callback that is used to fire the event
|
Copyright 2005, Tryllian Solutions B.V. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||