Interface ParentMenuItem<T extends MenuItem>
- Type Parameters:
T
- child menu item type
- All Superinterfaces:
MenuItem
- All Known Implementing Classes:
HorizontalMenu.ParentMenuItem
,ListMenu.MenuBarItem
Represents an item of a menu (for example,
ListMenu
)
which can contain nested child items-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildItem
(T item) Adds child menu item.void
addChildItem
(T item, int index) Adds child menu item at index.boolean
isOpened()
void
Removes all child items of this parent itemvoid
removeChildItem
(T item) Removes child menu item.void
setOpened
(boolean opened) Sets the opened status of the item.
-
Method Details
-
getChildItems
- Returns:
- child items of this parent item
-
removeAllChildItems
void removeAllChildItems()Removes all child items of this parent item -
addChildItem
Adds child menu item.- Parameters:
item
- menu item to add
-
addChildItem
Adds child menu item at index.- Parameters:
item
- menu item to addindex
- index in children collection to add at
-
removeChildItem
Removes child menu item.- Parameters:
item
- menu item to remove
-
setOpened
void setOpened(boolean opened) Sets the opened status of the item.- Parameters:
opened
- true/false to open/close the item
-
isOpened
boolean isOpened()- Returns:
- true/false if the item is opened/closed
-