Package org.jdesktop.swingx.event
Class EventListenerMap
java.lang.Object
org.jdesktop.swingx.event.EventListenerMap
Intended to be a replacement for
EventListenerList
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<Class<? extends EventListener>, List<? extends EventListener>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends EventListener>
voidAdds the listener as a listener of the specified type.int
Returns the total number of listeners of the supplied type for this listener list.<T extends EventListener>
intgetListenerCount
(Class<T> clazz) Returns the total number of listeners for this listener type.Returns a list containing all of the listeners managed by thisEventListenerMap
.<T extends EventListener>
List<T> getListeners
(Class<T> clazz) Return a list of all the listeners of the given type.<T extends EventListener>
voidRemoves the listener as a listener of the specified type.
-
Field Details
-
listenerList
-
-
Constructor Details
-
EventListenerMap
public EventListenerMap()
-
-
Method Details
-
getListeners
Returns a list containing all of the listeners managed by thisEventListenerMap
.- Returns:
- all managed listeners
-
getListeners
Return a list of all the listeners of the given type.- Returns:
- all of the listeners of the specified type.
-
getListenerCount
public int getListenerCount()Returns the total number of listeners of the supplied type for this listener list. -
getListenerCount
Returns the total number of listeners for this listener type. -
add
Adds the listener as a listener of the specified type.- Type Parameters:
T
- the type of the listener to be added- Parameters:
clazz
- the class type to addl
- the listener to be added
-
remove
Removes the listener as a listener of the specified type.- Type Parameters:
T
- the type of the listener to remove- Parameters:
clazz
- the class type to removel
- the listener to remove
-