public final class EventDispatchTreeImpl extends Object implements EventDispatchTree
| Constructor and Description |
|---|
EventDispatchTreeImpl() |
| Modifier and Type | Method and Description |
|---|---|
EventDispatchTree |
append(EventDispatcher eventDispatcher)
Appends the specified
EventDispatcher to this chain. |
EventDispatchTree |
createTree() |
Event |
dispatchEvent(Event event)
Dispatches the specified event through this
EventDispatchChain. |
EventDispatchTree |
mergeTree(EventDispatchTree tree) |
EventDispatchTree |
prepend(EventDispatcher eventDispatcher)
Prepends the specified
EventDispatcher to this chain. |
void |
reset() |
String |
toString() |
public void reset()
public EventDispatchTree createTree()
createTree in interface EventDispatchTreepublic EventDispatchTree mergeTree(EventDispatchTree tree)
mergeTree in interface EventDispatchTreepublic EventDispatchTree append(EventDispatcher eventDispatcher)
EventDispatchChainEventDispatcher to this chain. Returns a
reference to the chain with the appended element.
The caller shouldn't assume that this EventDispatchChain remains
unchanged nor that the returned value will reference a different chain
after the call. All this depends on the EventDispatchChain
implementation.
So the call should be always done in the following form:
chain = chain.append(eventDispatcher);
append in interface EventDispatchTreeappend in interface EventDispatchChaineventDispatcher - the EventDispatcher to append to the
chainpublic EventDispatchTree prepend(EventDispatcher eventDispatcher)
EventDispatchChainEventDispatcher to this chain. Returns a
reference to the chain with the prepended element.
The caller shouldn't assume that this EventDispatchChain remains
unchanged nor that the returned value will reference a different chain
after the call. All this depends on the EventDispatchChain
implementation.
So the call should be always done in the following form:
chain = chain.prepend(eventDispatcher);
prepend in interface EventDispatchTreeprepend in interface EventDispatchChaineventDispatcher - the EventDispatcher to prepend to the
chainpublic Event dispatchEvent(Event event)
EventDispatchChainEventDispatchChain.
The return value represents the event after processing done by the chain.
If further processing is to be done after the call the event referenced
by the return value should be used instead of the original event. In the
case the event is fully handled / consumed in the chain the returned
value is null and no further processing should be done with that
event.dispatchEvent in interface EventDispatchChainevent - the event to dispatchnull if the event had been fully
handled / consumedCopyright © 2025. All rights reserved.