Module com.gluonhq.charm.glisten
Class DialogEventDispatcher<T extends Event>
- java.lang.Object
-
- com.gluonhq.impl.charm.glisten.event.DialogEventDispatcher<T>
-
- All Implemented Interfaces:
EventDispatcher
public class DialogEventDispatcher<T extends Event> extends Object implements EventDispatcher
AnEventDispatcher
which allowsDialog
's event handler registration and when used in an event dispatch chain it forwards received events to the appropriate registered handlers.
-
-
Constructor Summary
Constructors Constructor Description DialogEventDispatcher(Object eventSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event
dispatchBubblingEvent(T event)
Event
dispatchCapturingEvent(T event)
Event
dispatchEvent(Event event, EventDispatchChain tail)
void
setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
Sets the specified singleton handler.
-
-
-
Constructor Detail
-
DialogEventDispatcher
public DialogEventDispatcher(Object eventSource)
-
-
Method Detail
-
dispatchEvent
public Event dispatchEvent(Event event, EventDispatchChain tail)
- Specified by:
dispatchEvent
in interfaceEventDispatcher
-
setEventHandler
public final void setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
Sets the specified singleton handler. There can only be one such handler specified at a time.- Parameters:
eventType
- the event type to associate with the given eventHandlereventHandler
- the handler to register, or null to unregister- Throws:
NullPointerException
- if the event type is null
-
-