@NpmPackage(value="@polymer/iron-collapse",
version="^3.0.1")
@JsModule(value="./iron-collapse-button/iron-collapse-button.js") @JsModule(value="./fc-applayout/fc-menuitem.js")
@Tag(value="fc-menuitem")
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 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,
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() |
protected void |
onAttach(com.vaadin.flow.component.AttachEvent attachEvent) |
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, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentAt, getComponentCount, indexOf, replacepublic MenuItem()
public MenuItem(String label)
MenuItem with a label.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.protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
onAttach in class com.vaadin.flow.component.Componentpublic 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.