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 customMenuItemimplementations.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description AbstractMenuItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildren(MenuItem menuItem)Adds a children to the currentMenuItemList<MenuItem>getChildren()TheMenuItems can be cascaded (allowing a tree).StringgetLabel()The Label of the menu item.intgetOrder()booleanisCheckable()Defines if the currentMenuItemis a checkable item.voidsetCheckable(boolean checkable)voidsetLabel(String label)voidsetOrder(int order)
-
-
-
Method Detail
-
getLabel
public String getLabel()
Description copied from interface:MenuItemThe Label of the menu item.
-
setLabel
public void setLabel(String label)
-
getChildren
public List<MenuItem> getChildren()
Description copied from interface:MenuItemTheMenuItems can be cascaded (allowing a tree).- Specified by:
getChildrenin 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:MenuItemAdds a children to the currentMenuItem- Specified by:
addChildrenin interfaceMenuItem- Parameters:
menuItem- the child to add.
-
isCheckable
public boolean isCheckable()
Description copied from interface:MenuItemDefines if the currentMenuItemis a checkable item.- Specified by:
isCheckablein interfaceMenuItem- Returns:
- true if checkable, false otherwise
- See Also:
MenuBar.MenuItem.isCheckable()
-
setCheckable
public void setCheckable(boolean checkable)
-
-