Class UserMenu.ViewUserMenuItemImpl
java.lang.Object
io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractUserMenuItem
io.jmix.flowui.kit.component.usermenu.JmixUserMenu.AbstractTextUserMenuItem
io.jmix.flowui.component.usermenu.UserMenu.ViewUserMenuItemImpl
- All Implemented Interfaces:
com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.shared.HasThemeVariant<UserMenuItemVariant>,ViewUserMenuItem,HasSubParts,JmixUserMenu.HasMenuItem,UserMenuItem,Serializable
- Enclosing class:
- UserMenu
protected static class UserMenu.ViewUserMenuItemImpl
extends JmixUserMenu.AbstractTextUserMenuItem
implements ViewUserMenuItem
- See Also:
-
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
FieldsModifier and TypeFieldDescriptionprotected DialogWindowsprotected OpenModeprotected Stringprotected ViewNavigatorsFields 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.UserMenuItem
PROP_CHECKABLE, PROP_CHECKED, PROP_ENABLED, PROP_VISIBLEFields inherited from interface io.jmix.flowui.component.usermenu.ViewUserMenuItem
PROP_ICON, PROP_OPEN_MODE, PROP_TEXT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedViewUserMenuItemImpl(String id, JmixUserMenu<?> userMenu, JmixMenuItem item, String text, ViewNavigators viewNavigators, DialogWindows dialogWindows) ViewUserMenuItemImpl(String id, JmixUserMenu<?> userMenu, JmixMenuItem item, String text, Class<? extends View<?>> viewClass, ViewNavigators viewNavigators, DialogWindows dialogWindows) ViewUserMenuItemImpl(String id, JmixUserMenu<?> userMenu, JmixMenuItem item, String text, String viewId, ViewNavigators viewNavigators, DialogWindows dialogWindows) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetIcon()Retrieves the icon associated with this user menu item, if one exists.Returns the view open mode.getText()Returns the text contained within this user menu item.Returns the view class if it was set.Returns the view id if it was set.protected voidinitItem()protected voidnavigate()protected voidprotected voidopenView(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem> event) voidsetIcon(com.vaadin.flow.component.Component icon) Sets the icon for this user menu item.voidsetOpenMode(OpenMode openMode) Sets the view open mode.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, getSubMenu, 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
-
Field Details
-
viewId
-
viewClass
-
openMode
-
dialogWindows
-
-
Constructor Details
-
Method Details
-
initItem
protected void initItem() -
openView
protected void openView(com.vaadin.flow.component.ClickEvent<com.vaadin.flow.component.contextmenu.MenuItem> event) -
openDialog
protected void openDialog() -
getText
Description copied from interface:ViewUserMenuItemReturns the text contained within this user menu item.- Specified by:
getTextin interfaceViewUserMenuItem- Overrides:
getTextin classJmixUserMenu.AbstractTextUserMenuItem- Returns:
- the text of the menu item
-
setText
Description copied from interface:ViewUserMenuItemSets the text contained within this user menu item.- Specified by:
setTextin interfaceViewUserMenuItem- 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:ViewUserMenuItemRetrieves the icon associated with this user menu item, if one exists.- Specified by:
getIconin interfaceViewUserMenuItem- 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:ViewUserMenuItemSets the icon for this user menu item.- Specified by:
setIconin interfaceViewUserMenuItem- Overrides:
setIconin classJmixUserMenu.AbstractTextUserMenuItem- Parameters:
icon- the icon to set for this menu item; can benullto remove the icon
-
getOpenMode
Description copied from interface:ViewUserMenuItemReturns the view open mode.- Specified by:
getOpenModein interfaceViewUserMenuItem- Returns:
- the open mode, or
nullif not set
-
setOpenMode
Description copied from interface:ViewUserMenuItemSets the view open mode.- Specified by:
setOpenModein interfaceViewUserMenuItem- Parameters:
openMode- the open mode to set
-
getViewId
Description copied from interface:ViewUserMenuItemReturns the view id if it was set.- Specified by:
getViewIdin interfaceViewUserMenuItem- Returns:
- the view id if it was set, otherwise returns
null
-
getViewClass
Description copied from interface:ViewUserMenuItemReturns the view class if it was set.- Specified by:
getViewClassin interfaceViewUserMenuItem- Returns:
- the view class, otherwise returns
null.
-