Package io.jmix.flowui.component.main
Class JmixListMenu.ViewMenuItem
java.lang.Object
io.jmix.flowui.kit.component.main.ListMenu.MenuItem
io.jmix.flowui.component.main.JmixListMenu.ViewMenuItem
- Enclosing class:
- JmixListMenu
Describes menu item that should navigate to the view.
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.vaadin.flow.router.QueryParameters
protected com.vaadin.flow.router.RouteParameters
Fields inherited from class io.jmix.flowui.kit.component.main.ListMenu.MenuItem
classNames, clickHandler, description, icon, id, menuComponent, propertyChangeSupport, shortcutCombination, title
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ListMenu.MenuItem
static JmixListMenu.ViewMenuItem
Creates menu item that should navigate to the view with provided ID.com.vaadin.flow.router.QueryParameters
com.vaadin.flow.router.RouteParameters
withClassNames
(List<String> classNames) Sets class names that should be added to the menu item.withControllerClass
(Class<? extends View<?>> controllerClass) Sets view class that should be shown when the user clicks on the menu item.withDescription
(String description) Sets menu item description that should be shown when the user moves cursor on item.withIcon
(com.vaadin.flow.component.icon.VaadinIcon icon) Sets icon that should be displayed to the left of theListMenu.MenuItem.getTitle()
.withQueryParameters
(List<MenuItem.MenuItemParameter> queryParameters) withRouteParameters
(List<MenuItem.MenuItemParameter> routeParameters) withShortcutCombination
(KeyCombination shortcutCombination) Sets displayed menu item text.Methods inherited from class io.jmix.flowui.kit.component.main.ListMenu.MenuItem
addClassNames, addPropertyChangeListener, createMenuBar, equals, getClassNames, getClickHandler, getDescription, getIcon, getId, getMenuComponent, getShortcutCombination, getTitle, hashCode, isAttachedToMenu, isMenu, isSeparator, removePropertyChangeListener, setMenuComponent, toString, withClickHandler
-
Field Details
-
controllerClass
-
queryParameters
protected com.vaadin.flow.router.QueryParameters queryParameters -
routeParameters
protected com.vaadin.flow.router.RouteParameters routeParameters
-
-
Constructor Details
-
ViewMenuItem
-
-
Method Details
-
create
Creates menu item that should navigate to the view with provided ID.- Parameters:
viewId
- view ID- Returns:
- menu item
-
create
-
withTitle
Description copied from class:ListMenu.MenuItem
Sets displayed menu item text.- Overrides:
withTitle
in classListMenu.MenuItem
- Parameters:
title
- displayed text- Returns:
- current menu instance
-
withDescription
Description copied from class:ListMenu.MenuItem
Sets menu item description that should be shown when the user moves cursor on item.- Overrides:
withDescription
in classListMenu.MenuItem
- Parameters:
description
- description to set- Returns:
- current menu instance
-
withIcon
Description copied from class:ListMenu.MenuItem
Sets icon that should be displayed to the left of theListMenu.MenuItem.getTitle()
.- Overrides:
withIcon
in classListMenu.MenuItem
- Parameters:
icon
- icon to set- Returns:
- current menu instance
-
withClassNames
Description copied from class:ListMenu.MenuItem
Sets class names that should be added to the menu item.- Overrides:
withClassNames
in classListMenu.MenuItem
- Parameters:
classNames
- class names to add- Returns:
- current menu instance
-
withShortcutCombination
public JmixListMenu.ViewMenuItem withShortcutCombination(@Nullable KeyCombination shortcutCombination) - Overrides:
withShortcutCombination
in classListMenu.MenuItem
-
getQueryParameters
@Nullable public com.vaadin.flow.router.QueryParameters getQueryParameters() -
withQueryParameters
public JmixListMenu.ViewMenuItem withQueryParameters(List<MenuItem.MenuItemParameter> queryParameters) -
getRouteParameters
@Nullable public com.vaadin.flow.router.RouteParameters getRouteParameters() -
withRouteParameters
public JmixListMenu.ViewMenuItem withRouteParameters(List<MenuItem.MenuItemParameter> routeParameters) -
getControllerClass
- Returns:
- view class or
null
if not set
-
withControllerClass
public JmixListMenu.ViewMenuItem withControllerClass(@Nullable Class<? extends View<?>> controllerClass) Sets view class that should be shown when the user clicks on the menu item. If not set,ListMenu.MenuItem.getId()
will be used as view id to navigate.- Parameters:
controllerClass
- view class to set- Returns:
- current menu instance
-