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
public interface TextUserMenuItem
extends UserMenuItem, UserMenuItem.HasSubMenu, UserMenuItem.HasClickListener<TextUserMenuItem>
Represents a user menu item that contains text and an optional icon.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
UserMenuItem.HasClickListener<ITEM extends UserMenuItem>, UserMenuItem.HasSubMenuNested classes/interfaces inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem.HasClickListener
UserMenuItem.HasClickListener.ClickEvent<ITEM extends UserMenuItem>Nested classes/interfaces inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem.HasSubMenu
UserMenuItem.HasSubMenu.SubMenu -
Field Summary
FieldsFields inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
PROP_CHECKABLE, PROP_CHECKED, PROP_ENABLED, PROP_VISIBLE -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetIcon()Retrieves the icon associated with this user menu item, if one exists.getText()Returns the text contained within this user menu item.voidsetIcon(com.vaadin.flow.component.Component icon) Sets the icon for this user menu item.voidSets the text contained within this user menu item.Methods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface io.jmix.flowui.kit.component.HasSubParts
getSubPartMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
addPropertyChangeListener, getId, isCheckable, isChecked, isEnabled, isVisible, setCheckable, setChecked, setEnabled, setVisibleMethods inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem.HasClickListener
addClickListenerMethods inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem.HasSubMenu
getSubMenu
-
Field Details
-
PROP_TEXT
- See Also:
-
PROP_ICON
- See Also:
-
-
Method Details
-
getText
String getText()Returns the text contained within this user menu item.- Returns:
- the text of the menu item
-
setText
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
nullif 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 benullto remove the icon
-