Package io.jmix.flowui.component.main
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDescribes menu item that should navigate to the view.Nested classes/interfaces inherited from class io.jmix.flowui.kit.component.main.ListMenu
ListMenu.ListMenuBarOpenedChangeEvent, ListMenu.MenuBarItem, ListMenu.MenuItem, ListMenu.MenuSeparatorItem -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected Subscriptionprotected MenuItemProvider<ListMenu.MenuItem> protected static final Stringprotected static final Stringprotected UiComponentsprotected ViewRegistryFields inherited from class io.jmix.flowui.kit.component.main.ListMenu
JMIX_LIST_MENU_CLASS_NAME, JMIX_MENU_ITEM_CLASS_NAME, JMIX_MENUBAR_ITEM_CLASS_NAME, JMIX_MENUBAR_SUMMARY_ICON_CONTAINER_CLASS_NAME, LINK_TEXT_CLASS_NAME, MENUBAR_LIST_CLASS_NAME, MENUBAR_SUMMARY_CLASS_NAME, menuItemPropertyChangeListener, PREFIX_COMPONENT_CLASS_NAME, registrations, rootMenuItems, SUFFIX_COMPONENT_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMenuItemClickListener(com.vaadin.flow.component.Component menuItemComponent, ListMenu.MenuItem menuItem) voidafterNavigation(com.vaadin.flow.router.AfterNavigationEvent event) voidprotected voidprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.button.Buttonprotected com.vaadin.flow.component.ComponentcreateMenuItemComponent(ListMenu.MenuItem menuItem) protected com.vaadin.flow.router.RouterLinkprotected com.vaadin.flow.router.RouterLinkprotected voidexpandActiveMenuItemParents(com.vaadin.flow.router.AfterNavigationEvent event) protected voidexpandActiveMenuItemParents(ListMenu.MenuItem menuItem, List<ListMenu.MenuBarItem> parentMenuItems, com.vaadin.flow.router.AfterNavigationEvent event) getControllerClass(JmixListMenu.ViewMenuItem menuItem) @Nullable MenuItemProvider<ListMenu.MenuItem> protected booleanisSupportedView(Class<?> targetView) voidLoads menu items fromMenuConfig.protected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetMenuItemProvider(@Nullable MenuItemProvider<ListMenu.MenuItem> itemProvider) Sets menu item providerprotected booleanshouldHighlightMenuItem(ListMenu.MenuItem menuItem, com.vaadin.flow.router.AfterNavigationEvent event) Methods inherited from class io.jmix.flowui.kit.component.main.ListMenu
addChildren, addChildren, addMenuItem, addMenuItem, addMenuItemClickShortcutCombination, addMenuItemText, addMenuOpenedChangeListener, attachMenuItemRecursively, checkItemIdDuplicate, createMenuBarComponent, createMenuItemContentComponent, createMenuItemText, createMenuRecursively, detachMenuItemRecursively, getMenuBarComponent, getMenuBarContent, getMenuBarContent, getMenuItem, getMenuItemComponent, getMenuItems, getTitle, initContent, initMenuItemComponent, onMenuItemPropertyChange, registerMenuItem, removeAllMenuItems, removeMenuItem, removeMenuItem, setPrefixComponent, setSuffixComponent, unregisterMenuItemRecursively, updateMenuItemComponentClassNamesMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
-
Field Details
-
JMIX_MENU_ITEM_VIEW_CLASS_NAME
- See Also:
-
JMIX_MENU_ITEM_BEAN_CLASS_NAME
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
viewRegistry
-
itemProvider
-
itemCollectionChangedSubscription
-
-
Constructor Details
-
JmixListMenu
public JmixListMenu()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.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 fromMenuConfig. -
createMenuItemComponent
- Overrides:
createMenuItemComponentin classListMenu
-
createViewMenuItemComponent
protected com.vaadin.flow.router.RouterLink createViewMenuItemComponent(JmixListMenu.ViewMenuItem menuItem) -
getMenuItemComponentClassNames
- Overrides:
getMenuItemComponentClassNamesin classListMenu
-
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:
addMenuItemClickListenerin classListMenu
-
getControllerClass
-
isSupportedView
-
getMenuItemProvider
- Specified by:
getMenuItemProviderin interfaceHasMenuItemProvider<ListMenu.MenuItem>- Returns:
- menu item provider
-