Interface HasMainTabSheetMenuItems
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
MainTabSheetContextMenu,MainTabSheetSubMenu
Represents an interface defining methods for managing menu items
in a
MainTabSheet context menu.-
Method Summary
Modifier and TypeMethodDescriptionaddItem(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<MainTabSheetContextMenu.MainTabSheetContextMenuItemClickEvent> clickListener) Adds a new item component with the given component and click listener to the context menu overlay.addItem(String text, com.vaadin.flow.component.ComponentEventListener<MainTabSheetContextMenu.MainTabSheetContextMenuItemClickEvent> clickListener) Adds a new item component with the given text content and click listener to the context menu overlay.
-
Method Details
-
addItem
MainTabSheetMenuItem addItem(String text, @Nullable com.vaadin.flow.component.ComponentEventListener<MainTabSheetContextMenu.MainTabSheetContextMenuItemClickEvent> clickListener) Adds a new item component with the given text content and click listener to the context menu overlay.- Parameters:
text- the text content for the new itemclickListener- the handler for clicking the new item, can benullto not add listener- Returns:
- the added
MainTabSheetMenuItemcomponent
-
addItem
MainTabSheetMenuItem addItem(com.vaadin.flow.component.Component component, @Nullable com.vaadin.flow.component.ComponentEventListener<MainTabSheetContextMenu.MainTabSheetContextMenuItemClickEvent> clickListener) Adds a new item component with the given component and click listener to the context menu overlay.- Parameters:
component- the component inside the new itemclickListener- the handler for clicking the new item, can benullto not add listener- Returns:
- the added
MainTabSheetMenuItemcomponent
-