Class HorizontalMenu.MenuItem
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.router.RouterLink>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.MenuItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.shared.HasPrefix,com.vaadin.flow.component.shared.HasSuffix,com.vaadin.flow.component.shared.HasTooltip,MenuItem,Serializable
- Direct Known Subclasses:
HorizontalMenu.ViewMenuItem
- Enclosing class:
- HorizontalMenu
public static class HorizontalMenu.MenuItem
extends HorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.router.RouterLink>
Represents horizontal menu item that can run some action on click
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.dom.DomListenerRegistrationprotected static final Stringprotected KeyCombinationprotected com.vaadin.flow.component.ShortcutRegistrationFields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
CONTENT_ITEM_CLASS_NAME, PREFIX_COMPONENT_CLASS_NAME, prefixComponent, PREFIXED_ATTRIBUTE_NAME, SUFFIX_COMPONENT_CLASS_NAME, suffixComponent, SUFFIXED_ATTRIBUTE_NAME, TEXT_COMPONENT_CLASS_NAME, textComponent, tooltipFields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.router.RouterLinkprotected voidonShortcutEvent(com.vaadin.flow.component.ShortcutEvent event) com.vaadin.flow.shared.RegistrationsetClickHandler(Consumer<HorizontalMenu.MenuItem> clickHandler) Sets click handler of the item.voidsetShortcutCombination(KeyCombination shortcutCombination) Sets shortcut key combination of the item.protected voidMethods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
getPrefixComponent, getSuffixComponent, getTitle, getTooltip, getTooltipInternal, setPrefixComponent, setPrefixComponentInternal, setPrefixedAttribute, setSuffixComponent, setSuffixComponentInternal, setSuffixedAttribute, setTextComponentInternal, setTitle, setTooltipText, updateContentMethods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItemMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, 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.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
MENU_ITEM_CLASS_NAME
- See Also:
-
shortcutCombination
-
clickHandlerRegistration
protected com.vaadin.flow.dom.DomListenerRegistration clickHandlerRegistration -
shortcutRegistration
protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration
-
-
Constructor Details
-
MenuItem
public MenuItem() -
MenuItem
-
-
Method Details
-
initContent
protected com.vaadin.flow.router.RouterLink initContent()- Overrides:
initContentin classHorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.router.RouterLink>
-
setClickHandler
@Nullable public com.vaadin.flow.shared.Registration setClickHandler(@Nullable Consumer<HorizontalMenu.MenuItem> clickHandler) Sets click handler of the item.- Parameters:
clickHandler- menu item click handler- Returns:
- click handler registration
-
setShortcutCombination
Sets shortcut key combination of the item.- Parameters:
shortcutCombination- shortcut key combination
-
getShortcutCombination
- Returns:
- shortcut key combination of the item
-
updateShortcutRegistration
protected void updateShortcutRegistration() -
onShortcutEvent
protected void onShortcutEvent(com.vaadin.flow.component.ShortcutEvent event)
-