Class GridMenuItem<T>

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasText, Serializable

    public class GridMenuItem<T>
    extends MenuItemBase<GridContextMenu<T>,​GridMenuItem<T>,​GridSubMenu<T>>
    Item component used inside GridContextMenu and GridSubMenu. This component can be created and added to a menu overlay with HasGridMenuItems.addItem(String, ComponentEventListener) and similar methods.
    Author:
    Vaadin Ltd.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

        com.vaadin.flow.component.HasText.WhiteSpace
    • Constructor Summary

      Constructors 
      Constructor Description
      GridMenuItem​(GridContextMenu<T> contextMenu, com.vaadin.flow.function.SerializableRunnable contentReset)
      Creates a new instance using the context menu and its reset callback.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.vaadin.flow.shared.Registration addMenuItemClickListener​(com.vaadin.flow.component.ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener)
      Adds the given click listener for this menu item.
      protected GridSubMenu<T> createSubMenu()  
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasEnabled

        isEnabled, setEnabled
      • Methods inherited from interface com.vaadin.flow.component.HasText

        getText, getWhiteSpace, setText, setWhiteSpace
    • Constructor Detail

      • GridMenuItem

        public GridMenuItem​(GridContextMenu<T> contextMenu,
                            com.vaadin.flow.function.SerializableRunnable contentReset)
        Creates a new instance using the context menu and its reset callback.
        Parameters:
        contextMenu - the context menu, not null
        contentReset - the callback to reset the context menu, not null