public class Breadcrumb extends BaseDominoElement<elemental2.dom.HTMLOListElement,Breadcrumb> implements HasBackground<Breadcrumb>
This component displays locations with the ability to navigate between them and highlighting the current one, each location can have text and icon with a click listener that will be called when user clicks on it.
Customize the component can be done by overwriting classes provided by BreadcrumbStyles
For example:
Breadcrumb.create()
.appendChild(" Home ", (evt) -> {//do something when clicked})
.appendChild(" Library ", (evt) -> {//do something when clicked})
BaseDominoElement,
HasBackground,
BreadcrumbItemBaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStyler| Constructor and Description |
|---|
Breadcrumb() |
| Modifier and Type | Method and Description |
|---|---|
Breadcrumb |
alignCenter()
Positions the breadcrumb to the center of its parent
|
Breadcrumb |
alignRight()
Positions the breadcrumb to the right of its parent
|
Breadcrumb |
appendChild(BaseIcon<?> icon,
String text,
elemental2.dom.EventListener onClick)
Adds new location with
text, icon and onClick listener |
Breadcrumb |
appendChild(BreadcrumbItem... items)
Adds new location by providing
BreadcrumbItem |
Breadcrumb |
appendChild(BreadcrumbItem item)
Adds new location by providing
BreadcrumbItem |
Breadcrumb |
appendChild(String text,
elemental2.dom.EventListener onClick)
Adds new location with
text and onClick listener |
static Breadcrumb |
create()
Creates new empty breadcrumb
|
elemental2.dom.HTMLOListElement |
element() |
BreadcrumbItem |
getActiveItem() |
List<BreadcrumbItem> |
getItems() |
boolean |
isAllowNavigation() |
Breadcrumb |
removeAll()
Removes all locations from the breadcrumb
|
Breadcrumb |
setAllowNavigation(boolean allowNavigation)
Sets if the breadcrumb supports navigation between its locations
|
Breadcrumb |
setBackground(Color background) |
Breadcrumb |
setColor(Color color)
Sets the color of the breadcrumb
|
Breadcrumb |
setRemoveActiveTailItem(boolean removeTail)
If true, then selecting location will remove the tailing ones.
|
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, disable, elevate, elevate, enable, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic static Breadcrumb create()
public Breadcrumb appendChild(String text, elemental2.dom.EventListener onClick)
text and onClick listenertext - the label of the locationonClick - EventListener that will be called when the location is clickedpublic Breadcrumb appendChild(BaseIcon<?> icon, String text, elemental2.dom.EventListener onClick)
text, icon and onClick listenericon - the BaseIcon of the locationtext - the label of the locationonClick - EventListener that will be called when the location is clickedpublic Breadcrumb appendChild(BreadcrumbItem... items)
BreadcrumbItemitems - the BreadcrumbItem location to be addedpublic Breadcrumb appendChild(BreadcrumbItem item)
BreadcrumbItemitem - the BreadcrumbItem location to be addedpublic Breadcrumb setAllowNavigation(boolean allowNavigation)
allowNavigation - true to allow navigation, false otherwisepublic boolean isAllowNavigation()
public Breadcrumb setRemoveActiveTailItem(boolean removeTail)
For example:
removeTail is true and having 4 locations as follows:
A -> B -> C -> D
when selecting location B, then the new locations will be as follows:
A -> B
removeTail is false and having 4 locations as follows:
A -> B -> C -> D
when selecting location B, then the new locations will be as follows:
A -> B -> C -> D
removeTail - true for activating remove tail, false otherwisepublic Breadcrumb setColor(Color color)
color - the new Colorpublic Breadcrumb alignCenter()
alignCenter in interface DominoStyle<elemental2.dom.HTMLOListElement,Breadcrumb,Breadcrumb>alignCenter in class BaseDominoElement<elemental2.dom.HTMLOListElement,Breadcrumb>public Breadcrumb alignRight()
alignRight in interface DominoStyle<elemental2.dom.HTMLOListElement,Breadcrumb,Breadcrumb>alignRight in class BaseDominoElement<elemental2.dom.HTMLOListElement,Breadcrumb>public Breadcrumb removeAll()
public elemental2.dom.HTMLOListElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLOListElement>element in class BaseDominoElement<elemental2.dom.HTMLOListElement,Breadcrumb>public Breadcrumb setBackground(Color background)
setBackground in interface HasBackground<Breadcrumb>background - Colorpublic BreadcrumbItem getActiveItem()
BreadcrumbItem locationpublic List<BreadcrumbItem> getItems()
BreadcrumbItem locationsCopyright © 2019–2022 Dominokit. All rights reserved.