public class OperationMenuItem extends Object implements MenuItem
| Constructor and Description |
|---|
OperationMenuItem(OperationServiceWrapper operationServiceWrapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildren(MenuItem menuItem)
Adds a children to the current
MenuItem |
List<MenuItem> |
getChildren()
The
MenuItems can be cascaded (allowing a tree). |
MenuCommand |
getCommand()
Returns the command to execute if the
MenuItem is selected. |
String |
getLabel()
The Label of the menu item.
|
int |
getOrder() |
boolean |
isCheckable()
Defines if the current
MenuItem is a checkable item. |
boolean |
isChecked(List<VertexRef> targets,
OperationContext operationContext)
Defines if the current
MenuItem is checked. |
boolean |
isEnabled(List<VertexRef> targets,
OperationContext operationContext)
Defines if the current
MenuItem is enabled. |
boolean |
isVisible(List<VertexRef> targets,
OperationContext operationContext)
Defines if the current
MenuItem is visible. |
void |
setOrder(int order) |
public OperationMenuItem(OperationServiceWrapper operationServiceWrapper)
public String getLabel()
MenuItempublic boolean isVisible(List<VertexRef> targets, OperationContext operationContext)
MenuItemMenuItem is visible.isVisible in interface MenuItemtargets - The current targets (e.g. the selection)operationContext - The current OperationContext.public boolean isEnabled(List<VertexRef> targets, OperationContext operationContext)
MenuItemMenuItem is enabled.
If MenuItem.isVisible(List, OperationContext) returns false, this is never called.isEnabled in interface MenuItemtargets - The current targets (e.g. the selection)operationContext - The current OperationContext.public List<MenuItem> getChildren()
MenuItemMenuItems can be cascaded (allowing a tree).getChildren in interface MenuItempublic void addChildren(MenuItem menuItem)
MenuItemMenuItemaddChildren in interface MenuItemmenuItem - the child to add.public MenuCommand getCommand()
MenuItemMenuItem is selected.
Please Note, that it MUST return null if MenuItem.getChildren() is NOT empty.getCommand in interface MenuItemMenuItem is selected, or null if MenuItem.getChildren() is NOT empty.public boolean isCheckable()
MenuItemMenuItem is a checkable item.isCheckable in interface MenuItemMenuBar.MenuItem#isCheckable()public boolean isChecked(List<VertexRef> targets, OperationContext operationContext)
MenuItemMenuItem is checked.
If MenuItem.isCheckable() returns false, this is never called.isChecked in interface MenuItemtargets - The current targets (e.g. the selection)operationContext - The current OperationContext.Copyright © 2022. All rights reserved.