@Tag(value="nav")
public class DemoNavigationBar
extends com.vaadin.flow.component.HtmlContainer
| Constructor and Description |
|---|
DemoNavigationBar()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLink(String text,
String href)
Adds a menu item inside the navigation bar.
|
void |
setActive(String href)
Sets an specific anchor as active.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullpublic DemoNavigationBar()
public void addLink(String text, String href)
text - the text shown for the anchorhref - the href of the anchorpublic void setActive(String href)
href - the href of the anchor to be set as active, or
null to inactivate all the anchors.Copyright © 2000–2026 Vaadin Ltd. All rights reserved.