com.holonplatform.vaadin.flow.components.builders

## Interface FocusableConfigurator<T extends com.vaadin.flow.component.Component,C extends FocusableConfigurator<T,C>>

- Type Parameters:
    `T` - Concrete component type
    `C` - Concrete configurator type
  All Known Subinterfaces:
    BaseTemporalInputConfigurator<D,C>, BeanListingBuilder<T>, BeanListingBuilder.DatastoreBeanListingBuilder<T>, BeanListingConfigurator<T,C>, BooleanInputBuilder, BooleanInputConfigurator<C>, ButtonBuilder, ButtonConfigurator<C>, ButtonConfigurator.BaseButtonConfigurator, DateInputBuilder, DateInputConfigurator<C>, DateTimeInputBuilder, DateTimeInputConfigurator<C>, FilterableSingleSelectConfigurator<T,ITEM,B>, FilterableSingleSelectConfigurator.DatastoreFilterableSingleSelectInputBuilder<T,ITEM>, FilterableSingleSelectConfigurator.DatastoreFilterableSingleSelectInputConfigurator<T,ITEM,C>, FilterableSingleSelectConfigurator.DatastorePropertyFilterableSingleSelectInputBuilder<T>, FilterableSingleSelectConfigurator.DatastorePropertyFilterableSingleSelectInputConfigurator<T,C>, FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM>, FilterableSingleSelectConfigurator.FilterableSingleSelectInputConfigurator<T,ITEM,D,C>, FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T>, FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputConfigurator<T,D,C>, FilterableSingleSelectConfigurator.ValidatableDatastoreFilterableSingleSelectInputBuilder<T,ITEM>, FilterableSingleSelectConfigurator.ValidatableDatastorePropertyFilterableSingleSelectInputBuilder<T>, FilterableSingleSelectConfigurator.ValidatableFilterableSingleSelectInputBuilder<T,ITEM>, FilterableSingleSelectConfigurator.ValidatablePropertyFilterableSingleSelectInputBuilder<T>, ItemListingBuilder<T,P,L,B>, ItemListingConfigurator<T,P,L,C>, LocalDateInputBuilder, LocalDateInputConfigurator<C>, LocalDateTimeInputBuilder, LocalDateTimeInputConfigurator<C>, LocalTimeInputBuilder, LocalTimeInputConfigurator<C>, NativeButtonBuilder, NumberInputBuilder<T>, NumberInputConfigurator<T,C>, PasswordInputBuilder, PasswordInputConfigurator<C>, PropertyListingBuilder, PropertyListingBuilder.DatastorePropertyListingBuilder, PropertyListingBuilder.DatastorePropertyListingConfigurator, PropertyListingConfigurator<C>, SingleSelectConfigurator<T,ITEM,B>, SingleSelectConfigurator.DatastorePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.DatastorePropertySingleSelectInputConfigurator<T,C>, SingleSelectConfigurator.DatastoreSingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.DatastoreSingleSelectInputConfigurator<T,ITEM,C>, SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.PropertySingleSelectInputConfigurator<T,D,C>, SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.SingleSelectInputConfigurator<T,ITEM,D,C>, SingleSelectConfigurator.ValidatableDatastorePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.ValidatableDatastoreSingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.ValidatablePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.ValidatableSingleSelectInputBuilder<T,ITEM>, StringAreaInputBuilder, StringAreaInputConfigurator<C>, StringInputBuilder, StringInputConfigurator<C>, ValidatableBooleanInputBuilder, ValidatableDateInputBuilder, ValidatableDateTimeInputBuilder, ValidatableLocalDateInputBuilder, ValidatableLocalDateTimeInputBuilder, ValidatableLocalTimeInputBuilder, ValidatableNumberInputBuilder<T>, ValidatablePasswordInputBuilder, ValidatableStringAreaInputBuilder, ValidatableStringInputBuilder

      public interface FocusableConfigurator<T extends com.vaadin.flow.component.Component,C extends FocusableConfigurator<T,C>>

  Configurator for `Focusable` type components.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    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.

- - ### Method Detail

    - #### tabIndex

          C tabIndex(int tabIndex)

      Sets the `tabindex` attribute in the component. The tabIndex indicates if its element can be focused, and if/where it participates in sequential keyboard navigation:
      - A negative value (usually `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.
      - A positive value means the component should be focusable in sequential keyboard navigation, with its order defined by the value of the number. That is, `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.
      Parameters:
        `tabIndex` - The tab index to set
      Returns:
        this

    - #### withFocusListener

          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.
      Parameters:
        `listener` - The listener to add
      Returns:
        this

    - #### withBlurListener

          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.
      Parameters:
        `listener` - The listener to add
      Returns:
        this

    - #### withFocusShortcutKey

          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.
      Parameters:
        `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 trigger
      Returns:
        this
      Since:
        5.2.3
      See Also:
        `withFocusShortcut(Key)`

    - #### withFocusShortcut

          ShortcutConfigurator<C> withFocusShortcut(com.vaadin.flow.component.Key key)

      Adds a shortcut which focuses the component when the provided key is pressed.

      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.

      Parameters:
        `key` - Primary `Key` used to trigger the shortcut (not null)
      Returns:
        A `ShortcutConfigurator`
      Since:
        5.2.3

Copyright © 2019 The Holon Platform. All rights reserved.