yu.ac.bg.etf.javaqx.core.events
Class EventListenerList

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.events.EventListenerList

public class EventListenerList
extends java.lang.Object

EventListener List.

NOTE: This class is not full compatible with javax.swing.event.EventListenerList class!

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Constructor Summary
EventListenerList()
          Constructs new EventListenerList object.
 
Method Summary
 void add(java.lang.Class listenerType, java.util.EventListener listener)
          Adds new listener.
 boolean containsListener(java.lang.Class listenerType, java.util.EventListener listener)
          Returns true if the specified listener is added.
 int getListenerCount()
          Returns the number of listener groups.
 int getListenerCount(java.lang.Class listenerType)
          Returns the number of listeners specified by the listener type.
 int getListenerGroupsCount()
          Returns the number of listener groups.
 java.util.EventListener[] getListeners(java.lang.Class listenerType)
          Returns listeners specified by the listener type.
 java.util.EventListener[] getListenersArray(java.lang.Class listenerType)
          Returns listeners specified by the listener type.
 void remove(java.lang.Class listenerType, java.util.EventListener listener)
          Removes specified listener.
 void removeAll()
          Removes all listeners.
 void removeAll(java.lang.Class listenerType)
          Removes all listeners of the specified type.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventListenerList

public EventListenerList()
Constructs new EventListenerList object.

Method Detail

add

public void add(java.lang.Class listenerType,
                java.util.EventListener listener)
Adds new listener.

Parameters:
listenerType - the type of the listener
listener - the listener

remove

public void remove(java.lang.Class listenerType,
                   java.util.EventListener listener)
Removes specified listener.

Parameters:
listenerType - the type of the listener
listener - the listener to be removed

removeAll

public void removeAll(java.lang.Class listenerType)
Removes all listeners of the specified type.

Parameters:
listenerType - the listener type

removeAll

public void removeAll()
Removes all listeners.


getListenerCount

public int getListenerCount()
Returns the number of listener groups.

Returns:
the number of listener groups

getListenerCount

public int getListenerCount(java.lang.Class listenerType)
Returns the number of listeners specified by the listener type.

Parameters:
listenerType - the type of the listener
Returns:
the number of listeners specified by the listener type

getListenerGroupsCount

public int getListenerGroupsCount()
Returns the number of listener groups.

Returns:
the number of listener groups

containsListener

public boolean containsListener(java.lang.Class listenerType,
                                java.util.EventListener listener)
Returns true if the specified listener is added.

Parameters:
listenerType - the type of the listener
listener - the listener
Returns:
true if the specified listener is added

getListeners

public java.util.EventListener[] getListeners(java.lang.Class listenerType)
Returns listeners specified by the listener type.

Parameters:
listenerType - the type of the listener
Returns:
listeners specified by the listener type

getListenersArray

public java.util.EventListener[] getListenersArray(java.lang.Class listenerType)
Returns listeners specified by the listener type.

WARNING: This method does not return copy of listeners!

Parameters:
listenerType - the type of the listener
Returns:
listeners specified by the listener type

toString

public java.lang.String toString()



Copyright © 2007 ETF and contributors. All Rights Reserved.