Class AbstractMenuItem
- java.lang.Object
-
- org.opennms.features.topology.app.internal.menu.AbstractMenuItem
-
- All Implemented Interfaces:
Comparable<MenuItem>
,MenuItem
- Direct Known Subclasses:
NavigationMenuItem
,SimpleMenuItem
public abstract class AbstractMenuItem extends Object implements MenuItem
Convenient object which provides setter/getter for label, order and checkable. May be enough for customMenuItem
implementations.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description AbstractMenuItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildren(MenuItem menuItem)
Adds a children to the currentMenuItem
List<MenuItem>
getChildren()
TheMenuItem
s can be cascaded (allowing a tree).String
getLabel()
The Label of the menu item.int
getOrder()
boolean
isCheckable()
Defines if the currentMenuItem
is a checkable item.void
setCheckable(boolean checkable)
void
setLabel(String label)
void
setOrder(int order)
-
-
-
Method Detail
-
getLabel
public String getLabel()
Description copied from interface:MenuItem
The Label of the menu item.
-
setLabel
public void setLabel(String label)
-
getChildren
public List<MenuItem> getChildren()
Description copied from interface:MenuItem
TheMenuItem
s can be cascaded (allowing a tree).- Specified by:
getChildren
in interfaceMenuItem
- Returns:
- the children, or an empty list if no children exits. Must not be null.
-
addChildren
public void addChildren(MenuItem menuItem)
Description copied from interface:MenuItem
Adds a children to the currentMenuItem
- Specified by:
addChildren
in interfaceMenuItem
- Parameters:
menuItem
- the child to add.
-
isCheckable
public boolean isCheckable()
Description copied from interface:MenuItem
Defines if the currentMenuItem
is a checkable item.- Specified by:
isCheckable
in interfaceMenuItem
- Returns:
- true if checkable, false otherwise
- See Also:
MenuBar.MenuItem.isCheckable()
-
setCheckable
public void setCheckable(boolean checkable)
-
-