Class GeneratedVaadinButton<R extends GeneratedVaadinButton<R>>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.button.GeneratedVaadinButton<R>
-
- All Implemented Interfaces:
AttachNotifier,BlurNotifier<R>,ClickNotifier<R>,DetachNotifier,Focusable<R>,FocusNotifier<R>,HasElement,HasEnabled,HasStyle,HasText,HasTheme,HasThemeVariant<ButtonVariant>,Serializable
- Direct Known Subclasses:
Button
@Deprecated @Tag("vaadin-button") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.3.30") @NpmPackage(value="@vaadin/button",version="23.3.30") @NpmPackage(value="@vaadin/vaadin-button",version="23.3.30") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/button/src/vaadin-button.js") public abstract class GeneratedVaadinButton<R extends GeneratedVaadinButton<R>> extends Component implements HasStyle, ClickNotifier<R>, HasText, Focusable<R>, HasThemeVariant<ButtonVariant>
Deprecated.since v23.3, generated classes will be removed in v24.Description copied from corresponding location in WebComponent:
<vaadin-button>is a Web Component providing an accessible and customizable button.<vaadin-button> </vaadin-button>
document.querySelector('vaadin-button').addEventListener('click', () => alert('Hello World!'));Styling
The following shadow DOM parts are exposed for styling:
Shadow DOM parts exposed for styling Part name Description labelThe label (text) inside the button prefixA slot for e.g. an icon before the label suffixA slot for e.g. an icon after the label The following attributes are exposed for styling:
Attributes exposed for styling Attribute Description activeSet when the button is pressed down, either with mouse, touch or the keyboard. disabledSet when the button is disabled. focus-ringSet when the button is focused using the keyboard. focusedSet when the button is focused. - See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
BlurNotifier.BlurEvent<C extends Component>
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
FocusNotifier.FocusEvent<C extends Component>
-
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
HasText.WhiteSpace
-
-
Constructor Summary
Constructors Constructor Description GeneratedVaadinButton()Deprecated.since v23.3, generated classes will be removed in v24.GeneratedVaadinButton(String text)Deprecated.since v23.3, generated classes will be removed in v24.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddThemeVariants(ButtonVariant... variants)Deprecated.protected voidaddToPrefix(Component... components)Deprecated.since v23.3, generated classes will be removed in v24.protected voidaddToSuffix(Component... components)Deprecated.since v23.3, generated classes will be removed in v24.protected booleanisAutofocusBoolean()Deprecated.since v23.3, generated classes will be removed in v24.protected booleanisDisabledBoolean()Deprecated.since v23.3, generated classes will be removed in v24.protected voidremove(Component... components)Deprecated.since v23.3, generated classes will be removed in v24.protected voidremoveAll()Deprecated.since v23.3, generated classes will be removed in v24.voidremoveThemeVariants(ButtonVariant... variants)Deprecated.protected voidsetAutofocus(boolean autofocus)Deprecated.since v23.3, generated classes will be removed in v24.protected voidsetDisabled(boolean disabled)Deprecated.Since 3.0, this API is deprecated in favor ofHasEnabled.setEnabled(boolean)-
Methods 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, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListener
-
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
Methods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndex
-
Methods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListener
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setText, setWhiteSpace
-
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
-
-
-
-
Constructor Detail
-
GeneratedVaadinButton
@Deprecated public GeneratedVaadinButton(String text)
Deprecated.since v23.3, generated classes will be removed in v24.Sets the given string as the content of this component.- Parameters:
text- the text content to set- See Also:
HasText.setText(String)
-
GeneratedVaadinButton
@Deprecated public GeneratedVaadinButton()
Deprecated.since v23.3, generated classes will be removed in v24.Default constructor.
-
-
Method Detail
-
isAutofocusBoolean
@Deprecated protected boolean isAutofocusBoolean()
Deprecated.since v23.3, generated classes will be removed in v24.Description copied from corresponding location in WebComponent:
Specify that this control should have input focus when the page loads.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
autofocusproperty from the webcomponent
-
setAutofocus
@Deprecated protected void setAutofocus(boolean autofocus)
Deprecated.since v23.3, generated classes will be removed in v24.Description copied from corresponding location in WebComponent:
Specify that this control should have input focus when the page loads.
- Parameters:
autofocus- the boolean value to set
-
isDisabledBoolean
@Deprecated protected boolean isDisabledBoolean()
Deprecated.since v23.3, generated classes will be removed in v24.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.
- Returns:
- the
disabledproperty from the webcomponent
-
setDisabled
@Deprecated protected void setDisabled(boolean disabled)
Deprecated.Since 3.0, this API is deprecated in favor ofHasEnabled.setEnabled(boolean)Description copied from corresponding location in WebComponent:
If true, the user cannot interact with this element.
- Parameters:
disabled- the boolean value to set
-
addToPrefix
@Deprecated protected void addToPrefix(Component... components)
Deprecated.since v23.3, generated classes will be removed in v24.Adds the given components as children of this component at the slot 'prefix'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
addToSuffix
@Deprecated protected void addToSuffix(Component... components)
Deprecated.since v23.3, generated classes will be removed in v24.Adds the given components as children of this component at the slot 'suffix'.- Parameters:
components- The components to add.- See Also:
- MDN page about slots, Spec website about slots
-
remove
@Deprecated protected void remove(Component... components)
Deprecated.since v23.3, generated classes will be removed in v24.Removes the given child components from this component.- Parameters:
components- The components to remove.- Throws:
IllegalArgumentException- if any of the components is not a child of this component.
-
removeAll
@Deprecated protected void removeAll()
Deprecated.since v23.3, generated classes will be removed in v24.Removes all contents from this component, this includes child components, text content as well as child elements that have been added directly to this component using theElementAPI.
-
addThemeVariants
@Deprecated public void addThemeVariants(ButtonVariant... variants)
Deprecated.Description copied from interface:HasThemeVariantAdds theme variants to the component.- Specified by:
addThemeVariantsin interfaceHasThemeVariant<R extends GeneratedVaadinButton<R>>- Parameters:
variants- theme variants to add
-
removeThemeVariants
@Deprecated public void removeThemeVariants(ButtonVariant... variants)
Deprecated.Description copied from interface:HasThemeVariantRemoves theme variants from the component.- Specified by:
removeThemeVariantsin interfaceHasThemeVariant<R extends GeneratedVaadinButton<R>>- Parameters:
variants- theme variants to remove
-
-