public class GridMenuItem<T> extends MenuItemBase<GridContextMenu<T>,GridMenuItem<T>,GridSubMenu<T>>
GridContextMenu and GridSubMenu.
This component can be created and added to a menu overlay with
HasGridMenuItems.addItem(String, ComponentEventListener) and similar
methods.| Constructor and Description |
|---|
GridMenuItem(GridContextMenu<T> contextMenu,
SerializableRunnable contentReset)
Creates a new instance using the context menu and its reset callback.
|
| Modifier and Type | Method and Description |
|---|---|
Registration |
addMenuItemClickListener(ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener)
Adds the given click listener for this menu item.
|
protected GridSubMenu<T> |
createSubMenu() |
addThemeNames, executeJsWhenAttached, getContextMenu, getSubMenu, hasThemeName, isCheckable, isChecked, isParentItem, removeThemeNames, setCheckable, setCheckedaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllisEnabled, setEnabledgetElementaddAttachListeneraddDetachListenerpublic GridMenuItem(GridContextMenu<T> contextMenu, SerializableRunnable contentReset)
contextMenu - the context menu, not nullcontentReset - the callback to reset the context menu, not nullpublic Registration addMenuItemClickListener(ComponentEventListener<GridContextMenu.GridContextMenuItemClickEvent<T>> clickListener)
GridContextMenu.GridContextMenuItemClickEvent contains
information of which item inside the Grid was targeted when the context
menu was opened.clickListener - the click listener to addprotected GridSubMenu<T> createSubMenu()
createSubMenu in class MenuItemBase<GridContextMenu<T>,GridMenuItem<T>,GridSubMenu<T>>Copyright © 2025. All rights reserved.