com.holonplatform.vaadin.flow.components.builders

## Interface ClickNotifierConfigurator<S,E extends ClickEvent<S>,C extends ClickNotifierConfigurator<S,E,C>>

- Type Parameters:
    `S` - Event source type
    `E` - Click event type
    `C` - Concrete configurator type
  All Known Subinterfaces:
    BooleanInputBuilder, BooleanInputConfigurator<C>, ButtonBuilder, ButtonConfigurator<C>, ButtonConfigurator.BaseButtonConfigurator, LabelBuilder<L>, LabelConfigurator<L,C>, LabelConfigurator.BaseLabelConfigurator<L>, NativeButtonBuilder, ValidatableBooleanInputBuilder, ViewComponentAdapterBuilder<T>, ViewComponentBuilder<T>, ViewComponentConfigurator<T,C>

      public interface ClickNotifierConfigurator<S,E extends ClickEvent<S>,C extends ClickNotifierConfigurator<S,E,C>>

  Configurator for components which support `ClickEventListener` registration.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default C` | `onClick(ClickEventListener<S,E> clickEventListener)` Register a click event listener.
    `C` | `withClickListener(ClickEventListener<S,E> clickEventListener)` Register a click event listener.
    `ShortcutConfigurator<C>` | `withClickShortcut(com.vaadin.flow.component.Key key)` Adds a shortcut to perform a click action for this component when the provided key is pressed.
    `C` | `withClickShortcutKey(com.vaadin.flow.component.Key key, com.vaadin.flow.component.KeyModifier... keyModifiers)` Adds a shortcut to perform a click action for this component when the provided key is pressed.

- - ### Method Detail

    - #### withClickListener

          C withClickListener(ClickEventListener<S,E> clickEventListener)

      Register a click event listener.
      Parameters:
        `clickEventListener` - The listener to add (not null)
      Returns:
        this

    - #### onClick

          default C onClick(ClickEventListener<S,E> clickEventListener)

      Register a click event listener.

      Alias for `withClickListener(ClickEventListener)`.

      Parameters:
        `clickEventListener` - The listener to add (not null)
      Returns:
        this

    - #### withClickShortcutKey

          C withClickShortcutKey(com.vaadin.flow.component.Key key,
                                 com.vaadin.flow.component.KeyModifier... keyModifiers)

      Adds a shortcut to perform a click action for this 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:
        `withClickShortcut(Key)`

    - #### withClickShortcut

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

      Adds a shortcut to perform a click action for this 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.