public class GenericEventListenerList extends java.lang.Object implements Clearable
GenericEvent
). For each type of event
it checks for appropriate listeners and calls the appropriate callback method on them (which is determined by
reflection).GenericEvent
Constructor and Description |
---|
GenericEventListenerList() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(GenericEvent.Listener l)
Adds the given listener to the list.
|
void |
clear()
Removes all listeners from the list
|
void |
clearLater()
If clear is done during an event dispatching it must be delayed!
|
boolean |
contains(GenericEvent.Listener l)
Tells whether the list contains the given Listener
|
void |
fireEvent(boolean isSafeMode,
GenericEvent event)
Fires the given event to the appropriate listeners by calling the
event-specific appropriate callback-method on it.
|
void |
fireEvent(GenericEvent event)
Fires the given event to the appropriate listeners by calling the
event-specific appropriate callback-method on it.
|
java.util.List<GenericEvent.Listener> |
getListeners()
Makes a copy of the inner list accessible for testing purposes.
|
int |
getSize() |
boolean |
isEmpty() |
boolean |
isNumb()
Tells whether event firing is disabled.
|
void |
removeListener(GenericEvent.Listener l)
Removes the given listener from the list
|
void |
removeListenerLater(GenericEvent.Listener l)
If removing is done during an event dispatching it must be delayed!
|
void |
setNumb(boolean isNumb)
Disables the firing of events.
|
public java.util.List<GenericEvent.Listener> getListeners()
public void setNumb(boolean isNumb)
public boolean isNumb()
public void addListener(GenericEvent.Listener l)
public boolean contains(GenericEvent.Listener l)
public void removeListener(GenericEvent.Listener l)
public void removeListenerLater(GenericEvent.Listener l)
public void clear()
public void clearLater()
public void fireEvent(GenericEvent event)
public void fireEvent(boolean isSafeMode, GenericEvent event)
isSafeMode
- avoids concurrent modifications during event-dispatching (slower)public int getSize()
public boolean isEmpty()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.