
com.vaadin.flow.component.tabs.GeneratedVaadinTabs Maven / Gradle / Ivy
/**
* Copyright 2000-2024 Vaadin Ltd.
*
* This program is available under Vaadin Commercial License and Service Terms.
*
* See {@literal } for the full
* license.
*/
package com.vaadin.flow.component.tabs;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasStyle;
import com.vaadin.flow.component.HasTheme;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.dependency.NpmPackage;
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* {@code } is a Web Component for easy switching between different
* views.
*
*
* {@code
Page 1
Page 2
Page 3
Page 4
}
*
* Styling
*
* The following shadow DOM parts are available for styling:
*
*
*
*
* Part name
* Description
*
*
*
* {@code back-button}
* Button for moving the scroll back
*
*
* {@code tabs}
* The tabs container
*
*
* {@code forward-button}
* Button for moving the scroll forward
*
*
*
*
* The following state attributes are available for styling:
*
*
*
*
* Attribute
* Description
* Part name
*
*
*
* {@code orientation}
* Tabs disposition, valid values are {@code horizontal} and
* {@code vertical}.
* :host
*
*
* {@code overflow}
* It's set to {@code start}, {@code end}, none or both.
* :host
*
*
*
*
* See
* ThemableMixin
* – how to apply styles for shadow parts
*
*/
@Tag("vaadin-tabs")
@JsModule("@vaadin/vaadin-tabs/src/vaadin-tabs.js")
@NpmPackage(value = "@vaadin/vaadin-tabs", version = "3.2.0")
public abstract class GeneratedVaadinTabs>
extends Component implements HasStyle, HasTheme {
/**
* Adds theme variants to the component.
*
* @param variants
* theme variants to add
*/
public void addThemeVariants(TabsVariant... variants) {
getThemeNames().addAll(Stream.of(variants)
.map(TabsVariant::getVariantName).collect(Collectors.toList()));
}
/**
* Removes theme variants from the component.
*
* @param variants
* theme variants to remove
*/
public void removeThemeVariants(TabsVariant... variants) {
getThemeNames().removeAll(Stream.of(variants)
.map(TabsVariant::getVariantName).collect(Collectors.toList()));
}
protected void focus() {
getElement().callFunction("focus");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy