Interface ViewUserMenuItem
- All Superinterfaces:
com.vaadin.flow.component.HasElement,HasSubParts,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.shared.HasThemeVariant<UserMenuItemVariant>,Serializable,UserMenuItem
- All Known Implementing Classes:
UserMenu.ViewUserMenuItemImpl
Represents a specific type of
UserMenuItem that is associated with an View.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
UserMenuItem.HasClickListener<ITEM extends UserMenuItem>, UserMenuItem.HasSubMenu -
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 TypeMethodDescription@Nullable com.vaadin.flow.component.ComponentgetIcon()Retrieves the icon associated with this user menu item, if one exists.@Nullable OpenModeReturns the view open mode.getText()Returns the text contained within this user menu item.Returns the view class if it was set.@Nullable StringReturns the view id if it was set.voidsetIcon(@Nullable com.vaadin.flow.component.Component icon) Sets the icon for this user menu item.voidsetOpenMode(@Nullable OpenMode openMode) Sets the view open mode.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, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariantsMethods inherited from interface io.jmix.flowui.kit.component.usermenu.UserMenuItem
addPropertyChangeListener, getId, isCheckable, isChecked, isEnabled, isVisible, setCheckable, setChecked, setEnabled, setVisible
-
Field Details
-
PROP_TEXT
- See Also:
-
PROP_ICON
- See Also:
-
PROP_OPEN_MODE
- 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
-
getOpenMode
@Nullable OpenMode getOpenMode()Returns the view open mode.- Returns:
- the open mode, or
nullif not set
-
setOpenMode
Sets the view open mode.- Parameters:
openMode- the open mode to set
-
getViewId
@Nullable String getViewId()Returns the view id if it was set.- Returns:
- the view id if it was set, otherwise returns
null
-
getViewClass
Returns the view class if it was set.- Returns:
- the view class, otherwise returns
null.
-