Interface TextUserMenuItem

All Superinterfaces:
com.vaadin.flow.component.HasElement, HasSubParts, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<UserMenuItemVariant>, Serializable, UserMenuItem, UserMenuItem.HasClickListener<TextUserMenuItem>, UserMenuItem.HasSubMenu
All Known Implementing Classes:
JmixUserMenu.TextUserMenuItemImpl

Represents a user menu item that contains text and an optional icon.
  • Field Details

  • Method Details

    • getText

      String getText()
      Returns the text contained within this user menu item.
      Returns:
      the text of the menu item
    • setText

      void setText(String text)
      Sets the text contained within this user menu item.
      Parameters:
      text - the text to be set for the menu item
    • getIcon

      @Nullable com.vaadin.flow.component.Component getIcon()
      Retrieves the icon associated with this user menu item, if one exists.
      Returns:
      the icon component of this menu item, or null if no icon is set
    • setIcon

      void setIcon(@Nullable com.vaadin.flow.component.Component icon)
      Sets the icon for this user menu item.
      Parameters:
      icon - the icon to set for this menu item; can be null to remove the icon