Class NavSideMenu


  • public class NavSideMenu
    extends BsComponent
    Represents the navside menu component used in document page.

    A sample configuration would be like that:

     
     <custom>
       <reflowSkin>
         <pages>
           <document type="doc">
              <menu name="Documentation" selectFirstOnExpand="true">
                  <item name="Get Started" href="get-started.html" />
                  <item name="Layouts">
                      <item name="Overview" href="layouts.html" />
                      <item name="Body" href="body.html" />
                  </item>
                  <item name="Migration" href="migration.html" />
              </menu>
           </document>
         </pages>
       </reflowSkin>
     </custom>
     
    Since:
    2.0
    Author:
    Christophe Friederich
    • Constructor Detail

      • NavSideMenu

        public NavSideMenu​(@Nonnull
                           ISkinConfig config)
        Default constructor.
        Parameters:
        config - a config (can not be null).
    • Method Detail

      • getName

        @Nullable
        public String getName()
        Gets the name of menu displayed on top of navside menu.
        Returns:
        Returns a String representing the name of menu.
      • withName

        protected NavSideMenu withName​(String name)
        Sets the name of menu displayed on top of navside menu.
        Parameters:
        name - the name to use.
        Returns:
        Returns the fluent instance.
      • isHasItems

        public boolean isHasItems()
        Gets the indicating whether menu contains a least one menu item.
        Returns:
        Returns true whether menu contains a least one menu item, otherwise returns false.
      • isSelectFirstOnExpand

        public boolean isSelectFirstOnExpand()
        Gets the indicating whether the first sub menu item should be selected when a dropdown menu item is selected and should expand.
        Returns:
        Returns true whether the first sub menu item should be selected when a dropdown menu item is selected and expanded, otherwise returns false.
      • withSelectFirstOnSelect

        protected NavSideMenu withSelectFirstOnSelect​(boolean selectFirstOnExpand)
        Sets the indicating whether the first sub menu item should be selected when a dropdown menu item is selected and should expand.
        Parameters:
        selectFirstOnExpand - a value to use.
        Returns:
        Returns the fluent instance.