com.holonplatform.vaadin.flow.components.builders

## Interface ContextMenuBuilder

- All Superinterfaces:
    ComponentConfigurator<ContextMenuBuilder>, ContextMenuConfigurator<ClickEventListener<com.vaadin.flow.component.contextmenu.MenuItem,ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>>,com.vaadin.flow.component.contextmenu.ContextMenu,com.vaadin.flow.component.contextmenu.MenuItem,com.vaadin.flow.component.contextmenu.SubMenu,ContextMenuBuilder>, HasElementConfigurator<ContextMenuBuilder>, HasStyleConfigurator<ContextMenuBuilder>

      public interface ContextMenuBuilder
      extends ContextMenuConfigurator<ClickEventListener<com.vaadin.flow.component.contextmenu.MenuItem,ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>>,com.vaadin.flow.component.contextmenu.ContextMenu,com.vaadin.flow.component.contextmenu.MenuItem,com.vaadin.flow.component.contextmenu.SubMenu,ContextMenuBuilder>

  `ContextMenu` component builder.
  Since:
    5.2.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.ContextMenuConfigurator

      `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>>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.ComponentConfigurator

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default com.vaadin.flow.component.contextmenu.ContextMenu` | `build()` Build the `ContextMenu`.
    `com.vaadin.flow.component.contextmenu.ContextMenu` | `build(com.vaadin.flow.component.Component target)` Build the `ContextMenu` and bind it to the given `target` component.
    `static ContextMenuBuilder` | `create()` Create a new `ContextMenuBuilder` to create and configure `ContextMenu` component instances.

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

      `openOnClick, withItem, withItem, withItem, withItem, withItem, withItem, withItem, withItem, withOpenedChangeListener`

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

      `elementConfiguration, hidden, id, visible, withAttachListener, withDetachListener`

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

      `withEventListener, withEventListener, withThemeName`

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

      `styleName, styleNames`

- - ### Method Detail

    - #### build

          com.vaadin.flow.component.contextmenu.ContextMenu build(com.vaadin.flow.component.Component target)

      Build the `ContextMenu` and bind it to the given `target` component.

      By default, the context menu can be opened with a right click or a long touch on the target component.

      Parameters:
        `target` - The target component for this context menu
      Returns:
        The `ContextMenu` instance

    - #### build

          default com.vaadin.flow.component.contextmenu.ContextMenu build()

      Build the `ContextMenu`. The context menu will not be bound to any target component, the `ContextMenuBase.setTarget(Component)` method should be used later to configure the target component.
      Returns:
        The `ContextMenu` instance

    - #### create

          static ContextMenuBuilder create()

      Create a new `ContextMenuBuilder` to create and configure `ContextMenu` component instances.
      Returns:
        A new `ContextMenuBuilder`

Copyright © 2019 The Holon Platform. All rights reserved.