Class NavNode
java.lang.Object
org.vaadin.addons.joelpop.appnavlayout.ui.nav.NavNode
A node in the navigation tree — either a group (non-navigable section) or a
leaf (navigable view). The presence of
menuEntry() distinguishes leaves
from groups.
Group nodes carry an explicit title and optional icon supplier. Leaf nodes derive
their title from RouteNavUtils.leafTitle(MenuEntry) and their icon from
@Menu(icon="collection:name") if present. External icon generators
take priority over the menu-derived icon.
-
Method Summary
Modifier and TypeMethodDescriptionOptional<com.vaadin.flow.component.icon.Icon> Creates and returns a fresh display icon for this node, or empty if none is configured.booleaninthashCode()Optional<com.vaadin.flow.server.menu.MenuEntry> The menu entry for leaf nodes; empty for group nodes.static NavNodeof(com.vaadin.flow.server.menu.MenuEntry entry) Leaf node with no parent (top-level view).static NavNodeof(com.vaadin.flow.server.menu.MenuEntry entry, Supplier<com.vaadin.flow.component.icon.Icon> iconOverride) Leaf node with no parent; usesiconOverrideif non-null, else derives icon from@Menu.static NavNodeof(com.vaadin.flow.server.menu.MenuEntry entry, Supplier<com.vaadin.flow.component.icon.Icon> iconOverride, NavNode parent) Leaf node nested underparent; usesiconOverrideif non-null, else derives icon from@Menu.static NavNodeLeaf node nested underparent.static NavNodeGroup node with no parent (top-level section).static NavNodeGroup node nested underparent.parent()Parent node, or empty for top-level nodes.title()Display title for this node.
-
Method Details
-
of
-
title
Display title for this node. -
createIcon
Creates and returns a fresh display icon for this node, or empty if none is configured. Each call creates a newIconinstance — do not cache the result. -
parent
-
equals
-
hashCode
-