Class AppMenuImpl.MenuItemImpl
java.lang.Object
io.jmix.ui.component.mainwindow.impl.AppMenuImpl.MenuItemImpl
- All Implemented Interfaces:
AppMenu.MenuItem
- Enclosing class:
- AppMenuImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Consumer<AppMenu.MenuItem>protected com.vaadin.ui.MenuBar.MenuItemprotected Stringprotected Stringprotected AppMenuImplprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildItem(AppMenu.MenuItem menuItem) Add menu item to the end of children list.voidaddChildItem(AppMenu.MenuItem menuItem, int index) Add menu item to specified position in the children list.com.vaadin.ui.MenuBar.MenuItemgetIcon()getId()getMenu()booleanbooleanbooleanprotected voidmenuSelected(com.vaadin.ui.MenuBar.MenuItem event) voidremoveChildItem(int index) Remove menu item from the children list by index.voidremoveChildItem(AppMenu.MenuItem menuItem) Remove menu item from the children list.voidsetCaption(String caption) Set item caption.voidsetCommand(Consumer<AppMenu.MenuItem> command) Set item commandvoidsetDelegateItem(com.vaadin.ui.MenuBar.MenuItem delegateItem) voidsetDescription(String description) Set description.voidSet icon.protected voidsetSeparator(boolean separator) voidsetStyleName(String styleName) Sets one or more user-defined style names of the component, replacing any previous user-defined styles.voidsetVisible(boolean visible) Show or hide item.
-
Field Details
-
id
-
delegateItem
protected com.vaadin.ui.MenuBar.MenuItem delegateItem -
command
-
icon
-
separator
protected boolean separator
-
Constructor Details
-
MenuItemImpl
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceAppMenu.MenuItem- Returns:
- id
-
getMenu
- Specified by:
getMenuin interfaceAppMenu.MenuItem- Returns:
- owner
-
getDelegateItem
public com.vaadin.ui.MenuBar.MenuItem getDelegateItem() -
setDelegateItem
public void setDelegateItem(com.vaadin.ui.MenuBar.MenuItem delegateItem) -
getCaption
- Specified by:
getCaptionin interfaceAppMenu.MenuItem- Returns:
- caption
-
setCaption
Description copied from interface:AppMenu.MenuItemSet item caption.- Specified by:
setCaptionin interfaceAppMenu.MenuItem- Parameters:
caption- caption
-
getDescription
- Specified by:
getDescriptionin interfaceAppMenu.MenuItem- Returns:
- description
-
setDescription
Description copied from interface:AppMenu.MenuItemSet description.- Specified by:
setDescriptionin interfaceAppMenu.MenuItem- Parameters:
description- description
-
getIcon
- Specified by:
getIconin interfaceAppMenu.MenuItem- Returns:
- icon name
-
setIcon
Description copied from interface:AppMenu.MenuItemSet icon.- Specified by:
setIconin interfaceAppMenu.MenuItem- Parameters:
icon- icon name
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceAppMenu.MenuItem- Returns:
- true if item will be sent to the client side
-
setVisible
public void setVisible(boolean visible) Description copied from interface:AppMenu.MenuItemShow or hide item.- Specified by:
setVisiblein interfaceAppMenu.MenuItem- Parameters:
visible- pass false to hide menu item
-
getStyleName
- Specified by:
getStyleNamein interfaceAppMenu.MenuItem- Returns:
- all user-defined CSS style names of a component. If the item has multiple style names defined, the return string is a space-separated list of style names.
-
setStyleName
Description copied from interface:AppMenu.MenuItemSets one or more user-defined style names of the component, replacing any previous user-defined styles. Multiple styles can be specified as a space-separated list of style names. The style names must be valid CSS class names.- Specified by:
setStyleNamein interfaceAppMenu.MenuItem- Parameters:
styleName- style name string
-
getCommand
- Specified by:
getCommandin interfaceAppMenu.MenuItem- Returns:
- item command
-
setCommand
Description copied from interface:AppMenu.MenuItemSet item command- Specified by:
setCommandin interfaceAppMenu.MenuItem- Parameters:
command- item command
-
addChildItem
Description copied from interface:AppMenu.MenuItemAdd menu item to the end of children list.- Specified by:
addChildItemin interfaceAppMenu.MenuItem- Parameters:
menuItem- menu item
-
addChildItem
Description copied from interface:AppMenu.MenuItemAdd menu item to specified position in the children list.- Specified by:
addChildItemin interfaceAppMenu.MenuItem- Parameters:
menuItem- menu itemindex- target index
-
removeChildItem
Description copied from interface:AppMenu.MenuItemRemove menu item from the children list.- Specified by:
removeChildItemin interfaceAppMenu.MenuItem- Parameters:
menuItem- menu item
-
removeChildItem
public void removeChildItem(int index) Description copied from interface:AppMenu.MenuItemRemove menu item from the children list by index.- Specified by:
removeChildItemin interfaceAppMenu.MenuItem- Parameters:
index- index
-
getChildren
- Specified by:
getChildrenin interfaceAppMenu.MenuItem- Returns:
- child items
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildrenin interfaceAppMenu.MenuItem- Returns:
- true if the menu item has child items
-
isSeparator
public boolean isSeparator()- Specified by:
isSeparatorin interfaceAppMenu.MenuItem- Returns:
- true if item is separator
-
setSeparator
protected void setSeparator(boolean separator)
-