Class EventListenerList

java.lang.Object
org.eclipse.draw2d.EventListenerList

public final class EventListenerList extends Object
This class is intended for internal use only. TODO: If this is for internal use only, we should move it to the internal package.
  • Constructor Details

    • EventListenerList

      public EventListenerList()
  • Method Details

    • addListener

      public <T> void addListener(Class<T> c, Object listener)
      Adds a listener of type c to the list.
      Parameters:
      c - the class
      listener - the listener
    • containsListener

      public <T> boolean containsListener(Class<T> c)
      Returns true if this list of listeners contains a listener of type c.
      Parameters:
      c - the type
      Returns:
      whether this list contains a listener of type c
    • getListeners

      public <T> Iterator<T> getListeners(Class<T> listenerType)
      Returns an Iterator of all the listeners of type c.
      Parameters:
      listenerType - the type
      Returns:
      an Iterator of all the listeners of type c
    • getListenersIterable

      public <T> Iterable<T> getListenersIterable(Class<T> listenerType)
      Returns a typed Iterable of all listeners of a of type c.
      Parameters:
      listenerType - the type
      Returns:
      an Iterable of all the listeners of type c
      Since:
      3.13
    • removeListener

      public <T> void removeListener(Class<T> c, Object listener)
      Removes the first listener of the specified type by identity.
      Parameters:
      c - the type
      listener - the listener