|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jstatcom.model.JSCDataEventSupport
public final class JSCDataEventSupport
A support class for JSCData
objects that manages adding,
removing and notification of the different JSCDataListener
.
This class is not thread-save but clients must handle synchronization.
Constructor Summary | |
---|---|
JSCDataEventSupport()
JSCDataEventSupport constructor. |
Method Summary | |
---|---|
void |
addListener(JSCDataListener evtListener,
JSCDataEventTypes evtType)
Adds evtListener to the list of listeners for events of
type evtType . |
void |
dispatchEvent(JSCDataEvent evt)
Dispatches evt by calling valueChanged of
all registered listeners to events of type evt.getType . |
java.util.List<JSCDataListener> |
getListenersForType(JSCDataEventTypes evtType)
Gets a list with all registered listeners for evtType . |
void |
removeListener(JSCDataListener evtListener)
Removes evtListener from all listener lists. |
java.lang.String |
toString()
Gets a string representation of this. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JSCDataEventSupport()
JSCDataEventSupport
constructor.
Method Detail |
---|
public void addListener(JSCDataListener evtListener, JSCDataEventTypes evtType)
evtListener
to the list of listeners for events of
type evtType
.
evtListener
- the JSCDataListener
that gets notified whenever
an event of evtType
occursevtType
- the event type
java.lang.IllegalArgumentException
- if (evtListener == null || evtType == null)
public void dispatchEvent(JSCDataEvent evt)
evt
by calling valueChanged
of
all registered listeners to events of type evt.getType
.
evt
- the event to be dispatched
java.lang.IllegalArgumentException
- if (evt == null)
public java.util.List<JSCDataListener> getListenersForType(JSCDataEventTypes evtType)
evtType
.
evtType
- the event type
evtType
public void removeListener(JSCDataListener evtListener)
evtListener
from all listener lists. Nothing
happens if evtListener
is currently not a listener.
evtListener
- the JSCDataListener
to be removed
java.lang.IllegalArgumentException
- if (evtListener == null)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |