Class FlyoutRailNavRenderer

java.lang.Object
org.vaadin.addons.joelpop.appnavlayout.ui.layout.appnav.FlyoutRailNavRenderer
All Implemented Interfaces:
NavRenderer

@CssImport("./flyout-rail-nav.css") public class FlyoutRailNavRenderer extends Object implements NavRenderer
An alternative NavRenderer for NavType.RAIL — every rail item that represents a nav group gets a right-pointing chevron instead of navigating to a representative child; tapping it pops up a flyout listing that group's own children, recursively, to whatever depth the route hierarchy actually goes. Never touches NavSlots.headerNav() — unlike the default SideRailNavRenderer, this renderer never needs the shared drill-down bar, since every level of the tree is reachable directly from the rail itself.
  • Constructor Details

    • FlyoutRailNavRenderer

      public FlyoutRailNavRenderer()
  • Method Details

    • railWidth

      public String railWidth()
      Description copied from interface: NavRenderer
      The rail's own width, as a CSS length — consulted only when NavRenderer.navType() is NavType.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.
      Specified by:
      railWidth in interface NavRenderer
    • render

      public void render(NavRenderContext context)
      Description copied from interface: NavRenderer
      Builds or updates this renderer's content for the current nav state. Called once when this scenario becomes active, again on every completed navigation, and again whenever nav configuration changes (grouper swap, path matcher change). The implementation decides which slot(s) in context.slots() to populate and how — including any overflow or drill-down scaffolding it needs (a "More…" popover, a chevron, a swipeable container, etc).
      Specified by:
      render in interface NavRenderer