Class AbstractMenuItem
- java.lang.Object
-
- org.opennms.features.topology.app.internal.menu.AbstractMenuItem
-
- Direct Known Subclasses:
NavigationMenuItem
,SimpleMenuItem
public abstract class AbstractMenuItem extends java.lang.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
java.util.List<MenuItem>
getChildren()
TheMenuItem
s can be cascaded (allowing a tree).java.lang.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(java.lang.String label)
void
setOrder(int order)
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Description copied from interface:MenuItem
The Label of the menu item.
-
setLabel
public void setLabel(java.lang.String label)
-
getChildren
public java.util.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)
-
-