public class MenuItem extends Object
| Constructor and Description |
|---|
MenuItem()
No argument constructor
|
MenuItem(String label)
Create a new instance of
MenuItem with a label. |
MenuItem(String label,
com.vaadin.flow.server.Command command)
Create a new instance of
MenuItem with a label and left-button command. |
MenuItem(String label,
String icon,
com.vaadin.flow.server.Command command)
Create a new instance of
MenuItem with a label, an icon, and left-button command. |
MenuItem(String label,
String icon,
MenuItem... subMenuItems)
Deprecated.
(for removal) Use fluent API.
|
MenuItem(String label,
URL image,
com.vaadin.flow.server.Command command) |
MenuItem(String label,
URL image,
MenuItem... subMenuItems)
Deprecated.
(for removal) Use fluent API
|
MenuItem(String label,
com.vaadin.flow.component.icon.VaadinIcon icon,
com.vaadin.flow.server.Command command)
Create a new instance of
MenuItem with a label, a VaadinIcon, and left-button command. |
| Modifier and Type | Method and Description |
|---|---|
MenuItem |
add(MenuItem... items)
Adds the given menu items as children of this component.
|
com.vaadin.flow.server.Command |
getCommand() |
String |
getIcon() |
String |
getImage() |
URL |
getImageURL()
Deprecated.
(for removal) Use
getImage() |
String |
getLabel() |
List<MenuItem> |
getSubMenuItems() |
boolean |
isEnabled() |
boolean |
isSubMenuFolder()
Deprecated.
(for removal)
|
MenuItem |
setCommand(com.vaadin.flow.server.Command command) |
void |
setEnabled(boolean enabled) |
MenuItem |
setIcon(String icon) |
MenuItem |
setImage(String image) |
void |
setImageURL(URL imageURL)
Deprecated.
(for removal) Use
setImage(String) |
MenuItem |
setLabel(String label) |
void |
setRefreshCallback(Runnable refreshCallback)
This allows you to configure a callback that is called whenever you change the label and icon
|
void |
setSubMenuItems(List<MenuItem> subMenuItems) |
public MenuItem()
public MenuItem(String label)
MenuItem with a label.@Deprecated public MenuItem(String label, String icon, MenuItem... subMenuItems)
@Deprecated public MenuItem(String label, URL image, MenuItem... subMenuItems)
public MenuItem(String label, com.vaadin.flow.server.Command command)
MenuItem with a label and left-button command.public MenuItem(String label, String icon, com.vaadin.flow.server.Command command)
MenuItem with a label, an icon, and left-button command.public MenuItem(String label, com.vaadin.flow.component.icon.VaadinIcon icon, com.vaadin.flow.server.Command command)
MenuItem with a label, a VaadinIcon, and left-button command.public String getLabel()
public com.vaadin.flow.server.Command getCommand()
public MenuItem setCommand(com.vaadin.flow.server.Command command)
public String getIcon()
@Deprecated public boolean isSubMenuFolder()
public void setRefreshCallback(Runnable refreshCallback)
refreshCallback - public boolean isEnabled()
public void setEnabled(boolean enabled)
public String getImage()
@Deprecated public URL getImageURL()
getImage()@Deprecated public void setImageURL(URL imageURL)
setImage(String)Copyright © 2018–2019 Flowing Code. All rights reserved.