Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.user.client.ui
Interface HasFocus

All Superinterfaces:
  SourcesFocusEvents, SourcesKeyboardEvents

All Known Implementing Classes:
  Button, ButtonBase, CheckBox, CustomButton, FocusPanel, FocusWidget, ListBox, PasswordTextBox, PushButton, RadioButton, RichTextArea, SuggestBox, TextArea, TextBox, TextBoxBase, ToggleButton, Tree

    public interface HasFocus

extends SourcesFocusEvents, SourcesKeyboardEvents

A widget that implements this interface can receive keyboard focus.

Method Summary
`int` | `getTabIndex()` Gets the widget's position in the tab index.
`void` | `setAccessKey(char key)` Sets the widget's 'access key'.
`void` | `setFocus(boolean focused)` Explicitly focus/unfocus this widget.
`void` | `setTabIndex(int index)` Sets the widget's position in the tab index.

Methods inherited from interface com.google.gwt.user.client.ui.SourcesFocusEvents
`addFocusListener, removeFocusListener`

Methods inherited from interface com.google.gwt.user.client.ui.SourcesKeyboardEvents
`addKeyboardListener, removeKeyboardListener`

Method Detail

### getTabIndex

    int getTabIndex()

  Gets the widget's position in the tab index.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `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.

  Parameters:
    `index` - the widget's tab index

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD