com.vaadin.flow.component.tabs.GeneratedVaadinTab Maven / Gradle / Ivy
/*
* Copyright 2000-2024 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the 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 providing an accessible and
* customizable tab.
*
*
* {@code
Tab 1
}
*
*
* The following state attributes are available for styling:
*
*
*
*
* Attribute
* Description
* Part name
*
*
*
* {@code disabled}
* Set to a disabled tab
* :host
*
*
* {@code focused}
* Set when the element is focused
* :host
*
*
* {@code focus-ring}
* Set when the element is keyboard focused
* :host
*
*
* {@code selected}
* Set when the tab is selected
* :host
*
*
* {@code active}
* Set when mousedown or enter/spacebar pressed
* :host
*
*
* {@code orientation}
* Set to {@code horizontal} or {@code vertical} depending on the direction
* of items
* :host
*
*
*
*
* See
* ThemableMixin
* – how to apply styles for shadow parts
*
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
@Tag("vaadin-tab")
@NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "23.5.11")
@JsModule("@vaadin/polymer-legacy-adapter/style-modules.js")
@JsModule("@vaadin/tabs/src/vaadin-tab.js")
@NpmPackage(value = "@vaadin/tabs", version = "23.5.11")
@NpmPackage(value = "@vaadin/vaadin-tabs", version = "23.5.11")
public abstract class GeneratedVaadinTab>
extends Component implements HasStyle, HasTheme {
/**
* Adds theme variants to the component.
*
* @param variants
* theme variants to add
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
public void addThemeVariants(TabVariant... variants) {
getThemeNames().addAll(Stream.of(variants)
.map(TabVariant::getVariantName).collect(Collectors.toList()));
}
/**
* Removes theme variants from the component.
*
* @param variants
* theme variants to remove
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
public void removeThemeVariants(TabVariant... variants) {
getThemeNames().removeAll(Stream.of(variants)
.map(TabVariant::getVariantName).collect(Collectors.toList()));
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* Submittable string value. The default value is the trimmed text content
* of the element.
*
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
*
*
* @return the {@code value} property from the webcomponent
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected String getValueString() {
return getElement().getProperty("value");
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* Submittable string value. The default value is the trimmed text content
* of the element.
*
*
* @param value
* the String value to set
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected void setValue(String value) {
getElement().setProperty("value", value == null ? "" : value);
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* If true, the user cannot interact with this element.
*
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
*
*
* @return the {@code disabled} property from the webcomponent
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected boolean isDisabledBoolean() {
return getElement().getProperty("disabled", false);
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* If true, the user cannot interact with this element.
*
*
* @param disabled
* the boolean value to set
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected void setDisabled(boolean disabled) {
getElement().setProperty("disabled", disabled);
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* If true, the item is in selected state.
*
* This property is not synchronized automatically from the client side, so
* the returned value may not be the same as in client side.
*
*
* @return the {@code selected} property from the webcomponent
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected boolean isSelectedBoolean() {
return getElement().getProperty("selected", false);
}
/**
*
* Description copied from corresponding location in WebComponent:
*
*
* If true, the item is in selected state.
*
*
* @param selected
* the boolean value to set
*
* @deprecated since v23.3, generated classes will be removed in v24.
*/
@Deprecated
protected void setSelected(boolean selected) {
getElement().setProperty("selected", selected);
}
}