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:
AttachNotifier,DetachNotifier,HasComponents,HasElement,HasEnabled,HasOrderedComponents,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 HasOrderedComponents
Menu item component.
- Author:
- mlopez
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMenuItem()No argument constructorCreate a new instance ofMenuItemwith a label.MenuItem(String label, IconFactory icon) Create a new instance ofMenuItemwith a label and anIconFactory.MenuItem(String label, IconFactory icon, 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.voidgetHref()default StringgetIcon()default StringgetImage()getLabel()getTitle()default MenuItemsetCommand(MouseClickEvent.MouseButton button, Command command) default MenuItemsetCommand(Command command) default MenuItemvoidvoidsetIconSpacing(boolean value) Deprecated.This method ignores the parameter.default MenuItemsetLink(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
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
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
- Specified by:
addin interfaceHasComponents
-
getTitle
-
setTitle
-
getLabel
-
getHref
-
setLabel
-
setLink
-
setHref
-
setOpened
-
configure
-
setIconSpacing
Deprecated.This method ignores the parameter. UsesetIconBlank(). -
setIconBlank
public void setIconBlank() -
setCommand
-
setCommand
-
getIcon
-
setIcon
-
getImage
-
setImage
-