|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.AWTEventMulticaster | +--MovementRequestEventMulticaster
An event multicaster allows for multiple listeners to be registered for a single
broadcaster. The way that it works is this: each event multicaster is itself an
event listener and each multicaster sends objects to two listeners. When a
listener is added to the multicaster the multicaster adds a second multicaster as
its second listener and then that multicaster sets the listenere being added as
its first listener (leaving the second slot open for the addition of another
multicaster so as to add another listener.
Essentially the process is the creation of a chain. When a new link is added to
the chain it travels to the end.
When an event is broadcast it simply travels down the chain being sent to each listener
along the way.
Fields inherited from class java.awt.AWTEventMulticaster |
a,
b |
Constructor Summary | |
protected |
MovementRequestEventMulticaster(java.util.EventListener a,
java.util.EventListener b)
Creates a new multicaster. |
Method Summary | |
static MovementRequestListener |
add(MovementRequestListener a,
MovementRequestListener b)
Adds a listener a and multicaster b to the list. |
protected static java.util.EventListener |
addInternal(java.util.EventListener a,
java.util.EventListener b)
|
void |
movementRequested(MovementRequestEvent e)
This is the implementation which allows this class to implement MovementRequestListener . |
protected java.util.EventListener |
remove(java.util.EventListener l)
|
static MovementRequestListener |
remove(MovementRequestListener a,
MovementRequestListener b)
Removes a listener a and multicaster b from the list. |
Methods inherited from class java.awt.AWTEventMulticaster |
actionPerformed,
add,
add,
add,
add,
add,
add,
add,
add,
add,
add,
add,
add,
adjustmentValueChanged,
caretPositionChanged,
componentAdded,
componentHidden,
componentMoved,
componentRemoved,
componentResized,
componentShown,
focusGained,
focusLost,
inputMethodTextChanged,
itemStateChanged,
keyPressed,
keyReleased,
keyTyped,
mouseClicked,
mouseDragged,
mouseEntered,
mouseExited,
mouseMoved,
mousePressed,
mouseReleased,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
remove,
removeInternal,
save,
saveInternal,
textValueChanged,
windowActivated,
windowClosed,
windowClosing,
windowDeactivated,
windowDeiconified,
windowIconified,
windowOpened |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected MovementRequestEventMulticaster(java.util.EventListener a, java.util.EventListener b)
a
- object listeningb
- multicaster to chainMethod Detail |
public static MovementRequestListener add(MovementRequestListener a, MovementRequestListener b)
a
and multicaster b
to the list.
Remember that a MovementRequestEventMulticaster
is a MovementRequestListener
a
- object listeningb
- multicaster to chainpublic static MovementRequestListener remove(MovementRequestListener a, MovementRequestListener b)
a
and multicaster b
from the list.
Remember that a MovementRequestEventMulticaster
is a MovementRequestListener
a
- object listeningb
- multicasterprotected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b)
protected java.util.EventListener remove(java.util.EventListener l)
public void movementRequested(MovementRequestEvent e)
MovementRequestListener
.
A call to this begins the chain.e
- the event to broadcast
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |