public class DOMEventBus extends EventBus
EventBus
which invokes
DOMHelper.unbindEventListener(Element, String)
on DOM element sources when they no longer have any event registered handlers
for the corresponding event type.Constructor and Description |
---|
DOMEventBus() |
Modifier and Type | Method and Description |
---|---|
<H extends EventHandler> |
addHandler(GwtEvent.Type<H> type,
H handler) |
<H> HandlerRegistration |
addHandlerToSource(Event.Type<H> type,
Object source,
H handler) |
<H extends EventHandler> |
addHandlerToSource(GwtEvent.Type<H> type,
Object source,
H handler) |
protected <H> void |
doRemove(Event.Type<H> type,
Object source,
H handler) |
void |
fireEvent(GwtEvent<?> event) |
void |
fireEventFromSource(GwtEvent<?> event,
Object source) |
protected <H> H |
getHandler(Event.Type<H> type,
int index) |
protected int |
getHandlerCount(Event.Type<?> eventKey) |
protected boolean |
isEventHandled(Event.Type<?> eventKey) |
addHandler, castFireEvent, castFireEventFromSource, fireEvent, fireEventFromSource, wrap
dispatchEvent, setSourceOfEvent
public DOMEventBus()
public <H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, H handler)
addHandler
in class EventBus
public <H extends EventHandler> HandlerRegistration addHandlerToSource(GwtEvent.Type<H> type, Object source, H handler)
addHandlerToSource
in class EventBus
public void fireEvent(GwtEvent<?> event)
fireEvent
in interface HasHandlers
fireEvent
in class EventBus
public void fireEventFromSource(GwtEvent<?> event, Object source)
fireEventFromSource
in class EventBus
public <H> HandlerRegistration addHandlerToSource(Event.Type<H> type, Object source, H handler)
addHandlerToSource
in class EventBus
protected <H> void doRemove(Event.Type<H> type, Object source, H handler)
protected <H> H getHandler(Event.Type<H> type, int index)
protected int getHandlerCount(Event.Type<?> eventKey)
protected boolean isEventHandled(Event.Type<?> eventKey)