com.vaadin.client.ui.
Class ConnectorFocusAndBlurHandler
- java.lang.Object
-
- com.vaadin.client.ui.ConnectorFocusAndBlurHandler
-
All Implemented Interfaces:
com.google.gwt.event.dom.client.BlurHandler
,com.google.gwt.event.dom.client.FocusHandler
,com.google.gwt.event.shared.EventHandler
,StateChangeEvent.StateChangeHandler
,Serializable
public class ConnectorFocusAndBlurHandler extends Object implements StateChangeEvent.StateChangeHandler, com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler
A handler for focus and blur events which uses
FieldRpc.FocusAndBlurServerRpc
to transmit received events to the server. Events are only handled if there is a corresponding listener on the server side.Since:
7.6
Author:
Vaadin Ltd
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description static ConnectorFocusAndBlurHandler
addHandlers(AbstractComponentConnector connector)
Add focus/blur handlers to the widget of the
connector
.static ConnectorFocusAndBlurHandler
addHandlers(AbstractComponentConnector connector, com.google.gwt.user.client.ui.Widget widget)
Add focus/blur handlers to the widget and a state change handler for the
connector
.void
onBlur(com.google.gwt.event.dom.client.BlurEvent event)
void
onFocus(com.google.gwt.event.dom.client.FocusEvent event)
void
onStateChanged(StateChangeEvent stateChangeEvent)
Notifies the event handler that the state has changed.
void
removeHandlers()
Remove all handlers from the widget and the connector.
-
-
-
Method Detail
-
addHandlers
public static ConnectorFocusAndBlurHandler addHandlers(AbstractComponentConnector connector)
Add focus/blur handlers to the widget of the
connector
.Parameters:
connector
- connector whose widget is a target to add focus/blur handlersReturns:
ConnectorFocusAndBlurHandler instance to remove all registered handlers
-
addHandlers
public static ConnectorFocusAndBlurHandler addHandlers(AbstractComponentConnector connector, com.google.gwt.user.client.ui.Widget widget)
Add focus/blur handlers to the widget and a state change handler for the
connector
.Parameters:
connector
- connector to register state change handlerwidget
- widget to register focus/blur handlerReturns:
ConnectorFocusAndBlurHandler instance to remove all registered handlers
-
onStateChanged
public void onStateChanged(StateChangeEvent stateChangeEvent)
Description copied from interface:
StateChangeEvent.StateChangeHandler
Notifies the event handler that the state has changed.
Specified by:
onStateChanged
in interfaceStateChangeEvent.StateChangeHandler
Parameters:
stateChangeEvent
- the state change event with details about the change
-
onFocus
public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
Specified by:
onFocus
in interfacecom.google.gwt.event.dom.client.FocusHandler
-
onBlur
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
Specified by:
onBlur
in interfacecom.google.gwt.event.dom.client.BlurHandler
-
removeHandlers
public void removeHandlers()
Remove all handlers from the widget and the connector.
-
-