com.holonplatform.vaadin.flow.components.builders

## Interface ContextMenuConfigurator.MenuItemBuilder<L extends EventListener,M extends com.vaadin.flow.component.contextmenu.ContextMenuBase<M>,B extends ContextMenuConfigurator<L,M,B>>

- Type Parameters:
    `L` - Click listener type
    `M` - Concrete ContextMenu component type
    `B` - Parent configurator type
  All Superinterfaces:
    HasEnabledConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,B>>, HasTextConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,B>>
  Enclosing interface:
    ContextMenuConfigurator<L extends EventListener,M extends com.vaadin.flow.component.contextmenu.ContextMenuBase<M>,C extends ContextMenuConfigurator<L,M,C>>

      public static interface ContextMenuConfigurator.MenuItemBuilder<L extends EventListener,M extends com.vaadin.flow.component.contextmenu.ContextMenuBase<M>,B extends ContextMenuConfigurator<L,M,B>>
      extends HasEnabledConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,B>>, HasTextConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,B>>

  Context menu item configurator.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `add()` Add the menu item to the context menu.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,B>` | `id(String id)` Sets the id of the root element of the menu item.
    `default ContextMenuConfigurator.MenuItemBuilder<L,M,B>` | `onClick(L menuItemClickListener)` Register a menu item click event listener.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,B>` | `withClickListener(L menuItemClickListener)` Register a menu item click event listener.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasEnabledConfigurator

      `disabled, enabled`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasTextConfigurator

      `text, text, text`

- - ### Method Detail

    - #### id

          ContextMenuConfigurator.MenuItemBuilder<L,M,B> id(String id)

      Sets the id of the root element of the menu item.
      Parameters:
        `id` - the id to set
      Returns:
        this

    - #### withClickListener

          ContextMenuConfigurator.MenuItemBuilder<L,M,B> withClickListener(L menuItemClickListener)

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

    - #### onClick

          default ContextMenuConfigurator.MenuItemBuilder<L,M,B> onClick(L menuItemClickListener)

      Register a menu item click event listener.

      Alias for `withClickListener(EventListener)`.

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

    - #### add

          B add()

      Add the menu item to the context menu.
      Returns:
        The parent context menu builder

Copyright © 2019 The Holon Platform. All rights reserved.