Package io.jmix.flowui.menu.provider
Interface MenuItemProvider<T extends MenuItem>
- Type Parameters:
T
- menu item type
- All Known Implementing Classes:
MenuConfigHorizontalMenuItemProvider
,MenuConfigListMenuItemProvider
,MenuConfigMenuItemProvider
public interface MenuItemProvider<T extends MenuItem>
Represents menu item source which can be bound to a menu
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Menu item collection change event. -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener for an event of menu item collection change.void
Adds a transform function which will be applied to menu items after load.void
load()
Loads menu items.void
Removes menu item transform function
-
Method Details
-
load
void load()Loads menu items. -
addCollectionChangedListener
Subscription addCollectionChangedListener(Consumer<MenuItemProvider.CollectionChangeEvent<T>> listener) Adds a listener for an event of menu item collection change.- Parameters:
listener
- a listener to add- Returns:
- subscription for the listener
-
getMenuItems
- Returns:
- loaded menu items.
-
addMenuItemsTransformer
Adds a transform function which will be applied to menu items after load. It can be used to add some customizations to loaded items (for example, expand or collapse specific items).- Parameters:
itemsTransformer
- a transform function to add
-
removeMenuItemsTransformer
Removes menu item transform function- Parameters:
transformer
- transform function to remove- See Also:
-