|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectutil.SimEventTarget
public class SimEventTarget
This class defines the sim events dispatcher. It allows listeners to be registered to receive events based on event type. When an event is passed to "dispatchEvent()" the listeners registered for the event type are called successively in the order they were registered.
| Constructor Summary | |
|---|---|
SimEventTarget()
Create an instance of a sim event target object. |
|
| Method Summary | |
|---|---|
void |
addEventListener(java.lang.String type,
SimEventListener listener)
Add an event listener for a given event type. |
void |
dispatchEvent(SimEvent event)
Dispatch an event to the listeners registered for its type. |
void |
Print()
Print a string representation of the queue and its current contents. |
void |
removeEventListener(java.lang.String type,
SimEventListener listener)
Remove an event listener for a given event type. |
java.lang.String |
toString()
Get a string representation of the queue and its current contents. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimEventTarget()
| Method Detail |
|---|
public void addEventListener(java.lang.String type,
SimEventListener listener)
type - the event type for this listener. If null the
listener will be called for every event type before the listeners for
any specific type.listener - the event listener to add.
public void removeEventListener(java.lang.String type,
SimEventListener listener)
type - the event type for this listener.listener - the event listener to remove.public void dispatchEvent(SimEvent event)
event - the event to dispatch to its registered listeners.public java.lang.String toString()
toString in class java.lang.Objectpublic void Print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||