java.lang.Object | |||
↳ | com.google.gwt.user.client.ui.UIObject | ||
↳ | com.google.gwt.user.client.ui.Widget | ||
↳ | com.google.gwt.user.client.ui.FocusWidget |
Known Direct Subclasses |
Known Indirect Subclasses |
Abstract base class for most widgets that can receive keyboard focus.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new focus widget with no element.
| |||||||||||
Creates a new focus widget that wraps the specified browser element.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the FocusImpl instance.
| |||||||||||
This method is called when a widget is attached to the browser's document. |
Creates a new focus widget with no element. setElement(Element)
must be called before any other methods.
Creates a new focus widget that wraps the specified browser element.
elem | the element to be wrapped |
---|
Adds a BlurEvent
handler.
handler | the blur handler |
---|
HandlerRegistration
used to remove this handler
Adds a ClickEvent
handler.
handler | the click handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addClickHandler(ClickHandler)
instead
Adds a listener interface to receive click events.
listener | the listener interface to add |
---|
Adds a DoubleClickEvent
handler.
handler | the double click handler |
---|
HandlerRegistration
used to remove this handler
Adds a FocusEvent
handler.
handler | the focus handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addFocusHandler(FocusHandler)
instead
Adds a listener interface to receive focus events.
listener | the listener interface to add |
---|
Adds a GestureChangeEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a GestureEndEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a GestureStartEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a KeyDownEvent
handler.
handler | the key down handler |
---|
HandlerRegistration
used to remove this handler
Adds a KeyPressEvent
handler.
handler | the key press handler |
---|
HandlerRegistration
used to remove this handler
Adds a KeyUpEvent
handler.
handler | the key up handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addKeyDownHandler(KeyDownHandler)
, addKeyUpHandler(KeyUpHandler)
and addKeyPressHandler(KeyPressHandler)
instead
Adds a listener interface to receive keyboard events.
listener | the listener interface to add |
---|
Adds a MouseDownEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addMouseOverHandler(MouseOverHandler)
addMouseMoveHandler(MouseMoveHandler)
, addMouseDownHandler(MouseDownHandler)
, addMouseUpHandler(MouseUpHandler)
and addMouseOutHandler(MouseOutHandler)
instead
Adds a listener interface to receive mouse events.
listener | the listener interface to add |
---|
Adds a MouseMoveEvent
handler.
handler | the mouse move handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseOutEvent
handler.
handler | the mouse out handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseOverEvent
handler.
handler | the mouse over handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseUpEvent
handler.
handler | the mouse up handler |
---|
HandlerRegistration
used to remove this handler
Adds a MouseWheelEvent
handler.
handler | the mouse wheel handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchCancelEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchEndEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchMoveEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Adds a TouchStartEvent
handler.
handler | the mouse down handler |
---|
HandlerRegistration
used to remove this handler
Gets the tab index.
Gets whether this widget is enabled.
true
if the widget is enabled
This method is deprecated.
Use the removeHandler()
method on
the object returned by addClickHandler(ClickHandler)
instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on
the object returned by addFocusHandler(FocusHandler)
instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by an add*Handler method instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by an add*Handler method instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by addMouseWheelHandler(MouseWheelHandler)
instead
Sets the widget's 'access key'. This key is used (in conjunction with a browser-specific modifier key) to automatically focus the widget.
key | the widget's access key |
---|
Sets whether this widget is enabled.
enabled | true to enable the widget, false
to disable it
|
---|
Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.
focused | whether this widget should take focus or release it |
---|
Sets the widget's position in the tab index. If more than one widget has
the same tab index, each such widget will receive focus in an arbitrary
order. Setting the tab index to -1
will cause this widget to
be removed from the tab order.
index | the widget's tab index |
---|
This method is called when a widget is attached to the browser's document.
To receive notification after a Widget has been added to the document,
override the onLoad()
method or use addAttachHandler(AttachEvent.Handler)
.
It is strongly recommended that you override onLoad()
or
doAttachChildren()
instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onAttach()
to ensure that the Widget has been attached
to its underlying Element.