Class JmixUserMenu.TextUserMenuItemImpl
java.lang.Object
io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractUserMenuItem
io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractTextUserMenuItem
io.jmix.flowui.kit.component.usermenu.JmixUserMenu.TextUserMenuItemImpl
- All Implemented Interfaces:
com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.shared.HasThemeVariant<UserMenuItemVariant>,HasSubParts,JmixUserMenu.HasMenuItem,TextUserMenuItem,UserMenuItem,UserMenuItem.HasClickListener<TextUserMenuItem>,UserMenuItem.HasSubMenu,Serializable
- Enclosing class:
- JmixUserMenu<USER>
protected static class JmixUserMenu.TextUserMenuItemImpl
extends JmixUserMenu.AbstractTextUserMenuItem
implements TextUserMenuItem
- See Also:
-
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
Fields inherited from class io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractTextUserMenuItem
icon, textFields inherited from class io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractUserMenuItem
id, item, menuItemClickListenerRegistration, subMenu, userMenuFields inherited from interface io.jmix.flowui.kit.component.usermenu.TextUserMenuItem
PROP_ICON, PROP_TEXTFields inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
PROP_CHECKABLE, PROP_CHECKED, PROP_ENABLED, PROP_VISIBLE -
Constructor Summary
ConstructorsConstructorDescriptionTextUserMenuItemImpl(String id, JmixUserMenu<?> userMenu, JmixMenuItem item, String text) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationAdds a listener to handle click events for the user menu item.com.vaadin.flow.component.ComponentgetIcon()Retrieves the icon associated with this user menu item, if one exists.Retrieves the submenu associated with this user menu item.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 class io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractUserMenuItem
addClickListenerInternal, addPropertyChangeListener, createSubMenu, firePropertyChange, getElement, getEventBus, getId, getItem, getSubPart, hasListener, internalRemoveClickListener, isCheckable, isChecked, isEnabled, isVisible, setCheckable, setChecked, setEnabled, setVisible, toString, updateContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, setVisible
-
Constructor Details
-
Method Details
-
getText
Description copied from interface:TextUserMenuItemReturns the text contained within this user menu item.- Specified by:
getTextin interfaceTextUserMenuItem- Overrides:
getTextin classJmixUserMenu.AbstractTextUserMenuItem- Returns:
- the text of the menu item
-
setText
Description copied from interface:TextUserMenuItemSets the text contained within this user menu item.- Specified by:
setTextin interfaceTextUserMenuItem- Overrides:
setTextin classJmixUserMenu.AbstractTextUserMenuItem- Parameters:
text- the text to be set for the menu item
-
getIcon
@Nullable public com.vaadin.flow.component.Component getIcon()Description copied from interface:TextUserMenuItemRetrieves the icon associated with this user menu item, if one exists.- Specified by:
getIconin interfaceTextUserMenuItem- Overrides:
getIconin classJmixUserMenu.AbstractTextUserMenuItem- Returns:
- the icon component of this menu item, or
nullif no icon is set
-
setIcon
public void setIcon(@Nullable com.vaadin.flow.component.Component icon) Description copied from interface:TextUserMenuItemSets the icon for this user menu item.- Specified by:
setIconin interfaceTextUserMenuItem- Overrides:
setIconin classJmixUserMenu.AbstractTextUserMenuItem- Parameters:
icon- the icon to set for this menu item; can benullto remove the icon
-
getSubMenu
Description copied from interface:UserMenuItem.HasSubMenuRetrieves the submenu associated with this user menu item. A submenu is a container for additional menu items, providing hierarchical structuring of user menu options.- Specified by:
getSubMenuin interfaceUserMenuItem.HasSubMenu- Overrides:
getSubMenuin classJmixUserMenu.AbstractUserMenuItem- Returns:
- the submenu associated with this user menu item
-
addClickListener
public com.vaadin.flow.shared.Registration addClickListener(Consumer<UserMenuItem.HasClickListener.ClickEvent<TextUserMenuItem>> listener) Description copied from interface:UserMenuItem.HasClickListenerAdds a listener to handle click events for the user menu item. When the item is clicked, the providedConsumerprocesses the associatedUserMenuItem.HasClickListener.ClickEvent.- Specified by:
addClickListenerin interfaceUserMenuItem.HasClickListener<TextUserMenuItem>- Parameters:
listener- theConsumerto handle theUserMenuItem.HasClickListener.ClickEventtriggered by a click on the item- Returns:
- a
Registrationobject that can be used to remove the added listener
-