com.lc.util
Class FilteredEventListenerList

java.lang.Object
  |
  +--com.lc.util.FilteredEventListenerList

public class FilteredEventListenerList
extends java.lang.Object

Modified version of EventListenerList, for implementing FilteredEventSupport. A class that holds a list of FilteredEventSupport.ListenerEntry, associated to the class of some EventObject.

Version:
issued from 1.32 03/02/01 (out of JDK 1.4 b2)
Author:
Laurent Caillette, Sun Microsystems

Field Summary
protected  java.lang.Object[] listenerList
          The list of ListenerType - Listener pairs
 
Constructor Summary
FilteredEventListenerList()
           
 
Method Summary
 void add(java.lang.Class t, FilteredEventSupport.ListenerEntry entry)
           
 boolean contains(java.lang.Class t, FilteredEventSupport.ListenerEntry entry)
          Checks if, for a given class, there is an equivalent ListenerEntry in the list.
 int getListenerCount()
           
 int getListenerCount(java.lang.Class t)
           
 FilteredEventSupport.ListenerEntry[] getListenerEntries(java.lang.Class t)
           
protected  java.lang.Object[] getListenerList()
           
 java.util.EventListener[] getListeners(java.lang.Class t, IEventFilter filter)
           
 void remove(java.lang.Class t, FilteredEventSupport.ListenerEntry entry)
          Removes the listener as a listener of the specified type.
 java.lang.String toString()
          Returns a string representation of the EventListenerList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listenerList

protected transient java.lang.Object[] listenerList
The list of ListenerType - Listener pairs
Constructor Detail

FilteredEventListenerList

public FilteredEventListenerList()
Method Detail

getListenerList

protected java.lang.Object[] getListenerList()

contains

public boolean contains(java.lang.Class t,
                        FilteredEventSupport.ListenerEntry entry)
Checks if, for a given class, there is an equivalent ListenerEntry in the list. Comparison with entry's listener is performed by address, comparison with entry's event filter is made using IEventFilter.sameFilterAs( IEventFilter ).
Parameters:
t - The class to which the entry's listener is associated.
entry - The entry to search equivalence from.
Returns:
true if found.

getListenerEntries

public FilteredEventSupport.ListenerEntry[] getListenerEntries(java.lang.Class t)

getListeners

public java.util.EventListener[] getListeners(java.lang.Class t,
                                              IEventFilter filter)

getListenerCount

public int getListenerCount()

getListenerCount

public int getListenerCount(java.lang.Class t)

add

public void add(java.lang.Class t,
                FilteredEventSupport.ListenerEntry entry)

remove

public void remove(java.lang.Class t,
                   FilteredEventSupport.ListenerEntry entry)
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

toString

public java.lang.String toString()
Returns a string representation of the EventListenerList.
Overrides:
toString in class java.lang.Object