Class JmixMenuManager<C extends com.vaadin.flow.component.Component,I extends com.vaadin.flow.component.contextmenu.MenuItemBase<?,I,S>,S extends com.vaadin.flow.component.contextmenu.SubMenuBase<?,I,S>>
java.lang.Object
com.vaadin.flow.component.contextmenu.MenuManager<C,I,S>
io.jmix.flowui.kit.component.contextmenu.JmixMenuManager<C,I,S>
- Type Parameters:
C
- the context menu typeI
- the menu item typeS
- the sub menu type
- All Implemented Interfaces:
Serializable
public class JmixMenuManager<C extends com.vaadin.flow.component.Component,I extends com.vaadin.flow.component.contextmenu.MenuItemBase<?,I,S>,S extends com.vaadin.flow.component.contextmenu.SubMenuBase<?,I,S>>
extends com.vaadin.flow.component.contextmenu.MenuManager<C,I,S>
Common management logic for context menus and sub menus. Maintains the list
of components to stamp into one overlay.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItemAtIndex
(int index, com.vaadin.flow.component.Component component) Adds a component as a menu item at the given position.addItemAtIndex
(int index, com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<I>> clickListener) Adds a component as a menu item with a click listener at the given position.addItemAtIndex
(int index, String text) Adds a text as a menu item at the given position.addItemAtIndex
(int index, String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<I>> clickListener) Adds a text as a menu item with a click listener at the given position.Methods inherited from class com.vaadin.flow.component.contextmenu.MenuManager
add, addComponentAtIndex, addItem, addItem, addItem, addItem, getChildren, getItems, remove, removeAll
-
Constructor Details
-
JmixMenuManager
-
-
Method Details
-
addItemAtIndex
Adds a text as a menu item at the given position.- Parameters:
index
- item positiontext
- the text for the menu item- Returns:
- a new menu item
-
addItemAtIndex
Adds a component as a menu item at the given position.- Parameters:
index
- item positioncomponent
- the component for the menu item- Returns:
- a new menu item
-
addItemAtIndex
public I addItemAtIndex(int index, String text, @Nullable com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<I>> clickListener) Adds a text as a menu item with a click listener at the given position.- Parameters:
index
- item positiontext
- the text for the menu itemclickListener
- a click listener- Returns:
- a new menu item
-
addItemAtIndex
public I addItemAtIndex(int index, com.vaadin.flow.component.Component component, @Nullable com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<I>> clickListener) Adds a component as a menu item with a click listener at the given position.- Parameters:
index
- item positioncomponent
- the component for the menu itemclickListener
- a click listener- Returns:
- a new menu item
-