Interface Focusable

All Known Subinterfaces:
All Known Implementing Classes:
AbstractCellTable, AbstractHasData, Anchor, Audio, Button, ButtonBase, Canvas, CellBrowser.BrowserCellList, CellList, CellTable, CellTree, CheckBox, CustomButton, DataGrid, DoubleBox, FileUpload, FocusPanel, FocusWidget, IntegerBox, ListBox, LongBox, MediaBase, PasswordTextBox, PushButton, RadioButton, ResetButton, RichTextArea, SimpleCheckBox, SimpleRadioButton, SubmitButton, SuggestBox, TextArea, TextBox, TextBoxBase, ToggleButton, Tree, ValueBox, ValueBoxBase, ValueListBox, Video

public interface Focusable
A widget that implements this interface can receive keyboard focus.
  • Method Summary

    Modifier and Type
    Gets the widget's position in the tab index.
    setAccessKey(char key)
    Sets the widget's 'access key'.
    setFocus(boolean focused)
    Explicitly focus/unfocus this widget.
    setTabIndex(int index)
    Sets the widget's position in the tab index.
  • Method Details

    • getTabIndex

      int getTabIndex()
      Gets the widget's position in the tab index.
      the widget's tab index
    • setAccessKey

      void setAccessKey(char key)
      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
    • setFocus

      void setFocus(boolean focused)
      Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events. NOTE: Most browsers fire FocusEvents asynchronously. Especially within GWT tests, you'll need to make your test asynchronous to properly do verifications. See GWTTestCase#delayTestFinish for more information on how to do this.
      focused - whether this widget should take focus or release it
    • setTabIndex

      void setTabIndex(int index)
      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