public static interface SideMenu.MenuItem
Modifier and Type | Method and Description |
---|---|
void |
addChildItem(SideMenu.MenuItem menuItem)
Add menu item to the end of children list.
|
void |
addChildItem(SideMenu.MenuItem menuItem,
int index)
Add menu item to specified position in the children list.
|
void |
addStyleName(java.lang.String styleName)
Adds one or more style names to this component.
|
java.lang.String |
getBadgeText() |
java.lang.String |
getCaption() |
java.util.List<SideMenu.MenuItem> |
getChildren() |
java.util.function.Consumer<SideMenu.MenuItem> |
getCommand() |
java.lang.String |
getDescription() |
java.lang.String |
getIcon() |
java.lang.String |
getId() |
SideMenu |
getMenu() |
SideMenu.MenuItem |
getParent() |
SideMenu.MenuItem |
getParentNN() |
java.lang.String |
getStyleName() |
boolean |
hasChildren() |
boolean |
isCaptionAsHtml() |
boolean |
isExpanded() |
boolean |
isVisible() |
void |
removeAllChildItems()
Remove all child items from the children list.
|
void |
removeChildItem(int index)
Remove menu item from the children list by index.
|
void |
removeChildItem(SideMenu.MenuItem menuItem)
Remove menu item from the children list.
|
void |
removeStyleName(java.lang.String styleName)
Removes one or more style names from component.
|
void |
setBadgeText(java.lang.String badgeText)
Set badge text for item.
|
void |
setCaption(java.lang.String caption)
Set item caption.
|
void |
setCaptionAsHtml(boolean captionAsHtml)
Enable or disable HTML mode for caption.
|
void |
setCommand(java.util.function.Consumer<SideMenu.MenuItem> command)
Set item command
|
void |
setDescription(java.lang.String description)
Set description.
|
void |
setExpanded(boolean expanded)
Expand or collapse sub menu with children by default.
|
void |
setIcon(java.lang.String icon)
Set icon.
|
void |
setStyleName(java.lang.String styleName)
Sets one or more user-defined style names of the component, replacing any previous user-defined styles.
|
void |
setVisible(boolean visible)
Show or hide item.
|
java.lang.String getId()
SideMenu getMenu()
java.lang.String getCaption()
void setCaption(java.lang.String caption)
caption
- captionjava.lang.String getDescription()
void setDescription(java.lang.String description)
description
- descriptionjava.lang.String getIcon()
void setIcon(java.lang.String icon)
icon
- icon nameboolean isCaptionAsHtml()
void setCaptionAsHtml(boolean captionAsHtml)
captionAsHtml
- pass true to enable HTML mode for caption.boolean isVisible()
void setVisible(boolean visible)
visible
- pass false to hide menu itemboolean isExpanded()
void setExpanded(boolean expanded)
expanded
- pass true to set sub menu expanded by default.java.lang.String getStyleName()
void setStyleName(java.lang.String styleName)
styleName
- style name stringvoid addStyleName(java.lang.String styleName)
styleName
- style name stringvoid removeStyleName(java.lang.String styleName)
styleName
- style name stringjava.lang.String getBadgeText()
void setBadgeText(java.lang.String badgeText)
badgeText
- badge textjava.util.function.Consumer<SideMenu.MenuItem> getCommand()
void setCommand(java.util.function.Consumer<SideMenu.MenuItem> command)
command
- item commandvoid addChildItem(SideMenu.MenuItem menuItem)
menuItem
- menu itemvoid addChildItem(SideMenu.MenuItem menuItem, int index)
menuItem
- menu itemindex
- target indexvoid removeChildItem(SideMenu.MenuItem menuItem)
menuItem
- menu itemvoid removeChildItem(int index)
index
- indexvoid removeAllChildItems()
java.util.List<SideMenu.MenuItem> getChildren()
boolean hasChildren()
@Nullable SideMenu.MenuItem getParent()
SideMenu.MenuItem getParentNN()
java.lang.IllegalArgumentException
- if not found