@NpmPackage(value="@polymer/iron-collapse",version="^3.0.1") @NpmPackage(value="@polymer/paper-item",version="3.0.1") @NpmPackage(value="@flowingcode/fc-menuitem",version="~0.9.5") @Tag(value="fc-menuitem") @JsModule(value="@flowingcode/fc-menuitem/fc-menuitem.js") public class MenuItem extends SlottedMenuItem implements com.vaadin.flow.component.HasOrderedComponents
| Modifier and Type | Class and Description |
|---|---|
static class |
HasMenuItemCommands.Data |
| Constructor and Description |
|---|
MenuItem()
No argument constructor
|
MenuItem(String label)
Create a new instance of
MenuItem with a label. |
MenuItem(String label,
Class<? extends com.vaadin.flow.component.Component> navigationTarget)
Create a new instance of
MenuItem with a label for the given navigation target. |
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,
com.vaadin.flow.component.icon.IconFactory icon)
Create a new instance of
MenuItem with a label and an IconFactory. |
MenuItem(String label,
com.vaadin.flow.component.icon.IconFactory icon,
com.vaadin.flow.server.Command command)
Create a new instance of
MenuItem with a label, an IconFactory, and left-button
command. |
MenuItem(String label,
String icon)
Create a new instance of
MenuItem with a label and an icon. |
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. |
| 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.
|
MenuItem |
configure(Consumer<MenuItem> consumer) |
String |
getHref() |
default String |
getIcon() |
default String |
getImage() |
String |
getLabel() |
String |
getTitle() |
default T |
setCommand(com.vaadin.flow.server.Command command) |
default T |
setCommand(MouseClickEvent.MouseButton button,
com.vaadin.flow.server.Command command) |
MenuItem |
setHref(String href) |
default T |
setIcon(String icon) |
void |
setIconBlank() |
void |
setIconSpacing(boolean value)
Deprecated.
This method ignores the parameter. Use
setIconBlank(). |
default T |
setImage(String imageUrl) |
MenuItem |
setLabel(String label) |
MenuItem |
setLink(com.vaadin.flow.router.RouterLink link) |
MenuItem |
setTitle(String title) |
onAttachaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildren, getComponentAt, 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, Class<? extends com.vaadin.flow.component.Component> navigationTarget)
MenuItem with a label for the given navigation target.public MenuItem(String label, String icon)
MenuItem with a label and an icon.public MenuItem(String label, com.vaadin.flow.component.icon.IconFactory icon)
MenuItem with a label and an IconFactory.public MenuItem(String label, com.vaadin.flow.component.icon.IconFactory icon, com.vaadin.flow.server.Command command)
MenuItem with a label, an IconFactory, and left-button
command.public final MenuItem add(MenuItem... items)
public void add(com.vaadin.flow.component.Component... components)
add in interface com.vaadin.flow.component.HasComponentspublic String getTitle()
public String getLabel()
public String getHref()
public MenuItem setLink(com.vaadin.flow.router.RouterLink link)
@Deprecated public void setIconSpacing(boolean value)
setIconBlank().public void setIconBlank()
public T setCommand(com.vaadin.flow.server.Command command)
public T setCommand(MouseClickEvent.MouseButton button, com.vaadin.flow.server.Command command)
public String getIcon()
public T setIcon(String icon)
public String getImage()
public T setImage(String imageUrl)
Copyright © 2018–2021 Flowing Code. All rights reserved.