Class Navigation
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement,Navigation>
org.patternfly.component.navigation.Navigation
- All Implemented Interfaces:
Iterable<NavigationItem>,Attachable,ElementAttributeMethods<HTMLElement,,Navigation> ElementClassListMethods<HTMLElement,,Navigation> ElementConsumerMethods<HTMLElement,,Navigation> ElementContainerMethods<HTMLElement,,Navigation> ElementEventMethods<HTMLElement,,Navigation> ElementIdMethods<HTMLElement,,Navigation> ElementQueryMethods<HTMLElement>,HTMLElementAttributeMethods<HTMLElement,,Navigation> HTMLElementDataMethods<HTMLElement,,Navigation> HTMLElementStyleMethods<HTMLElement,,Navigation> HTMLElementVisibilityMethods<HTMLElement,,Navigation> IsElement<HTMLElement>,TypedBuilder<HTMLElement,,Navigation> Component,HasItems<HTMLElement,Navigation, NavigationItem>
public class Navigation
extends BaseComponent<HTMLElement,Navigation>
implements HasItems<HTMLElement,Navigation,NavigationItem>, Attachable
A navigation organizes an application's structure and content, making it easy to find information and accomplish tasks.
Navigation communicates relationships, context, and actions a user can take within an application.
navigation(primary)
.addItem(navigationItem("itm-1", "Item 1", "#itm-1"))
.addItem(navigationItem("itm-2", "Item 2", "#itm-2"))
.addItem(navigationItem("itm-3", "Item 3", "#itm-3"));
navigation(grouped)
.addGroup(navigationGroup("grp-1", "Group 1")
.addItem(navigationItem("grp-1-itm-1", "Item 1", "#grp-1-itm-1"))
.addItem(navigationItem("grp-1-itm-2", "Item 2", "#grp-1-itm-2"))
.addItem(navigationItem("grp-1-itm-3", "Item 3", "#grp-1-itm-3")))
.addGroup(navigationGroup("grp-2", "Group 2")
.addItem(navigationItem("grp-2-itm-1", "Item 1", "#grp-2-itm-1"))
.addItem(navigationItem("grp-2-itm-2", "Item 2", "#grp-2-itm-2"))
.addDivider()
.addItem(navigationItem("grp-2-itm-3", "Item 3", "#grp-2-itm-3")));
navigation(expandable)
.addItem(navigationItem("itm-1", "Item 1", "#itm-1"))
.addDivider()
.addGroup(expandableNavigationGroup("grp-1", "Group 1")
.addItem(navigationItem("grp-1-itm-1", "Item 1", "#grp-1-itm-1"))
.addItem(navigationItem("grp-1-itm-2", "Item 2", "#grp-1-itm-2"))
.addDivider()
.addItem(navigationItem("grp-1-itm-3", "Item 3", "#grp-1-itm-3")))
.addItem(navigationItem("itm-2", "Item 2", "#itm-2"))
.addItem(navigationItem("itm-3", "Item 3", "#itm-3"))
.addGroup(expandableNavigationGroup("grp-2", "Group 2")
.addItem(navigationItem("grp-2-itm-1", "Item 1", "#grp-2-itm-1"))
.addItem(navigationItem("grp-2-itm-2", "Item 2", "#grp-2-itm-2"))
.addGroup(expandableNavigationGroup("nested-grp-1", "Nested Group")
.addItem(navigationItem("nested-grp-1-itm-1", "Item 1", "#nested-grp-1-itm-1"))
.addDivider()
.addItem(navigationItem("nested-grp-1-itm-2", "Item 2", "#nested-grp-1-itm-2"))));
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionadd(ExpandableNavigationGroup group) add(NavigationGroup group) add(NavigationItem item) addGroup(NavigationGroup group) addItem(NavigationItem item) <T> NavigationaddItems(Iterable<T> items, Function<T, NavigationItem> display) ariaScrollBackLabel(String label) Aria-label for the back scroll buttonariaScrollForwardLabel(String label) Aria-label for the forward scroll buttonvoidattach(MutationRecord mutationRecord) voidclear()booleanvoiddetach(MutationRecord mutationRecord) insertGroupAfter(ExpandableNavigationGroup group, String afterIdentifier) insertGroupAfter(NavigationGroup group, String afterIdentifier) insertGroupBefore(ExpandableNavigationGroup group, String beforeIdentifier) insertGroupBefore(NavigationGroup group, String beforeIdentifier) insertItemAfter(NavigationItem item, String afterIdentifier) insertItemBefore(NavigationItem item, String beforeIdentifier) booleanisEmpty()iterator()static Navigationnavigation(NavigationType type) onSelect(org.patternfly.handler.SelectHandler<NavigationItem> selectHandler) onToggle(org.patternfly.handler.ToggleHandler<ExpandableNavigationGroup> toggleHandler) voidvoidvoidselect(NavigationItem item) voidselect(NavigationItem item, boolean fireEvent) intsize()that()Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hiddenMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
addItems
- Specified by:
addItemsin interfaceHasItems<HTMLElement,Navigation, NavigationItem>
-
addDivider
-
add
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Navigation>
-
ariaScrollBackLabel
Aria-label for the back scroll button -
ariaScrollForwardLabel
Aria-label for the forward scroll button -
onSelect
-
onToggle
public Navigation onToggle(org.patternfly.handler.ToggleHandler<ExpandableNavigationGroup> toggleHandler) -
select
-
select
-
iterator
- Specified by:
iteratorin interfaceIterable<NavigationItem>
-
size
public int size()- Specified by:
sizein interfaceHasItems<HTMLElement,Navigation, NavigationItem>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceHasItems<HTMLElement,Navigation, NavigationItem>
-
contains
- Specified by:
containsin interfaceHasItems<HTMLElement,Navigation, NavigationItem>
-
item
- Specified by:
itemin interfaceHasItems<HTMLElement,Navigation, NavigationItem>
-
clear
public void clear()- Specified by:
clearin interfaceHasItems<HTMLElement,Navigation, NavigationItem>