Class Navigation

  • All Implemented Interfaces:
    java.lang.Iterable<Navigation.Element>

    public class Navigation
    extends java.lang.Object
    implements java.lang.Iterable<Navigation.Element>
    Provides a generic utility class that can be used to draw a navigation. It specifically does this by providing an iterator over navigation elements. A navigation element reflects a page and can have different Navigation.Element.Types. Note that the same page might be returned 4 times for the different element types. this offers maximal flexibility when drawing the navigation.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Navigation.Element
      Navigation element.
    • Constructor Summary

      Constructors 
      Constructor Description
      Navigation​(Page current, int absParent, PageFilter filter, int depth)
      Creates a new navigation object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<Navigation.Element> iterator()
      Returns an iterator over the navigation elements.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Navigation

        public Navigation​(Page current,
                          int absParent,
                          PageFilter filter,
                          int depth)
        Creates a new navigation object.
        Parameters:
        current - the current page
        absParent - the abs level of the navigation root
        filter - a page filter for filtering the navigation pages
        depth - navigation depth.
    • Method Detail

      • iterator

        public java.util.Iterator<Navigation.Element> iterator()
        Returns an iterator over the navigation elements.
        Specified by:
        iterator in interface java.lang.Iterable<Navigation.Element>
        Returns:
        an iterator.