org.PingOO.DLAI.lib.appli.event
Class AppliEventListenerList
java.lang.Object
|
+--org.PingOO.DLAI.lib.appli.event.AppliEventListenerList
- public final class AppliEventListenerList
- extends java.lang.Object
Manages a shared list of AppliListeners.
Inspired by javax.swing.evet.EventListenerList.java, but it does not extend it for performance reasons.
The included AppliListenersList is also shared by all registered applis.
- Since:
- PingOO 2.0
- Version:
- 2.0
- Author:
- Fabrice Bouyé (bouye@cur-archamps.fr)
- See Also:
EventListenerList
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
listenerList
private static AppliListener[] listenerList
- The list of AppliListeners.
AppliEventListenerList
public AppliEventListenerList()
- Creates a new AppliEventListenerList.
getListenerList
public AppliListener[] getListenerList()
- This passes back the event listener list as an array of AppliListener.
Note that for performance reasons, this implementation passes back the actual data structure in which the listner 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.
- Returns:
- The AppliListener array.
getListenerCount
public final int getListenerCount()
- Returns the total number of listeners for this listenerlist.
- Returns:
- The total number of listeners for this listenerlist.
add
public final void add(AppliListener listener)
- Adds the specified listener to the list.
- Parameters:
listener - The listener to be added.
remove
public final void remove(AppliListener listener)
- Removes the specified listener from the list.
- Parameters:
listener - The listener to be removed.