Class HorizontalMenu.ViewMenuItem
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem<T>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem<com.vaadin.flow.router.RouterLink>
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.MenuItem
io.jmix.flowui.component.horizontalmenu.HorizontalMenu.ViewMenuItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.shared.HasPrefix
,com.vaadin.flow.component.shared.HasSuffix
,com.vaadin.flow.component.shared.HasTooltip
,MenuItem
,Serializable
- Enclosing class:
- HorizontalMenu
Represents an item which navigates to a view on click
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.flow.router.RouteParameters
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.MenuItem
clickHandlerRegistration, MENU_ITEM_CLASS_NAME, shortcutCombination, shortcutRegistration
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
CONTENT_ITEM_CLASS_NAME, PREFIX_COMPONENT_CLASS_NAME, prefixComponent, PREFIXED_ATTRIBUTE_NAME, SUFFIX_COMPONENT_CLASS_NAME, suffixComponent, SUFFIXED_ATTRIBUTE_NAME, TEXT_COMPONENT_CLASS_NAME, textComponent, tooltip
Fields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.router.RouteParameters
com.vaadin.flow.router.QueryParameters
com.vaadin.flow.shared.Registration
setClickHandler
(Consumer<HorizontalMenu.MenuItem> clickHandler) Sets click handler of the item.void
setRouteParameters
(List<MenuItem.MenuItemParameter> routeParameters) Sets route parameters of the view to navigate.void
setUrlQueryParameters
(List<MenuItem.MenuItemParameter> queryParameters) Sets query parameters of the view to navigate.void
setViewClass
(Class<? extends View<?>> viewClass) Sets view class that should be shown when the user clicks on the menu item.Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.MenuItem
getShortcutCombination, initContent, onShortcutEvent, setShortcutCombination, updateShortcutRegistration
Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
getPrefixComponent, getSuffixComponent, getTitle, getTooltip, getTooltipInternal, setPrefixComponent, setPrefixComponentInternal, setPrefixedAttribute, setSuffixComponent, setSuffixComponentInternal, setSuffixedAttribute, setTextComponentInternal, setTitle, setTooltipText, updateContent
Methods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItem
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
viewClass
-
routeParameters
protected com.vaadin.flow.router.RouteParameters routeParameters
-
-
Constructor Details
-
ViewMenuItem
public ViewMenuItem() -
ViewMenuItem
-
-
Method Details
-
getUrlQueryParameters
@Nullable public com.vaadin.flow.router.QueryParameters getUrlQueryParameters()- Returns:
- query parameters of the view to navigate
-
setUrlQueryParameters
Sets query parameters of the view to navigate.- Parameters:
queryParameters
- query parameters
-
getRouteParameters
@Nullable public com.vaadin.flow.router.RouteParameters getRouteParameters()- Returns:
- route parameters of the view to navigate
-
setRouteParameters
Sets route parameters of the view to navigate.- Parameters:
routeParameters
- route parameters
-
getViewClass
- Returns:
- view class or null if not set
-
setViewClass
Sets view class that should be shown when the user clicks on the menu item.- Parameters:
viewClass
- view class to set
-
setClickHandler
public com.vaadin.flow.shared.Registration setClickHandler(@Nullable Consumer<HorizontalMenu.MenuItem> clickHandler) Description copied from class:HorizontalMenu.MenuItem
Sets click handler of the item.- Overrides:
setClickHandler
in classHorizontalMenu.MenuItem
- Parameters:
clickHandler
- menu item click handler- Returns:
- click handler registration
-