Interface HasTextMenuItems

All Superinterfaces:
HasMenuItems
All Known Subinterfaces:
UserMenuItem.HasSubMenu.SubMenu
All Known Implementing Classes:
JmixUserMenu, JmixUserMenu.JmixUserMenuSubMenu, JmixUserMenuItemsDelegate, UserMenu, UserMenu.UserMenuSubMenu, UserMenuItemsDelegate

public interface HasTextMenuItems extends HasMenuItems
Defines a set of methods for JmixUserMenu components where menu items can contain text and icon.
  • Method Details

    • addTextItem

      TextUserMenuItem addTextItem(String id, String text)
      Adds a new menu item with the specified ID and text.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      Returns:
      newly created menu item
    • addTextItem

      TextUserMenuItem addTextItem(String id, String text, int index)
      Adds a new menu item with the specified ID and text at the given index.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      index - position at which to insert the menu item
      Returns:
      newly created menu item
    • addTextItem

      Adds a new menu item with the specified ID, text and click listener.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      listener - callback to be invoked when the menu item is clicked
      Returns:
      newly created menu item
    • addTextItem

      Adds a new menu item with the specified ID, text and click listener at the given index.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      listener - callback to be invoked when the menu item is clicked
      index - position at which to insert the menu item
      Returns:
      newly created menu item
    • addTextItem

      TextUserMenuItem addTextItem(String id, String text, com.vaadin.flow.component.Component icon)
      Adds a new menu item with the specified ID, text and icon.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      icon - icon component to be displayed in the menu item
      Returns:
      newly created menu item
    • addTextItem

      TextUserMenuItem addTextItem(String id, String text, com.vaadin.flow.component.Component icon, int index)
      Adds a new menu item with the specified ID, text and icon at the given index.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      icon - icon component to be displayed in the menu item
      index - position at which to insert the menu item
      Returns:
      newly created menu item
    • addTextItem

      TextUserMenuItem addTextItem(String id, String text, com.vaadin.flow.component.Component icon, Consumer<UserMenuItem.HasClickListener.ClickEvent<TextUserMenuItem>> listener)
      Adds a new menu item with the specified ID, text, icon and click listener.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      icon - icon component to be displayed in the menu item
      listener - callback to be invoked when the menu item is clicked
      Returns:
      newly created menu item
    • addTextItem

      TextUserMenuItem addTextItem(String id, String text, com.vaadin.flow.component.Component icon, Consumer<UserMenuItem.HasClickListener.ClickEvent<TextUserMenuItem>> listener, int index)
      Adds a new menu item with the specified ID, text, icon and click listener at the given index.
      Parameters:
      id - unique identifier for the menu item
      text - text to be displayed in the menu item
      icon - icon component to be displayed in the menu item
      listener - callback to be invoked when the menu item is clicked
      index - position at which to insert the menu item
      Returns:
      newly created menu item