public class EventHelper extends Object
Possible current registration is given as parameter. The returned registration (possibly the same as given, should be store for next update.
Pseudocode what helpers do:
if paintable has event listener in UIDL if registration is null register paintable as as handler for event return the registration else if registration is not null remove the handler from paintable return null
Constructor and Description |
---|
EventHelper() |
Modifier and Type | Method and Description |
---|---|
static <T extends ComponentConnector & com.google.gwt.event.dom.client.BlurHandler> |
updateBlurHandler(T connector,
com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
Adds or removes a blur handler depending on if the connector has blur
listeners on the server side or not.
|
static <T extends ComponentConnector & com.google.gwt.event.dom.client.BlurHandler> |
updateBlurHandler(T connector,
com.google.gwt.event.shared.HandlerRegistration handlerRegistration,
com.google.gwt.user.client.ui.Widget widget)
Adds or removes a blur handler depending on if the connector has blur
listeners on the server side or not.
|
static <T extends ComponentConnector & com.google.gwt.event.dom.client.FocusHandler> |
updateFocusHandler(T connector,
com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
Adds or removes a focus handler depending on if the connector has focus
listeners on the server side or not.
|
static <T extends ComponentConnector & com.google.gwt.event.dom.client.FocusHandler> |
updateFocusHandler(T connector,
com.google.gwt.event.shared.HandlerRegistration handlerRegistration,
com.google.gwt.user.client.ui.Widget widget)
Adds or removes a focus handler depending on if the connector has focus
listeners on the server side or not.
|
static <H extends com.google.gwt.event.shared.EventHandler> |
updateHandler(ComponentConnector connector,
H handler,
String eventIdentifier,
com.google.gwt.event.shared.HandlerRegistration handlerRegistration,
com.google.gwt.event.dom.client.DomEvent.Type<H> type,
com.google.gwt.user.client.ui.Widget widget) |
public static <T extends ComponentConnector & com.google.gwt.event.dom.client.FocusHandler> com.google.gwt.event.shared.HandlerRegistration updateFocusHandler(T connector, com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
connector
- The connector to update. Must implement focusHandler.handlerRegistration
- The old registration reference or null if no handler has been
registered previouslypublic static <T extends ComponentConnector & com.google.gwt.event.dom.client.FocusHandler> com.google.gwt.event.shared.HandlerRegistration updateFocusHandler(T connector, com.google.gwt.event.shared.HandlerRegistration handlerRegistration, com.google.gwt.user.client.ui.Widget widget)
connector
- The connector to update. Must implement focusHandler.handlerRegistration
- The old registration reference or null if no handler has been
registered previouslywidget
- The widget which emits focus eventspublic static <T extends ComponentConnector & com.google.gwt.event.dom.client.BlurHandler> com.google.gwt.event.shared.HandlerRegistration updateBlurHandler(T connector, com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
connector
- The connector to update. Must implement BlurHandler.handlerRegistration
- The old registration reference or null if no handler has been
registered previouslypublic static <T extends ComponentConnector & com.google.gwt.event.dom.client.BlurHandler> com.google.gwt.event.shared.HandlerRegistration updateBlurHandler(T connector, com.google.gwt.event.shared.HandlerRegistration handlerRegistration, com.google.gwt.user.client.ui.Widget widget)
connector
- The connector to update. Must implement BlurHandler.handlerRegistration
- The old registration reference or null if no handler has been
registered previouslywidget
- The widget which emits blur eventspublic static <H extends com.google.gwt.event.shared.EventHandler> com.google.gwt.event.shared.HandlerRegistration updateHandler(ComponentConnector connector, H handler, String eventIdentifier, com.google.gwt.event.shared.HandlerRegistration handlerRegistration, com.google.gwt.event.dom.client.DomEvent.Type<H> type, com.google.gwt.user.client.ui.Widget widget)
Copyright © 2019 Vaadin Ltd. All rights reserved.