com.holonplatform.vaadin.flow.components.builders

## Interface ShortcutConfigurator<P>

- Type Parameters:
    `P` - Parent configurator

      public interface ShortcutConfigurator<P>

  Configurator for component shortcut registration.
  Since:
    5.2.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `P` | `add()` Add the configured shortcut listener to the component.
    `ShortcutConfigurator<P>` | `allowBrowserDefault()` Allows the default keyboard event handling when the shortcut is invoked.
    `ShortcutConfigurator<P>` | `allowEventPropagation()` Allow the event to propagate upwards in the DOM tree, when the shortcut is invoked.
    `ShortcutConfigurator<P>` | `bindLifecycleTo(com.vaadin.flow.component.Component component)` Binds the shortcut's life cycle to that of the given `Component`.
    `ShortcutConfigurator<P>` | `listenOn(com.vaadin.flow.component.Component listenOnComponent)` Define the `Component` onto which the shortcut's listener is bound.
    `ShortcutConfigurator<P>` | `modifiers(com.vaadin.flow.component.KeyModifier... keyModifiers)` Configures `KeyModifiers` for the shortcut.
    `ShortcutConfigurator<P>` | `withAlt()` Adds `KeyModifier.ALT` to the shortcut's modifiers.
    `ShortcutConfigurator<P>` | `withCtrl()` Adds `KeyModifier.CONTROL` to the shortcut's modifiers.
    `ShortcutConfigurator<P>` | `withMeta()` Adds `KeyModifier.META` to the shortcut's modifiers.
    `ShortcutConfigurator<P>` | `withShift()` Adds `KeyModifier.SHIFT` to the shortcut's modifiers.

- - ### Method Detail

    - #### modifiers

          ShortcutConfigurator<P> modifiers(com.vaadin.flow.component.KeyModifier... keyModifiers)

      Configures `KeyModifiers` for the shortcut.

      Calling this method will overwrite any previously set modifier keys.

      Parameters:
        `keyModifiers` - The key modifiers to set (can be empty)
      Returns:
        this

    - #### withAlt

          ShortcutConfigurator<P> withAlt()

      Adds `KeyModifier.ALT` to the shortcut's modifiers.
      Returns:
        this

    - #### withCtrl

          ShortcutConfigurator<P> withCtrl()

      Adds `KeyModifier.CONTROL` to the shortcut's modifiers.
      Returns:
        this

    - #### withShift

          ShortcutConfigurator<P> withShift()

      Adds `KeyModifier.SHIFT` to the shortcut's modifiers.
      Returns:
        this

    - #### withMeta

          ShortcutConfigurator<P> withMeta()

      Adds `KeyModifier.META` to the shortcut's modifiers.
      Returns:
        this

    - #### allowBrowserDefault

          ShortcutConfigurator<P> allowBrowserDefault()

      Allows the default keyboard event handling when the shortcut is invoked.
      Returns:
        this

    - #### allowEventPropagation

          ShortcutConfigurator<P> allowEventPropagation()

      Allow the event to propagate upwards in the DOM tree, when the shortcut is invoked.
      Returns:
        this

    - #### bindLifecycleTo

          ShortcutConfigurator<P> bindLifecycleTo(com.vaadin.flow.component.Component component)

      Binds the shortcut's life cycle to that of the given `Component`. When the given `component` is attached, the shortcut's listener is attached to the Component that owns the shortcut. When the given `component` is detached, so is the listener.
      Parameters:
        `component` - New lifecycle owner of the shortcut
      Returns:
        this

    - #### listenOn

          ShortcutConfigurator<P> listenOn(com.vaadin.flow.component.Component listenOnComponent)

      Define the `Component` onto which the shortcut's listener is bound. Calling this method will remove the previous listener from the component it was bound to.
      Parameters:
        `listenOnComponent` - Component onto which the shortcut listener is bound.
      Returns:
        this

    - #### add

          P add()

      Add the configured shortcut listener to the component.
      Returns:
        The parent configurator/builder

Copyright © 2019 The Holon Platform. All rights reserved.