Interface NavRenderer
- All Known Implementing Classes:
ExpandingTouchNavRenderer, FlyoutRailNavRenderer, HeaderTabsNavRenderer, ScrollingTouchNavRenderer, SideNavDrawerNavRenderer, SideRailNavRenderer, TouchBarNavRenderer
public interface NavRenderer
Builds and updates the nav-item content for one of
AppNavLayout's five
device/orientation scenarios (desktop, tablet portrait, tablet landscape, phone portrait,
phone landscape), placing it into whichever of AppNavLayout's named locations
(see NavSlots) is appropriate. Register an implementation via
AppNavLayout.setDesktopNavRenderer(Supplier), AppNavLayout.setTabletPortraitNavRenderer(Supplier),
AppNavLayout.setTabletLandscapeNavRenderer(Supplier) (or the AppNavLayout.setTabletNavRenderer(Supplier)
convenience setter), AppNavLayout.setPhonePortraitNavRenderer(Supplier), or
AppNavLayout.setPhoneLandscapeNavRenderer(Supplier) (or AppNavLayout.setPhoneNavRenderer(Supplier))
to replace the default for that scenario.
Deliberately decoupled from nav organization: a renderer receives an already-configured
NavGrouper and never influences or
queries how the tree is grouped.
-
Method Summary
Modifier and TypeMethodDescriptionnavType()The chrome this renderer requires — determines whichNavStrategygets built for whichever scenario this renderer is configured for.default StringThe rail's own width, as a CSS length — consulted only whennavType()isNavType.RAIL.voidrender(NavRenderContext context) Builds or updates this renderer's content for the current nav state.
-
Method Details
-
railWidth
The rail's own width, as a CSS length — consulted only whennavType()isNavType.RAIL. Default matches the built-in rail renderers' own icon-and-label-only content. Override when a renderer's items need more (or less) horizontal room than that — e.g.FlyoutRailNavRenderer's own trailing chevron box.