Class EventListenerMap

java.lang.Object
org.jdesktop.swingx.event.EventListenerMap

public class EventListenerMap extends Object
Intended to be a replacement for EventListenerList.
See Also:
  • Field Details

  • Constructor Details

    • EventListenerMap

      public EventListenerMap()
  • Method Details

    • getListeners

      public List<EventListener> getListeners()
      Returns a list containing all of the listeners managed by this EventListenerMap.
      Returns:
      all managed listeners
    • getListeners

      public <T extends EventListener> List<T> getListeners(Class<T> clazz)
      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

      public <T extends EventListener> int getListenerCount(Class<T> clazz)
      Returns the total number of listeners for this listener type.
    • add

      public <T extends EventListener> void add(Class<T> clazz, T listener)
      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 add
      l - the listener to be added
    • remove

      public <T extends EventListener> void remove(Class<T> clazz, T listener)
      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 remove
      l - the listener to remove