Class JmixSubMenu
java.lang.Object
com.vaadin.flow.component.contextmenu.SubMenuBase<com.vaadin.flow.component.contextmenu.ContextMenu,com.vaadin.flow.component.contextmenu.MenuItem,com.vaadin.flow.component.contextmenu.SubMenu>
com.vaadin.flow.component.contextmenu.SubMenu
io.jmix.flowui.kit.component.menubar.JmixSubMenu
- All Implemented Interfaces:
com.vaadin.flow.component.contextmenu.HasMenuItems
,HasMenuItemsEnhanced
,Serializable
- Direct Known Subclasses:
JmixMenuBarSubMenu
public class JmixSubMenu
extends com.vaadin.flow.component.contextmenu.SubMenu
implements HasMenuItemsEnhanced
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.vaadin.flow.function.SerializableRunnable
-
Constructor Summary
ConstructorsConstructorDescriptionJmixSubMenu
(JmixMenuItem parentMenuItem, com.vaadin.flow.function.SerializableRunnable contentReset) -
Method Summary
Modifier and TypeMethodDescriptionaddItem
(com.vaadin.flow.component.Component component) Adds a new item component with the given component to the context menu overlay.addItem
(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given component and click listener to the context menu overlay.Adds a new item component with the given text content to the context menu overlay.addItem
(String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given text content and click listener to the context menu overlay.addItemAtIndex
(int index, com.vaadin.flow.component.Component component) Adds a new item component with the given component at the given position to the context menu overlay.addItemAtIndex
(int index, com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given component and click listener at the given position to the context menu overlay.addItemAtIndex
(int index, String text) Adds a new item component with the given text content at the given position to the context menu overlay.addItemAtIndex
(int index, String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Adds a new item component with the given text content and click listener at the given position to the context menu overlay.protected com.vaadin.flow.component.contextmenu.MenuManager<com.vaadin.flow.component.contextmenu.ContextMenu,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu> protected JmixMenuManager<com.vaadin.flow.component.contextmenu.ContextMenu,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu> Methods inherited from class com.vaadin.flow.component.contextmenu.SubMenu
addSeparator
Methods inherited from class com.vaadin.flow.component.contextmenu.SubMenuBase
add, addComponentAtIndex, getChildren, getItems, getParentMenuItem, remove, removeAll
-
Field Details
-
contentReset
protected final com.vaadin.flow.function.SerializableRunnable contentReset
-
-
Constructor Details
-
Method Details
-
addItem
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content to the context menu overlay.- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.contextmenu.SubMenuBase<com.vaadin.flow.component.contextmenu.ContextMenu,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu> - Parameters:
text
- the text content for the new item- Returns:
- the added
JmixMenuItem
component
-
addItem
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component to the context menu overlay.- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.contextmenu.SubMenuBase<com.vaadin.flow.component.contextmenu.ContextMenu,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu> - Parameters:
component
- the component inside the new item- Returns:
- the added
JmixMenuItem
component
-
addItem
public JmixMenuItem addItem(String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content and click listener to the context menu overlay.- Specified by:
addItem
in interfacecom.vaadin.flow.component.contextmenu.HasMenuItems
- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.contextmenu.SubMenu
- Parameters:
text
- the text content for the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItem
public JmixMenuItem addItem(com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component and click listener to the context menu overlay.- Specified by:
addItem
in interfacecom.vaadin.flow.component.contextmenu.HasMenuItems
- Specified by:
addItem
in interfaceHasMenuItemsEnhanced
- Overrides:
addItem
in classcom.vaadin.flow.component.contextmenu.SubMenu
- Parameters:
component
- the component inside the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positiontext
- the text content for the new item- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positioncomponent
- the component inside the new item- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
public JmixMenuItem addItemAtIndex(int index, String text, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given text content and click listener at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positiontext
- the text content for the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
addItemAtIndex
public JmixMenuItem addItemAtIndex(int index, com.vaadin.flow.component.Component component, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem>> clickListener) Description copied from interface:HasMenuItemsEnhanced
Adds a new item component with the given component and click listener at the given position to the context menu overlay.- Specified by:
addItemAtIndex
in interfaceHasMenuItemsEnhanced
- Parameters:
index
- item positioncomponent
- the component inside the new itemclickListener
- the handler for clicking the new item, can benull
to not add listener- Returns:
- the added
JmixMenuItem
component
-
createMenuManager
protected com.vaadin.flow.component.contextmenu.MenuManager<com.vaadin.flow.component.contextmenu.ContextMenu,com.vaadin.flow.component.contextmenu.MenuItem, createMenuManager()com.vaadin.flow.component.contextmenu.SubMenu> - Overrides:
createMenuManager
in classcom.vaadin.flow.component.contextmenu.SubMenu
-
getMenuManager
protected JmixMenuManager<com.vaadin.flow.component.contextmenu.ContextMenu,com.vaadin.flow.component.contextmenu.MenuItem, getMenuManager()com.vaadin.flow.component.contextmenu.SubMenu> - Overrides:
getMenuManager
in classcom.vaadin.flow.component.contextmenu.SubMenuBase<com.vaadin.flow.component.contextmenu.ContextMenu,
com.vaadin.flow.component.contextmenu.MenuItem, com.vaadin.flow.component.contextmenu.SubMenu>
-