Package com.sun.javafx.event
Class BasicEventDispatcher
java.lang.Object
com.sun.javafx.event.BasicEventDispatcher
- All Implemented Interfaces:
EventDispatcher
- Direct Known Subclasses:
CompositeEventDispatcher
,EnteredExitedHandler
,EventHandlerManager
,EventRedirector
,KeyboardShortcutsHandler
,WindowCloseRequestHandler
Event dispatcher which introduces event dispatch phase specific methods -
dispatchCapturingEvent
and dispatchBubblingEvent
. These
are used in the BasicEventDispatcher.dispatchEvent
implementation,
but because they are public they can be called directly as well. Their
default implementation does nothing and is expected to be overridden in
subclasses. The BasicEventDispatcher
also adds possibility to chain
event dispatchers. This is used together with the direct access to the phase
specific dispatch methods to implement CompositeEventDispatcher
.
An event dispatcher derived from BasicEventDispatcher
can act as
a standalone event dispatcher or can be used to form a dispatch chain in
CompositeEventDispatcher
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondispatchBubblingEvent
(Event event) dispatchCapturingEvent
(Event event) dispatchEvent
(Event event, EventDispatchChain tail) Dispatches the specified event by thisEventDispatcher
.final BasicEventDispatcher
final BasicEventDispatcher
final void
insertNextDispatcher
(BasicEventDispatcher newDispatcher)
-
Constructor Details
-
BasicEventDispatcher
public BasicEventDispatcher()
-
-
Method Details
-
dispatchEvent
Description copied from interface:EventDispatcher
Dispatches the specified event by thisEventDispatcher
. Does any required event processing. Both the event and its further path can be modified in this method. If the event is not handled / consumed during the capturing phase, it should be dispatched to the rest of the chain (event = tail.dispatch(event);
).- Specified by:
dispatchEvent
in interfaceEventDispatcher
- Parameters:
event
- the event do dispatchtail
- the rest of the chain to dispatch event to- Returns:
- the return event or
null
if the event has been handled / consumed
-
dispatchCapturingEvent
-
dispatchBubblingEvent
-
getPreviousDispatcher
-
getNextDispatcher
-
insertNextDispatcher
-