javax.swing.event
Class EventListenerList

java.lang.Object
  |
  +--javax.swing.event.EventListenerList
All Implemented Interfaces:
Serializable

public class EventListenerList
extends Object
implements Serializable

Unsafe:

See Also:
Serialized Form

Field Summary
protected  Object[] listenerList
           
private static Object[] NULL_ARRAY
           
 
Constructor Summary
EventListenerList()
          Suppressed:
 
Method Summary
 void add(Class t, EventListener l)
          Suppressed: Adds the listener as a listener of the specified type.
 int getListenerCount()
          Suppressed: Returns the total number of listeners for this listener list.
 int getListenerCount(Class t)
          Suppressed: Returns the total number of listeners of the supplied type for this listener list.
private  int getListenerCount(Object[] list, Class t)
           
 Object[] getListenerList()
          Suppressed: Passes back the event listener list as an array of ListenerType-listener pairs.
 EventListener[] getListeners(Class t)
          Suppressed: Return an array of all the listeners of the given type.
private  void readObject(ObjectInputStream s)
           
 void remove(Class t, EventListener l)
          Suppressed: Removes the listener as a listener of the specified type.
 String toString()
          Suppressed: Returns a string representation of the EventListenerList.
private  void writeObject(ObjectOutputStream s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ARRAY

private static final Object[] NULL_ARRAY

listenerList

protected transient Object[] listenerList
Constructor Detail

EventListenerList

public EventListenerList()
Suppressed:

Method Detail

getListenerList

public Object[] getListenerList()
Suppressed: Passes back the event listener list as an array of ListenerType-listener pairs. Note that for performance reasons, this implementation passes back the actual data structure in which the listener data is stored internally! This method is guaranteed to pass back a non-null array, so that no null-checking is required in fire methods. A zero-length array of Object should be returned if there are currently no listeners. WARNING!!! Absolutely NO modification of the data contained in this array should be made -- if any such manipulation is necessary, it should be done on a copy of the array returned rather than the array itself.


getListeners

public EventListener[] getListeners(Class t)
Suppressed: Return an array of all the listeners of the given type.

Returns:
all of the listeners of the specified type.
Since:
1.3

getListenerCount

public int getListenerCount()
Suppressed: Returns the total number of listeners for this listener list.


getListenerCount

public int getListenerCount(Class t)
Suppressed: Returns the total number of listeners of the supplied type for this listener list.


getListenerCount

private int getListenerCount(Object[] list,
                             Class t)

add

public void add(Class t,
                EventListener l)
Suppressed: Adds the listener as a listener of the specified type.

Parameters:
t - the type of the listener to be added
l - the listener to be added

remove

public void remove(Class t,
                   EventListener l)
Suppressed: Removes the listener as a listener of the specified type.

Parameters:
t - the type of the listener to be removed
l - the listener to be removed

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
IOException

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
IOException
ClassNotFoundException

toString

public String toString()
Suppressed: Returns a string representation of the EventListenerList.

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?