public class MenuBuilder extends Object
Constructor and Description |
---|
MenuBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
addMenuItem(MenuItem menuItem,
String... parentPath)
Adds a menu item for path.
|
void |
apply(com.vaadin.ui.MenuBar rootMenu,
List<VertexRef> targets,
OperationContext operationContext,
Runnable... hooks) |
protected void |
applyOrderToChildren(MenuItem parent) |
com.vaadin.ui.MenuBar |
build(List<VertexRef> targets,
OperationContext operationContext,
Runnable... hooks)
Converts the current menu configuration to Vaadin's
MenuBar representation. |
void |
createPath(String... path)
Creates the provided menu path (e.g.
|
protected void |
determineAndApplyOrder() |
protected static String |
getGroupForLabel(String label,
List<String> submenuOrder) |
protected static String |
removeLabelProperties(String commandKey) |
void |
setSubMenuGroupOrder(Map<String,List<String>> submenOrderMap) |
void |
setTopLevelMenuOrder(List<String> menuOrder) |
public void createPath(String... path)
path
- The path to createpublic void addMenuItem(MenuItem menuItem, String... parentPath)
menuItem
- The item to add.parentPath
- The item to add toprotected void determineAndApplyOrder()
protected void applyOrderToChildren(MenuItem parent)
public com.vaadin.ui.MenuBar build(List<VertexRef> targets, OperationContext operationContext, Runnable... hooks)
MenuBar
representation.targets
- The current targets (e.g. the selection)operationContext
- The current OperationContext
.hooks
- Optional hooks to be executed after a menu item's command has been executed.MenuBar
public void apply(com.vaadin.ui.MenuBar rootMenu, List<VertexRef> targets, OperationContext operationContext, Runnable... hooks)
Copyright © 2021. All rights reserved.