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 Details

    • shortcutCombination

      protected KeyCombination shortcutCombination
    • clickHandlerRegistration

      protected com.vaadin.flow.dom.DomListenerRegistration clickHandlerRegistration
    • shortcutRegistration

      protected com.vaadin.flow.component.ShortcutRegistration shortcutRegistration
  • Constructor Details

    • MenuItem

      public MenuItem()
    • MenuItem

      public MenuItem(String id)
  • Method Details

    • initContent

      protected com.vaadin.flow.router.RouterLink initContent()
      Overrides:
      initContent in class HorizontalMenu.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

      public void setShortcutCombination(@Nullable KeyCombination shortcutCombination)
      Sets shortcut key combination of the item.
      Parameters:
      shortcutCombination - shortcut key combination
    • getShortcutCombination

      @Nullable public KeyCombination getShortcutCombination()
      Returns:
      shortcut key combination of the item
    • updateShortcutRegistration

      protected void updateShortcutRegistration()
    • onShortcutEvent

      protected void onShortcutEvent(com.vaadin.flow.component.ShortcutEvent event)