public class EventListenerList extends java.lang.Object
EventListenerList is thread-safe.
| Constructor and Description |
|---|
EventListenerList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.lang.Object listener)
Adds a new listener to the list of listeners.
|
java.util.Iterator |
getListeners()
Returns an Iterator used to find all the listeners previously added.
|
void |
removeListener(java.lang.Object listener)
Removes a listener from the list.
|
public EventListenerList()
public java.util.Iterator getListeners()
remove() on the Iterator.
Invoking this method takes a "snapshot" of the current list of listeners.
You may invoke addListener(Object) or removeListener(Object),
but that won't affect the sequence of listeners returned by the Iterator.
public void addListener(java.lang.Object listener)
public void removeListener(java.lang.Object listener)