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
FieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.router.RouteParametersFields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.MenuItem
clickHandlerRegistration, MENU_ITEM_CLASS_NAME, shortcutCombination, shortcutRegistrationFields 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, tooltipFields inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
menu, menuItemWrapper, parentMenuItem -
Constructor Summary
ConstructorsConstructorDescriptionViewMenuItem(String id, Class<? extends View<?>> viewClass) ViewMenuItem(String id, Class<? extends View<?>> viewClass, List<MenuItem.MenuItemParameter> routeParameters) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.router.RouteParameterscom.vaadin.flow.router.QueryParameterscom.vaadin.flow.shared.RegistrationsetClickHandler(Consumer<HorizontalMenu.MenuItem> clickHandler) Sets click handler of the item.voidsetRouteParameters(List<MenuItem.MenuItemParameter> routeParameters) Sets route parameters of the view to navigate.voidsetUrlQueryParameters(List<MenuItem.MenuItemParameter> queryParameters) Sets query parameters of the view to navigate.voidsetViewClass(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, updateShortcutRegistrationMethods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractContentMenuItem
getPrefixComponent, getSuffixComponent, getTitle, getTooltip, getTooltipInternal, setPrefixComponent, setPrefixComponentInternal, setPrefixedAttribute, setSuffixComponent, setSuffixComponentInternal, setSuffixedAttribute, setTextComponentInternal, setTitle, setTooltipText, updateContentMethods inherited from class io.jmix.flowui.component.horizontalmenu.HorizontalMenu.AbstractMenuItem
getMenu, getMenuItemWrapper, getParentMenuItem, isAttachedToMenu, isMenu, isSeparator, setMenu, setMenuItemWrapper, setParentMenuItemMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods 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
-
ViewMenuItem
public ViewMenuItem(String id, Class<? extends View<?>> viewClass, List<MenuItem.MenuItemParameter> routeParameters)
-
-
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.MenuItemSets click handler of the item.- Overrides:
setClickHandlerin classHorizontalMenu.MenuItem- Parameters:
clickHandler- menu item click handler- Returns:
- click handler registration
-