Package com.storedobject.vaadin
Class Breadcrumbs
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<ButtonLayout>
com.storedobject.vaadin.Breadcrumbs
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
Breadcrumbs component. A
ClickHandler may be used to make the Breadcrumbs.Breadcrumbs clickable.
If the Breadcrumbs.Breadcrumbs are clickable, the ClickHandler's ClickHandler.clicked(Component)
method will be invoked when it is clicked and the Breadcrumbs.Breadcrumbs up to the clicked one will be pruned.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classComponent that represents a "breadcrumb".static interfaceListener interface for "breadcrumb removal listener". -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Breadcrumbs(ClickHandler clickHandler) Constructor with a "Click Handler". -
Method Summary
Modifier and TypeMethodDescriptionCreate a newBreadcrumbs.Breadcrumband add it to this.getChild(Breadcrumbs.Breadcrumb breadcrumb) Get the child of the given breadcrumb.getHead()Get the head breadcrumb.getParent(Breadcrumbs.Breadcrumb breadcrumb) Get the parent of the given breadcrumb.voidgoTo(Breadcrumbs.Breadcrumb breadcrumb) Jump to a givenBreadcrumbs.Breadcrumb.protected ButtonLayoutvoidremove()Remove theBreadcrumbs.Breadcrumbfrom the tail end if one exists.voidremove(Breadcrumbs.Breadcrumb breadcrumb) Remove a givenBreadcrumbs.Breadcrumb.Stream all child breadcrumbs.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
Breadcrumbs
public Breadcrumbs()Constructor. -
Breadcrumbs
Constructor with a "Click Handler".- Parameters:
clickHandler- Click handler
-
-
Method Details
-
initContent
- Overrides:
initContentin classcom.vaadin.flow.component.Composite<ButtonLayout>
-
add
Create a newBreadcrumbs.Breadcrumband add it to this.- Parameters:
caption- Caption text of theBreadcrumbs.Breadcrumbto be created- Returns:
- The
Breadcrumbs.Breadcrumbthat is created and added.
-
remove
public void remove()Remove theBreadcrumbs.Breadcrumbfrom the tail end if one exists. -
remove
Remove a givenBreadcrumbs.Breadcrumb. AllBreadcrumbs.Breadcrumbappearing after the given one will be removed.- Parameters:
breadcrumb-Breadcrumbs.Breadcrumbto be removed
-
goTo
Jump to a givenBreadcrumbs.Breadcrumb. AllBreadcrumbs.Breadcrumbappearing after the given one will be removed.- Parameters:
breadcrumb-Breadcrumbs.Breadcrumbto go to
-
getParent
Get the parent of the given breadcrumb.- Parameters:
breadcrumb- Breadcrumb for which parent needs to be obtained.- Returns:
- Parent or
nullif it is the first breadcrumb.
-
getChild
Get the child of the given breadcrumb.- Parameters:
breadcrumb- Breadcrumb for which child needs to be obtained.- Returns:
- Parent or
nullif it is the last breadcrumb.
-
getHead
Get the head breadcrumb.- Returns:
- The breadcrumb at the head. Could be
null.
-
streamChildren
Stream all child breadcrumbs.- Returns:
- Stream of child breadcrumbs.
-