-
public interface EventDispatchChainRepresents a chain ofEventDispatcherobjects, which can dispatch anEvent. The event is dispatched by passing it from oneEventDispatcherto the next in the chain until the end of chain is reached. EachEventDispatcherin the chain can influence the event path and the event itself. The chain is usually formed by following some parent - child hierarchy from the root to the event target and appending allEventDispatcherobjects encountered to the chain.- Since:
- JavaFX 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventDispatchChainappend(EventDispatcher eventDispatcher)Appends the specifiedEventDispatcherto this chain.EventdispatchEvent(Event event)Dispatches the specified event through thisEventDispatchChain.EventDispatchChainprepend(EventDispatcher eventDispatcher)Prepends the specifiedEventDispatcherto this chain.
-
-
-
Method Detail
-
append
EventDispatchChain append(EventDispatcher eventDispatcher)
Appends the specifiedEventDispatcherto this chain. Returns a reference to the chain with the appended element.The caller shouldn't assume that this
EventDispatchChainremains unchanged nor that the returned value will reference a different chain after the call. All this depends on theEventDispatchChainimplementation.So the call should be always done in the following form:
chain = chain.append(eventDispatcher);- Parameters:
eventDispatcher- theEventDispatcherto append to the chain- Returns:
- the chain with the appended event dispatcher
-
prepend
EventDispatchChain prepend(EventDispatcher eventDispatcher)
Prepends the specifiedEventDispatcherto this chain. Returns a reference to the chain with the prepended element.The caller shouldn't assume that this
EventDispatchChainremains unchanged nor that the returned value will reference a different chain after the call. All this depends on theEventDispatchChainimplementation.So the call should be always done in the following form:
chain = chain.prepend(eventDispatcher);- Parameters:
eventDispatcher- theEventDispatcherto prepend to the chain- Returns:
- the chain with the prepended event dispatcher
-
dispatchEvent
Event dispatchEvent(Event event)
Dispatches the specified event through thisEventDispatchChain. 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 isnulland no further processing should be done with that event.- Parameters:
event- the event to dispatch- Returns:
- the processed event or
nullif the event had been fully handled / consumed
-
-