public class NavSideMenu extends BsComponent
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>
∂
Constructor and Description |
---|
NavSideMenu(ISkinConfig config)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static List<SideNavMenuItem> |
findAllSideNavMenuItems(ISkinConfig config)
Find all
sidenav menu items declared in all document pages. |
List<SideNavMenuItem> |
getItems() |
String |
getName()
Gets the name of menu displayed on top of navside menu.
|
boolean |
isHasItems()
Gets the indicating whether menu contains a least one menu item.
|
boolean |
isSelectFirstOnExpand()
Gets the indicating whether the first sub menu item should be selected when a dropdown menu item is selected and
should expand.
|
String |
toString() |
protected NavSideMenu |
withItems(List<SideNavMenuItem> items)
Sets the
List of SideNavMenuItem . |
protected NavSideMenu |
withName(String name)
Sets the name of menu displayed on top of navside menu.
|
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.
|
getBackground, getCssClass, getTheme, setBackground, setTheme
addChildren, addCssOptions, getBodyContent, getCssOptions, getHtmlTool, onPreRender, setCssClass
public NavSideMenu(@Nonnull ISkinConfig config)
config
- a config (can not be null
).@Nonnull public static List<SideNavMenuItem> findAllSideNavMenuItems(@Nonnull ISkinConfig config)
sidenav menu items
declared in all document pages.config
- a config (can not be null
).sidenav menu items
declared in all document pages
(returns list can not be null
).@Nullable public String getName()
String
representing the name of menu.protected NavSideMenu withName(String name)
name
- the name to use.public boolean isHasItems()
true
whether menu contains a least one menu item, otherwise returns false
.@Nonnull public List<SideNavMenuItem> getItems()
List
of SideNavMenuItem
containing in <menu> element
.protected NavSideMenu withItems(List<SideNavMenuItem> items)
List
of SideNavMenuItem
.items
- list of items to use.public boolean isSelectFirstOnExpand()
true
whether the first sub menu item should be selected when a dropdown menu item is
selected and expanded, otherwise returns false
.protected NavSideMenu withSelectFirstOnSelect(boolean selectFirstOnExpand)
selectFirstOnExpand
- a value to use.Copyright © 2012–2023 Friederich Christophe. All rights reserved.