Package com.vaadin.componentfactory
Class AnchorNav
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.componentfactory.AnchorNav
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasText,com.vaadin.flow.component.HasTheme,Serializable
@Tag("vcf-anchor-nav")
@NpmPackage(value="@vaadin-component-factory/vcf-anchor-nav",
version="4.0.0")
@JsModule("@vaadin-component-factory/vcf-anchor-nav")
public class AnchorNav
extends com.vaadin.flow.component.HtmlContainer
implements com.vaadin.flow.component.HasTheme
Server-side component for the
vcf-anchor-nav element.- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSection(com.vaadin.flow.component.tabs.Tab sectionTab, com.vaadin.flow.component.Component... components) Adds a section created from the given Tab and content.addSection(String title, com.vaadin.flow.component.Component... components) Adds a section created from the given title and content.com.vaadin.flow.shared.RegistrationaddSelectedSectionChangedListener(com.vaadin.flow.component.ComponentEventListener<AnchorNav.SelectedSectionChangedEvent> listener) Adds a listener forAnchorNav.SelectedSectionChangedEvent.voidaddThemeVariants(AnchorNavVariant... variants) Adds theme variants to the component.voidsetHeader(com.vaadin.flow.component.Component header) Sets the component headervoidsetHeaderText(String headerText) Set the header text as a html h2 titlevoidsetNoHistory(boolean noHistory) Toggles "no history" mode for the anchor.voidsetSelectedSection(int selectedIndex) Selects a section based on its zero-based index.voidsetSelectedSection(AnchorNavSection selectedSection) Selects the given section.Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, 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.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAllMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setText, setWhiteSpaceMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
-
Constructor Details
-
AnchorNav
public AnchorNav() -
AnchorNav
public AnchorNav(boolean noHistory)
-
-
Method Details
-
setNoHistory
public void setNoHistory(boolean noHistory) Toggles "no history" mode for the anchor. Setting the property for a single AnchorNav enabled "no history" mode for the entire view.- Parameters:
noHistory-
-
addSection
Adds a section created from the given title and content.- Parameters:
title- title of the sectioncomponents- content- Returns:
- the section
-
addSection
public AnchorNavSection addSection(com.vaadin.flow.component.tabs.Tab sectionTab, com.vaadin.flow.component.Component... components) Adds a section created from the given Tab and content.- Parameters:
sectionTab- Tab of the sectioncomponents- content- Returns:
- the section
-
setHeaderText
Set the header text as a html h2 title- Parameters:
headerText- text of the header
-
setHeader
public void setHeader(com.vaadin.flow.component.Component header) Sets the component header- Parameters:
header- component to add as a header
-
setSelectedSection
public void setSelectedSection(int selectedIndex) Selects a section based on its zero-based index.- Parameters:
selectedIndex- the zero-based index of the selected section
-
addSelectedSectionChangedListener
public com.vaadin.flow.shared.Registration addSelectedSectionChangedListener(com.vaadin.flow.component.ComponentEventListener<AnchorNav.SelectedSectionChangedEvent> listener) Adds a listener forAnchorNav.SelectedSectionChangedEvent.- Parameters:
listener- the listener to add, notnull- Returns:
- a handle that can be used for removing the listener
-