public class FocusUtil extends Object
Widgets to implement
Focusable.| Constructor and Description |
|---|
FocusUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
focusOnFirstFocusableElement(com.google.gwt.dom.client.Element parent)
Moves the focus to the first focusable child of given parent element.
|
static void |
focusOnLastFocusableElement(com.google.gwt.dom.client.Element parent)
Moves the focus to the last focusable child of given parent element.
|
static com.google.gwt.dom.client.Element[] |
getFocusableChildren(com.google.gwt.dom.client.Element parent)
Finds all the focusable children of given parent element.
|
static int |
getTabIndex(com.google.gwt.user.client.ui.Widget focusable)
Gets the widget's position in the tab index.
|
static void |
setAccessKey(com.google.gwt.user.client.ui.Widget focusable,
char key)
Sets the access key property.
|
static void |
setFocus(com.google.gwt.user.client.ui.Widget focusable,
boolean focus)
Explicitly focus/unfocus the given widget.
|
static void |
setTabIndex(com.google.gwt.user.client.ui.Widget focusable,
int tabIndex)
Sets the widget's position in the tab index.
|
public static void setAccessKey(com.google.gwt.user.client.ui.Widget focusable,
char key)
focusable - The widget for which we want to set the access key.key - The access key to setpublic static void setFocus(com.google.gwt.user.client.ui.Widget focusable,
boolean focus)
focusable - the widget to focus/unfocusfocus - whether this widget should take focus or release itpublic static void setTabIndex(com.google.gwt.user.client.ui.Widget focusable,
int tabIndex)
-1 will cause the widget to
be removed from the tab order.focusable - The widgettabIndex - the widget's tab indexpublic static int getTabIndex(com.google.gwt.user.client.ui.Widget focusable)
focusable - The widgetpublic static com.google.gwt.dom.client.Element[] getFocusableChildren(com.google.gwt.dom.client.Element parent)
parent - the parent elementpublic static void focusOnFirstFocusableElement(com.google.gwt.dom.client.Element parent)
parent - the parent elementpublic static void focusOnLastFocusableElement(com.google.gwt.dom.client.Element parent)
parent - the parent elementCopyright © 2023 Vaadin Ltd. All rights reserved.