com.holonplatform.vaadin.flow.components.builders

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

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

      public static interface ContextMenuConfigurator.MenuItemBuilder<L extends EventListener,M extends com.vaadin.flow.component.contextmenu.ContextMenuBase<M,I,S>,I extends com.vaadin.flow.component.contextmenu.MenuItemBase<M,I,S>,S extends com.vaadin.flow.component.contextmenu.SubMenuBase<M,I,S>,B extends ContextMenuConfigurator<L,M,I,S,B>>
      extends HasEnabledConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>>, HasTextConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,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.
    `default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>` | `checkable()` Set the menu as checkable.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>` | `checkable(boolean checkable)` Set whether the menu item is checkable.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>` | `checked(boolean checked)` Set whether a checkable menu item is checked.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>` | `id(String id)` Sets the id of the root element of the menu item.
    `default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>` | `onClick(L menuItemClickListener)` Register a menu item click event listener.
    `ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,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,I,S,B> id(String id)

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

    - #### checkable

          ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checkable(boolean checkable)

      Set whether the menu item is checkable.

      A checkable item toggles a checkmark icon when clicked.

      Changes in the checked state can be handled in the item's click handler with `isChecked()`.

      Parameters:
        `checkable` - Whether the menu item is checkable
      Returns:
        this
      Since:
        5.2.3

    - #### checkable

          default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checkable()

      Set the menu as checkable.

      A checkable item toggles a checkmark icon when clicked.

      Changes in the checked state can be handled in the item's click handler with `isChecked()`.

      Returns:
        this
      Since:
        5.2.3

    - #### checked

          ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checked(boolean checked)

      Set whether a checkable menu item is checked.
      Parameters:
        `checked` - Whether the menu item is checked
      Returns:
        this
      Since:
        5.2.3
      See Also:
        `checkable(boolean)`

    - #### withClickListener

          ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,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,I,S,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.