Class MenuItem

java.lang.Object
io.jmix.ui.menu.MenuItem

public class MenuItem extends Object
Main menu item descriptor
  • Field Details

  • Constructor Details

    • MenuItem

      public MenuItem(@Nullable MenuItem parent, String id)
    • MenuItem

      public MenuItem(String id)
  • Method Details

    • isMenu

      public boolean isMenu()
    • setMenu

      public void setMenu(boolean isMenu)
    • getParent

      @Nullable public MenuItem getParent()
      Parent item. Null if this is root item.
    • getChildren

      public List<MenuItem> getChildren()
      Children items
    • getId

      public String getId()
      Menu item ID as defined in menu-config.xml
    • getDescriptor

      public org.dom4j.Element getDescriptor()
    • setDescriptor

      public void setDescriptor(org.dom4j.Element descriptor)
    • getCaption

      public String getCaption()
      Returns:
      a raw string from menu XML config, can be a reference to localization message, e.g. mainMsg://menuitem.caption
      See Also:
    • setCaption

      public void setCaption(String caption)
      Sets the given caption to menu item.
      Parameters:
      caption - menu item caption
      See Also:
    • getDescription

      public String getDescription()
      Returns:
      a raw string from menu XML config, can be a reference to localization message, e.g. mainMsg://menuitem.description
    • setDescription

      public void setDescription(String description)
      Sets the given description to menu item.
      Parameters:
      description - menu item description
    • getStylename

      public String getStylename()
    • setStylename

      public void setStylename(String stylename)
    • getShortcut

      public KeyCombination getShortcut()
    • setShortcut

      public void setShortcut(@Nullable KeyCombination shortcut)
    • isSeparator

      public boolean isSeparator()
    • setSeparator

      public void setSeparator(boolean separator)
    • getIcon

      @Nullable public String getIcon()
    • setIcon

      public void setIcon(@Nullable String icon)
    • isExpanded

      public boolean isExpanded()
    • setExpanded

      public void setExpanded(boolean expanded)
    • getScreen

      public String getScreen()
    • setScreen

      public void setScreen(String screen)
    • getRunnableClass

      public String getRunnableClass()
    • setRunnableClass

      public void setRunnableClass(String runnableClass)
    • getBean

      public String getBean()
    • setBean

      public void setBean(String bean)
    • getBeanMethod

      public String getBeanMethod()
    • setBeanMethod

      public void setBeanMethod(String beanMethod)
    • getProperties

      public List<MenuItem.MenuItemProperty> getProperties()
    • setProperties

      public void setProperties(List<MenuItem.MenuItemProperty> properties)