T - Concrete component typeC - Concrete configurator typepublic interface FocusableConfigurator<T extends com.vaadin.flow.component.Component,C extends FocusableConfigurator<T,C>>
Focusable type components.| Modifier and Type | Method and Description |
|---|---|
C |
tabIndex(int tabIndex)
Sets the
tabindex attribute in the component. |
C |
withBlurListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.BlurNotifier.BlurEvent<T>> listener)
Adds a listener which gets fired when the the component focus is lost.
|
C |
withFocusListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.FocusNotifier.FocusEvent<T>> listener)
Adds a listener which gets fired when the component receives focus.
|
ShortcutConfigurator<C> |
withFocusShortcut(com.vaadin.flow.component.Key key)
Adds a shortcut which focuses the component when the provided key is pressed.
|
default C |
withFocusShortcutKey(com.vaadin.flow.component.Key key,
com.vaadin.flow.component.KeyModifier... keyModifiers)
Adds a shortcut which focuses the component when the provided key is pressed.
|
C tabIndex(int tabIndex)
tabindex attribute in the component. The tabIndex indicates if its element can be focused,
and if/where it participates in sequential keyboard navigation:
tabindex = -1 means that the component should be focusable, but should
not be reachable via sequential keyboard navigation.tabindex = 0 means that the component should be focusable in sequential keyboard navigation, but
its order is defined by the document's source order.tabindex = 4 would be focused before
tabindex = 5, but after tabindex = 3. If multiple components share the same positive
tabindex value, their order relative to each other follows their position in the document source.tabIndex - The tab index to setC withFocusListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.FocusNotifier.FocusEvent<T>> listener)
listener - The listener to addC withBlurListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.BlurNotifier.BlurEvent<T>> listener)
listener - The listener to adddefault C withFocusShortcutKey(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers)
key - Primary Key used to trigger the shortcut (not null)keyModifiers - Optional key modifier(s) that need to be pressed along with the key for the
shortcut to triggerwithFocusShortcut(Key)ShortcutConfigurator<C> withFocusShortcut(com.vaadin.flow.component.Key key)
A ShortcutConfigurator API is returned to further configure the shortcut listener. The
ShortcutConfigurator.add() method should be used to add the shortcut listener and go back to the parent
builder.
key - Primary Key used to trigger the shortcut (not null)ShortcutConfiguratorCopyright © 2020 The Holon Platform. All rights reserved.