public class EventListenerList
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
EventListenerList()
Creates a new listener list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.lang.Class listenerClass,
java.util.EventListener l)
Adds a listener of the given class to the list.
|
int |
getListenerCount(java.lang.Class listenerClass)
Returns the number of listeners present of the given class.
|
java.util.EventListener[] |
getListeners(java.lang.Class listenerClass)
Returns an array of listeners of the given class.
|
void |
removeListener(java.lang.Class listenerClass,
java.util.EventListener l)
Removes a listener of the given class from the list.
|
public void addListener(java.lang.Class listenerClass,
java.util.EventListener l)
listenerClass - the Class of the listener being addedl - the listener to addpublic int getListenerCount(java.lang.Class listenerClass)
listenerClass - the Class of the listener for which
the listener count is desiredClasspublic java.util.EventListener[] getListeners(java.lang.Class listenerClass)
listenerClass - the desired Class of listenerClass
(if no listeners of the specified class exist, an empty
array is returned)public void removeListener(java.lang.Class listenerClass,
java.util.EventListener l)
listenerClass - the Class of the listener being
removedl - the listener to remove