Package io.jmix.flowui.component.main
Class JmixListMenu.ScreenMenuItem
java.lang.Object
io.jmix.flowui.kit.component.main.ListMenu.MenuItem
io.jmix.flowui.component.main.JmixListMenu.ScreenMenuItem
- Enclosing class:
- JmixListMenu
Describes menu item that should navigate to the screen.
-
Field Summary
FieldsFields inherited from class io.jmix.flowui.kit.component.main.ListMenu.MenuItem
classNames, clickHandler, description, icon, id, menuComponent, title -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ListMenu.MenuItemstatic JmixListMenu.ScreenMenuItemCreates menu item that should navigate to the screen with provided ID.withClassNames(List<String> classNames) Sets class names that should be added to the menu item.withControllerClass(Class<? extends Screen<?>> controllerClass) Sets screen 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().Sets displayed menu item text.Methods inherited from class io.jmix.flowui.kit.component.main.ListMenu.MenuItem
addClassNames, createMenuBar, equals, getClassNames, getClickHandler, getDescription, getIcon, getId, getMenuComponent, getTitle, hashCode, isAttachedToMenu, isMenu, setMenuComponent, toString, withClickHandler
-
Field Details
-
controllerClass
-
-
Constructor Details
-
ScreenMenuItem
-
-
Method Details
-
create
Creates menu item that should navigate to the screen with provided ID.- Parameters:
screenId- screen ID- Returns:
- menu item
-
create
-
withTitle
Description copied from class:ListMenu.MenuItemSets displayed menu item text.- Overrides:
withTitlein classListMenu.MenuItem- Parameters:
title- displayed text- Returns:
- current menu instance
-
withDescription
Description copied from class:ListMenu.MenuItemSets menu item description that should be shown when the user moves cursor on item.- Overrides:
withDescriptionin classListMenu.MenuItem- Parameters:
description- description to set- Returns:
- current menu instance
-
withIcon
public JmixListMenu.ScreenMenuItem withIcon(@Nullable com.vaadin.flow.component.icon.VaadinIcon icon) Description copied from class:ListMenu.MenuItemSets icon that should be displayed to the left of theListMenu.MenuItem.getTitle().- Overrides:
withIconin classListMenu.MenuItem- Parameters:
icon- icon to set- Returns:
- current menu instance
-
withClassNames
Description copied from class:ListMenu.MenuItemSets class names that should be added to the menu item.- Overrides:
withClassNamesin classListMenu.MenuItem- Parameters:
classNames- class names to add- Returns:
- current menu instance
-
getControllerClass
- Returns:
- screen class or
nullif not set
-
withControllerClass
public JmixListMenu.ScreenMenuItem withControllerClass(@Nullable Class<? extends Screen<?>> controllerClass) Sets screen class that should be shown when the user clicks on the menu item. If not set,ListMenu.MenuItem.getId()will be used as screen id to navigate.- Parameters:
controllerClass- screen class to set- Returns:
- current menu instance
-