Package com.flowingcode.addons.applayout
Class MenuItem
java.lang.Object
com.vaadin.flow.component.Component
com.flowingcode.addons.applayout.SlottedMenuItem
com.flowingcode.addons.applayout.MenuItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasOrderedComponents,com.vaadin.flow.component.HasStyle,Serializable
@NpmPackage(value="@polymer/iron-collapse",version="3.0.1") @NpmPackage(value="@polymer/paper-item",version="3.0.1") @NpmPackage(value="@flowingcode/fc-menuitem",version="1.0.0")
@Tag("fc-menuitem")
@JsModule("@flowingcode/fc-menuitem/fc-menuitem.js")
public class MenuItem
extends SlottedMenuItem
implements com.vaadin.flow.component.HasOrderedComponents
Menu item component.
- Author:
- mlopez
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMenuItem()No argument constructorCreate a new instance ofMenuItemwith a label.Create a new instance ofMenuItemwith a label and anIconFactory.MenuItem(String label, com.vaadin.flow.component.icon.IconFactory icon, com.vaadin.flow.server.Command command) Create a new instance ofMenuItemwith a label, anIconFactory, and left-button command.Create a new instance ofMenuItemwith a label and left-button command.Create a new instance ofMenuItemwith a label for the given navigation target.Create a new instance ofMenuItemwith a label and an icon.Create a new instance ofMenuItemwith a label, an icon, and left-button command. -
Method Summary
Modifier and TypeMethodDescriptionfinal MenuItemAdds the given menu items as children of this component.voidadd(com.vaadin.flow.component.Component... components) getHref()default StringgetIcon()default StringgetImage()getLabel()getTitle()default MenuItemsetCommand(MouseClickEvent.MouseButton button, com.vaadin.flow.server.Command command) default MenuItemsetCommand(com.vaadin.flow.server.Command command) default MenuItemvoidvoidsetIconSpacing(boolean value) Deprecated.This method ignores the parameter.default MenuItemsetLink(com.vaadin.flow.router.RouterLink link) setOpened(boolean opened) Methods inherited from class com.flowingcode.addons.applayout.SlottedMenuItem
onAttachMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasOrderedComponents
getChildren, getComponentAt, getComponentCount, indexOf, replaceMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
MenuItem
public MenuItem()No argument constructor -
MenuItem
Create a new instance ofMenuItemwith a label. -
MenuItem
Create a new instance ofMenuItemwith a label and left-button command. -
MenuItem
public MenuItem(String label, Class<? extends com.vaadin.flow.component.Component> navigationTarget) Create a new instance ofMenuItemwith a label for the given navigation target. -
MenuItem
Create a new instance ofMenuItemwith a label and an icon. -
MenuItem
Create a new instance ofMenuItemwith a label and anIconFactory. -
MenuItem
public MenuItem(String label, com.vaadin.flow.component.icon.IconFactory icon, com.vaadin.flow.server.Command command) Create a new instance ofMenuItemwith a label, anIconFactory, and left-button command. -
MenuItem
Create a new instance ofMenuItemwith a label, an icon, and left-button command.
-
-
Method Details
-
add
Adds the given menu items as children of this component. -
add
public void add(com.vaadin.flow.component.Component... components) - Specified by:
addin interfacecom.vaadin.flow.component.HasComponents
-
getTitle
-
setTitle
-
getLabel
-
getHref
-
setLabel
-
setLink
-
setHref
-
setOpened
-
configure
-
setIconSpacing
Deprecated.This method ignores the parameter. UsesetIconBlank(). -
setIconBlank
public void setIconBlank() -
setCommand
-
setCommand
default MenuItem setCommand(MouseClickEvent.MouseButton button, com.vaadin.flow.server.Command command) -
getIcon
-
setIcon
-
getImage
-
setImage
-