|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jstatcom.model.SymbolEventSupport
public final class SymbolEventSupport
A support class for Symbol objects that manages adding,
removing and notification of the different SymbolListener.
The events fired in dispatch are fired within the AWT event
dispatching thread.
This class is not thread-save but clients must handle synchronization.
| Constructor Summary | |
|---|---|
SymbolEventSupport()
SymbolEventSupport constructor. |
|
| Method Summary | |
|---|---|
void |
addListener(SymbolListener evtListener,
SymbolEventTypes evtType)
Adds evtListener to the list of listeners for events of
type evtType. |
void |
dispatchEvent(SymbolEvent evt)
Dispatches evt by calling valueChanged of
all registered listeners to events of type evt.getType. |
java.util.List<SymbolListener> |
getListenersForType(SymbolEventTypes evtType)
Gets a list with all registered listeners for evtType. |
void |
removeListener(SymbolListener 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 SymbolEventSupport()
SymbolEventSupport constructor.
| Method Detail |
|---|
public void addListener(SymbolListener evtListener,
SymbolEventTypes evtType)
evtListener to the list of listeners for events of
type evtType.
evtListener - the SymbolListener that gets notified whenever
an event of evtType occursevtType - the event type
java.lang.IllegalArgumentException - if (evtListener == null || evtType == null)public void dispatchEvent(SymbolEvent evt)
evt by calling valueChanged of
all registered listeners to events of type evt.getType.
The valueChanged methods are called within the event
dispatching thread.
evt - the event to be dispatched
java.lang.IllegalArgumentException - if (evt == null)public java.util.List<SymbolListener> getListenersForType(SymbolEventTypes evtType)
evtType.
evtType - the event type
evtTypepublic void removeListener(SymbolListener evtListener)
evtListener from all listener lists. Nothing
happens if evtListener is currently not a listener.
evtListener - the SymbolListener 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 | |||||||||