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
Modifier and TypeFieldDescriptionprotected com.vaadin.flow.dom.DomListenerRegistration
protected static final String
protected KeyCombination
protected com.vaadin.flow.component.ShortcutRegistration
Fields 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, tooltip
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.router.RouterLink
protected void
onShortcutEvent
(com.vaadin.flow.component.ShortcutEvent event) com.vaadin.flow.shared.Registration
setClickHandler
(Consumer<HorizontalMenu.MenuItem> clickHandler) Sets click handler of the item.void
setShortcutCombination
(KeyCombination shortcutCombination) Sets shortcut key combination of the item.protected void
Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
getPrefixComponent, getSuffixComponent, getTitle, getTooltip, getTooltipInternal, setPrefixComponent, setPrefixComponentInternal, setPrefixedAttribute, setSuffixComponent, setSuffixComponentInternal, setSuffixedAttribute, setTextComponentInternal, setTitle, setTooltipText, updateContent
Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItem
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods 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, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods 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:
initContent
in 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)
-