Home » openjdk-7 » sun » awt » [javadoc | source]
sun.awt
public class: EventListenerAggregate [javadoc | source]
java.lang.Object
   sun.awt.EventListenerAggregate
A class that assists in managing java.util.EventListener s of the specified type. Its instance holds an array of listeners of the same type and allows to perform the typical operations on the listeners. This class is thread-safe.
Constructor:
 public EventListenerAggregate(Class listenerClass) 
    Constructs an EventListenerAggregate object.
    Parameters:
    listenerClass - the type of the listeners to be managed by this object
    Throws:
    NullPointerException - if listenerClass is null
    ClassCastException - if listenerClass is not assignable to java.util.EventListener
Method from sun.awt.EventListenerAggregate Summary:
add,   getListenersCopy,   getListenersInternal,   isEmpty,   remove,   size
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.awt.EventListenerAggregate Detail:
 public synchronized  void add(EventListener listener) 
    Adds the listener to this aggregate.
 public synchronized EventListener[] getListenersCopy() 
    Returns an array of all the listeners contained in this aggregate. The array is a copy of the data structure in which listeners are stored internally. The runtime type of the returned array is "array of listenerClass" (listenerClass has been specified as a parameter to the constructor of this class).
 public synchronized EventListener[] getListenersInternal() 
    Returns an array of all the listeners contained in this aggregate. The array is the data structure in which listeners are stored internally. The runtime type of the returned array is "array of listenerClass" (listenerClass has been specified as a parameter to the constructor of this class).
 public synchronized boolean isEmpty() 
    Returns true if this aggregate contains no listeners, false otherwise.
 public synchronized boolean remove(EventListener listener) 
    Removes a listener that is equal to the given one from this aggregate. equals() method is used to compare listeners.
 public synchronized int size() 
    Returns the number of lisetners in this aggregate.