Class NavigationMenuItem
- java.lang.Object
-
- org.opennms.features.topology.app.internal.menu.AbstractMenuItem
-
- org.opennms.features.topology.app.internal.menu.NavigationMenuItem
-
- All Implemented Interfaces:
Comparable<MenuItem>
,MenuItem
public class NavigationMenuItem extends AbstractMenuItem
Menu item to allow navigation to target vertices from a specific source vertex.
-
-
Constructor Summary
Constructors Constructor Description NavigationMenuItem(GraphProvider targetGraphProvider, VertexRef sourceVertex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MenuCommand
getCommand()
Returns the command to execute if theMenuItem
is selected.boolean
isChecked(List<VertexRef> targets, OperationContext operationContext)
Defines if the currentMenuItem
is checked.boolean
isEnabled(List<VertexRef> targets, OperationContext operationContext)
Defines if the currentMenuItem
is enabled.boolean
isVisible(List<VertexRef> targets, OperationContext operationContext)
Defines if the currentMenuItem
is visible.-
Methods inherited from class org.opennms.features.topology.app.internal.menu.AbstractMenuItem
addChildren, getChildren, getLabel, getOrder, isCheckable, setCheckable, setLabel, setOrder
-
-
-
-
Constructor Detail
-
NavigationMenuItem
public NavigationMenuItem(GraphProvider targetGraphProvider, VertexRef sourceVertex)
-
-
Method Detail
-
getCommand
public MenuCommand getCommand()
Description copied from interface:MenuItem
Returns the command to execute if theMenuItem
is selected. Please Note, that it MUST return null ifMenuItem.getChildren()
is NOT empty.- Returns:
- the command to execute if the
MenuItem
is selected, or null ifMenuItem.getChildren()
is NOT empty.
-
isChecked
public boolean isChecked(List<VertexRef> targets, OperationContext operationContext)
Description copied from interface:MenuItem
Defines if the currentMenuItem
is checked. IfMenuItem.isCheckable()
returns false, this is never called.- Parameters:
targets
- The current targets (e.g. the selection)operationContext
- The currentOperationContext
.- Returns:
- True if it is checked, false otherwise.
-
isVisible
public boolean isVisible(List<VertexRef> targets, OperationContext operationContext)
Description copied from interface:MenuItem
Defines if the currentMenuItem
is visible.- Parameters:
targets
- The current targets (e.g. the selection)operationContext
- The currentOperationContext
.- Returns:
- True if visible, false otherwise.
-
isEnabled
public boolean isEnabled(List<VertexRef> targets, OperationContext operationContext)
Description copied from interface:MenuItem
Defines if the currentMenuItem
is enabled. IfMenuItem.isVisible(List, OperationContext)
returns false, this is never called.- Parameters:
targets
- The current targets (e.g. the selection)operationContext
- The currentOperationContext
.- Returns:
- True if enabled, false otherwise.
-
-