@Tag(value="fc-menuitem") @HtmlImport(value="bower_components/fc-applayout/fc-menuitem.html") public class MenuItem extends com.vaadin.flow.component.Component implements com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents<MenuItem>
| Constructor and Description |
|---|
MenuItem()
No argument constructor
|
MenuItem(String label)
Create a new instance of
MenuItem with a labelicon. |
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,
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 |
|---|---|
void |
add(com.vaadin.flow.component.Component... components) |
MenuItem |
add(MenuItem... items)
Adds the given menu items as children of this component.
|
com.vaadin.flow.server.Command |
getCommand() |
com.vaadin.flow.server.Command |
getCommand(MouseClickEvent.MouseButton button) |
String |
getIcon() |
String |
getImage() |
String |
getLabel() |
MenuItem |
setCommand(com.vaadin.flow.server.Command command) |
MenuItem |
setCommand(MouseClickEvent.MouseButton button,
com.vaadin.flow.server.Command command) |
MenuItem |
setIcon(String icon) |
MenuItem |
setImage(String imageUrl) |
MenuItem |
setLabel(String label) |
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic MenuItem()
public MenuItem(String label)
MenuItem with a labelicon.public MenuItem(String label, com.vaadin.flow.server.Command command)
MenuItem with a label 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 void add(com.vaadin.flow.component.Component... components)
add in interface com.vaadin.flow.component.HasComponentspublic final MenuItem add(MenuItem... items)
public String getLabel()
public String getIcon()
public String getImage()
public MenuItem setCommand(com.vaadin.flow.server.Command command)
public MenuItem setCommand(MouseClickEvent.MouseButton button, com.vaadin.flow.server.Command command)
public com.vaadin.flow.server.Command getCommand()
public com.vaadin.flow.server.Command getCommand(MouseClickEvent.MouseButton button)
Copyright © 2018–2019 Flowing Code. All rights reserved.