L - Click listener typeM - Concrete ContextMenu component typeI - Menu item typeS - Sub menu typeB - Parent configurator typepublic static interface ContextMenuConfigurator.MenuItemBuilder<L extends EventListener,M extends com.vaadin.flow.component.contextmenu.ContextMenuBase<M,I,S>,I extends com.vaadin.flow.component.contextmenu.MenuItemBase<M,I,S>,S extends com.vaadin.flow.component.contextmenu.SubMenuBase<M,I,S>,B extends ContextMenuConfigurator<L,M,I,S,B>> extends HasEnabledConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>>, HasTextConfigurator<ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B>>
HasEnabledConfigurator.BaseHasEnabledConfiguratorHasTextConfigurator.BaseHasTextConfigurator| Modifier and Type | Method and Description |
|---|---|
B |
add()
Add the menu item to the context menu.
|
default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
checkable()
Set the menu as checkable.
|
ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
checkable(boolean checkable)
Set whether the menu item is checkable.
|
ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
checked(boolean checked)
Set whether a checkable menu item is checked.
|
ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
id(String id)
Sets the id of the root element of the menu item.
|
default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
onClick(L menuItemClickListener)
Register a menu item click event listener.
|
ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> |
withClickListener(L menuItemClickListener)
Register a menu item click event listener.
|
create, disabled, enabledContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> id(String id)
id - the id to setContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checkable(boolean checkable)
A checkable item toggles a checkmark icon when clicked.
Changes in the checked state can be handled in the item's click handler with isChecked().
checkable - Whether the menu item is checkabledefault ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checkable()
A checkable item toggles a checkmark icon when clicked.
Changes in the checked state can be handled in the item's click handler with isChecked().
ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> checked(boolean checked)
checked - Whether the menu item is checkedcheckable(boolean)ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> withClickListener(L menuItemClickListener)
menuItemClickListener - The listener to add (not null)default ContextMenuConfigurator.MenuItemBuilder<L,M,I,S,B> onClick(L menuItemClickListener)
Alias for withClickListener(EventListener).
menuItemClickListener - The listener to add (not null)B add()
Copyright © 2020 The Holon Platform. All rights reserved.