Class JmixListMenu

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.UnorderedList>
io.jmix.flowui.kit.component.main.ListMenu
io.jmix.flowui.component.main.JmixListMenu
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<ListMenuVariant>, com.vaadin.flow.router.AfterNavigationObserver, com.vaadin.flow.router.internal.AfterNavigationHandler, HasMenuItemProvider<ListMenu.MenuItem>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
TabbedModeListMenu

public class JmixListMenu extends ListMenu implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean, HasMenuItemProvider<ListMenu.MenuItem>, com.vaadin.flow.router.AfterNavigationObserver
See Also:
  • Field Details

    • JMIX_MENU_ITEM_VIEW_CLASS_NAME

      protected static final String JMIX_MENU_ITEM_VIEW_CLASS_NAME
      See Also:
    • JMIX_MENU_ITEM_BEAN_CLASS_NAME

      protected static final String JMIX_MENU_ITEM_BEAN_CLASS_NAME
      See Also:
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • uiComponents

      protected UiComponents uiComponents
    • viewRegistry

      protected ViewRegistry viewRegistry
    • itemProvider

      protected MenuItemProvider<ListMenu.MenuItem> itemProvider
    • itemCollectionChangedSubscription

      protected Subscription itemCollectionChangedSubscription
  • Constructor Details

    • JmixListMenu

      public JmixListMenu()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • autowireDependencies

      protected void autowireDependencies()
    • createRouterLink

      protected com.vaadin.flow.router.RouterLink createRouterLink()
    • createButton

      protected com.vaadin.flow.component.button.Button createButton()
    • loadMenuConfig

      public void loadMenuConfig()
      Loads menu items from MenuConfig.
    • createMenuItemComponent

      protected com.vaadin.flow.component.Component createMenuItemComponent(ListMenu.MenuItem menuItem)
      Overrides:
      createMenuItemComponent in class ListMenu
    • createViewMenuItemComponent

      protected com.vaadin.flow.router.RouterLink createViewMenuItemComponent(JmixListMenu.ViewMenuItem menuItem)
    • getMenuItemComponentClassNames

      protected List<String> getMenuItemComponentClassNames(ListMenu.MenuItem menuItem)
      Overrides:
      getMenuItemComponentClassNames in class ListMenu
    • createBeanMenuItemComponent

      protected com.vaadin.flow.component.button.Button createBeanMenuItemComponent(JmixListMenu.BeanMenuItem menuItem)
    • addMenuItemClickListener

      protected void addMenuItemClickListener(com.vaadin.flow.component.Component menuItemComponent, ListMenu.MenuItem menuItem)
      Overrides:
      addMenuItemClickListener in class ListMenu
    • getControllerClass

      protected Class<? extends View<?>> getControllerClass(JmixListMenu.ViewMenuItem menuItem)
    • isSupportedView

      protected boolean isSupportedView(Class<?> targetView)
    • setMenuItemProvider

      public void setMenuItemProvider(@Nullable MenuItemProvider<ListMenu.MenuItem> itemProvider)
      Description copied from interface: HasMenuItemProvider
      Sets menu item provider
      Specified by:
      setMenuItemProvider in interface HasMenuItemProvider<ListMenu.MenuItem>
      Parameters:
      itemProvider - menu item provider to set
    • onMenuItemCollectionChanged

      protected void onMenuItemCollectionChanged(MenuItemProvider.CollectionChangeEvent<ListMenu.MenuItem> e)
    • getMenuItemProvider

      public @Nullable MenuItemProvider<ListMenu.MenuItem> getMenuItemProvider()
      Specified by:
      getMenuItemProvider in interface HasMenuItemProvider<ListMenu.MenuItem>
      Returns:
      menu item provider
    • afterNavigation

      public void afterNavigation(com.vaadin.flow.router.AfterNavigationEvent event)
      Specified by:
      afterNavigation in interface com.vaadin.flow.router.internal.AfterNavigationHandler
    • expandActiveMenuItemParents

      protected void expandActiveMenuItemParents(com.vaadin.flow.router.AfterNavigationEvent event)
    • expandActiveMenuItemParents

      protected void expandActiveMenuItemParents(ListMenu.MenuItem menuItem, List<ListMenu.MenuBarItem> parentMenuItems, com.vaadin.flow.router.AfterNavigationEvent event)
    • shouldHighlightMenuItem

      protected boolean shouldHighlightMenuItem(ListMenu.MenuItem menuItem, com.vaadin.flow.router.AfterNavigationEvent event)