@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, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeight, getWidth, setHeight, setSizeFull, setSizeUndefined, setWidthpublic 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–2021 Vaadin Ltd. All rights reserved.