public class SimpleMenuItem extends AbstractMenuItem
MenuItem which always returns
true for isVisible(List, OperationContext) and isEnabled(List, OperationContext),
but false for AbstractMenuItem.isCheckable() and isChecked(List, OperationContext)| Constructor and Description |
|---|
SimpleMenuItem(String label) |
| Modifier and Type | Method and Description |
|---|---|
MenuCommand |
getCommand()
Returns the command to execute if the
MenuItem is selected. |
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 |
setCommand(MenuCommand command) |
addChildren, getChildren, getLabel, getOrder, isCheckable, setCheckable, setLabel, setOrderpublic SimpleMenuItem(String label)
public boolean isVisible(List<VertexRef> targets, OperationContext operationContext)
MenuItemMenuItem is visible.targets - 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.targets - The current targets (e.g. the selection)operationContext - The current OperationContext.public boolean isChecked(List<VertexRef> targets, OperationContext operationContext)
MenuItemMenuItem is checked.
If MenuItem.isCheckable() returns false, this is never called.targets - The current targets (e.g. the selection)operationContext - The current OperationContext.public MenuCommand getCommand()
MenuItemMenuItem is selected.
Please Note, that it MUST return null if MenuItem.getChildren() is NOT empty.MenuItem is selected, or null if MenuItem.getChildren() is NOT empty.public void setCommand(MenuCommand command)
Copyright © 2022. All rights reserved.