Class TextArea
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.AbstractField<C,T>
-
- com.vaadin.flow.component.AbstractSinglePropertyField<R,T>
-
- com.vaadin.flow.component.textfield.GeneratedVaadinTextArea<TextArea,String>
-
- com.vaadin.flow.component.textfield.TextArea
-
- All Implemented Interfaces:
AttachNotifier,BlurNotifier<TextArea>,CompositionNotifier,DetachNotifier,Focusable<TextArea>,FocusNotifier<TextArea>,HasElement,HasEnabled,HasHelper,HasLabel,HasSize,HasStyle,HasTheme,HasValidation,HasValue<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>,HasValueAndElement<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>,InputNotifier,KeyNotifier,HasAllowedCharPattern,HasClearButton,HasThemeVariant<TextAreaVariant>,HasTooltip,HasAutocapitalize,HasAutocomplete,HasAutocorrect,HasPrefixAndSuffix,HasValidator<String>,HasValueChangeMode,Serializable
public class TextArea extends GeneratedVaadinTextArea<TextArea,String> implements HasSize, HasValidation, HasValueChangeMode, HasPrefixAndSuffix, InputNotifier, KeyNotifier, CompositionNotifier, HasAutocomplete, HasAutocapitalize, HasAutocorrect, HasHelper, HasLabel, HasClearButton, HasAllowedCharPattern, HasThemeVariant<TextAreaVariant>, HasTooltip, HasValidator<String>
Text Area is an input field component for multi-line text input. Text Area is typically used for descriptions, comments, and other longer free-form content.- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.textfield.GeneratedVaadinTextArea
GeneratedVaadinTextArea.ChangeEvent<R extends GeneratedVaadinTextArea<R,?>>, GeneratedVaadinTextArea.InvalidChangeEvent<R extends GeneratedVaadinTextArea<R,?>>
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
AbstractField.ComponentValueChangeEvent<C extends Component,V>
-
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.HasValue
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>
-
-
Field Summary
-
Fields inherited from interface com.vaadin.flow.component.textfield.HasAutocapitalize
AUTOCAPITALIZE_ATTRIBUTE
-
Fields inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
AUTOCOMPLETE_ATTRIBUTE
-
Fields inherited from interface com.vaadin.flow.component.textfield.HasAutocorrect
AUTOCORRECT_ATTRIBUTE
-
Fields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode
DEFAULT_CHANGE_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description TextArea()Constructs an emptyTextArea.TextArea(HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)Constructs an emptyTextAreawith a value change listener.TextArea(String label)Constructs an emptyTextAreawith the given label.TextArea(String label, HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)Constructs an emptyTextAreawith a label and a value change listener.TextArea(String label, String placeholder)Constructs an emptyTextAreawith the given label and placeholder text.TextArea(String label, String initialValue, HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)Constructs an emptyTextAreawith a label, a value change listener and an initial value.TextArea(String label, String initialValue, String placeholder)Constructs aTextAreawith the given label, an initial value and placeholder text.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddThemeVariants(TextAreaVariant... variants)Adds theme variants to the component.Validator<String>getDefaultValidator()Returns a validator that checks the state of the Value.StringgetEmptyValue()Returns the value that represents an empty value.StringgetErrorMessage()Gets current error message from the component.StringgetLabel()String used for the label element.intgetMaxLength()Maximum number of characters (in Unicode code points) that the user can enter.intgetMinLength()Minimum number of characters (in Unicode code points) that the user can enter.StringgetPattern()A regular expression that the value is checked against.StringgetPlaceholder()A hint to the user of what can be entered in the component.StringgetValue()Returns the current value of the text area.ValueChangeModegetValueChangeMode()Gets current value change mode of the component.intgetValueChangeTimeout()Returns the currently set timeout, for how oftenHasValue.ValueChangeEvents are triggered when the ValueChangeMode is set toValueChangeMode.LAZY, orValueChangeMode.TIMEOUT.booleanisAutofocus()Specify that this control should have input focus when the page loads.booleanisAutoselect()Specifies if the field value gets automatically selected when the field gains focus.protected booleanisFeatureFlagEnabled(Feature feature)Returns true if the given feature flag is enabled, false otherwise.booleanisInvalid()Returnstrueif component input is invalid,falseotherwise.booleanisPreventInvalidInput()Deprecated.Since 23.2, this API is deprecated.booleanisRequired()Specifies that the user must fill in a value.protected voidonAttach(AttachEvent attachEvent)Called when the component is attached to a UI.voidremoveThemeVariants(TextAreaVariant... variants)Removes theme variants from the component.voidsetAutofocus(boolean autofocus)Description copied from corresponding location in WebComponent:voidsetAutoselect(boolean autoselect)Set totrueto always have the field value automatically selected when the field gains focus,falseotherwise.voidsetErrorMessage(String errorMessage)Description copied from corresponding location in WebComponent:voidsetInvalid(boolean invalid)Description copied from corresponding location in WebComponent:voidsetLabel(String label)Description copied from corresponding location in WebComponent:voidsetMaxLength(int maxLength)Maximum number of characters (in Unicode code points) that the user can enter.voidsetMinLength(int minLength)Minimum number of characters (in Unicode code points) that the user can enter.voidsetPattern(String pattern)Sets a regular expression for the value to pass on the client-side.voidsetPlaceholder(String placeholder)Description copied from corresponding location in WebComponent:voidsetPreventInvalidInput(boolean preventInvalidInput)Deprecated.Since 23.2, this API is deprecated in favor ofHasAllowedCharPattern.setAllowedCharPattern(String)voidsetRequired(boolean required)Description copied from corresponding location in WebComponent:voidsetRequiredIndicatorVisible(boolean requiredIndicatorVisible)Sets the required indicator visible or not.voidsetValue(String value)Sets the value of this text area.voidsetValueChangeMode(ValueChangeMode valueChangeMode)Sets new value change mode for the component.voidsetValueChangeTimeout(int valueChangeTimeout)Sets how oftenHasValue.ValueChangeEvents are triggered when the ValueChangeMode is set toValueChangeMode.LAZY, orValueChangeMode.TIMEOUT.protected voidvalidate()Performs server-side validation of the current value.-
Methods inherited from class com.vaadin.flow.component.textfield.GeneratedVaadinTextArea
addChangeListener, addInvalidChangeListener, addToPrefix, addToSuffix, addToTextarea, checkValidity, getAutocapitalizeString, getAutocompleteString, getAutocorrectString, getErrorMessageString, getLabelString, getMaxlengthDouble, getMinlengthDouble, getNameString, getPlaceholderString, isAutofocusBoolean, isAutoselectBoolean, isDisabledBoolean, isInvalidBoolean, isPreventInvalidInputBoolean, isReadonlyBoolean, isRequiredBoolean, remove, removeAll, setAutocapitalize, setAutocomplete, setAutocorrect, setDisabled, setMaxlength, setMinlength, setName, setReadonly
-
Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent
-
Methods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, isEmpty, setModelValue, valueEquals
-
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, 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.CompositionNotifier
addCompositionEndListener, addCompositionStartListener, addCompositionUpdateListener
-
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.shared.HasAllowedCharPattern
getAllowedCharPattern, setAllowedCharPattern
-
Methods inherited from interface com.vaadin.flow.component.textfield.HasAutocapitalize
getAutocapitalize, setAutocapitalize
-
Methods inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
getAutocomplete, setAutocomplete
-
Methods inherited from interface com.vaadin.flow.component.textfield.HasAutocorrect
isAutocorrect, setAutocorrect
-
Methods inherited from interface com.vaadin.flow.component.shared.HasClearButton
isClearButtonVisible, setClearButtonVisible
-
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.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperText
-
Methods inherited from interface com.vaadin.flow.component.textfield.HasPrefixAndSuffix
getPrefixComponent, getSuffixComponent, setPrefixComponent, setSuffixComponent
-
Methods 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, setWidthFull
-
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.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
-
Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipText
-
Methods inherited from interface com.vaadin.flow.data.binder.HasValidator
addValidationStatusChangeListener
-
Methods inherited from interface com.vaadin.flow.component.HasValue
clear, getOptionalValue
-
Methods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, isRequiredIndicatorVisible, setReadOnly
-
Methods inherited from interface com.vaadin.flow.component.InputNotifier
addInputListener
-
Methods inherited from interface com.vaadin.flow.component.KeyNotifier
addKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListener
-
-
-
-
Constructor Detail
-
TextArea
public TextArea()
Constructs an emptyTextArea.
-
TextArea
public TextArea(String label)
Constructs an emptyTextAreawith the given label.- Parameters:
label- the text to set as the label
-
TextArea
public TextArea(String label, String placeholder)
Constructs an emptyTextAreawith the given label and placeholder text.- Parameters:
label- the text to set as the labelplaceholder- the placeholder text to set
-
TextArea
public TextArea(String label, String initialValue, String placeholder)
Constructs aTextAreawith the given label, an initial value and placeholder text.- Parameters:
label- the text to set as the labelinitialValue- the initial valueplaceholder- the placeholder text to set- See Also:
AbstractField.setValue(Object),setPlaceholder(String)
-
TextArea
public TextArea(HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)
Constructs an emptyTextAreawith a value change listener.- Parameters:
listener- the value change listener- See Also:
AbstractField.addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener)
-
TextArea
public TextArea(String label, HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)
Constructs an emptyTextAreawith a label and a value change listener.- Parameters:
label- the text to set as the labellistener- the value change listener- See Also:
setLabel(String),AbstractField.addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener)
-
TextArea
public TextArea(String label, String initialValue, HasValue.ValueChangeListener<? super AbstractField.ComponentValueChangeEvent<TextArea,String>> listener)
Constructs an emptyTextAreawith a label, a value change listener and an initial value.- Parameters:
label- the text to set as the labelinitialValue- the initial valuelistener- the value change listener- See Also:
setLabel(String),AbstractField.setValue(Object),AbstractField.addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener)
-
-
Method Detail
-
getValueChangeMode
public ValueChangeMode getValueChangeMode()
Gets current value change mode of the component.The default value is
ValueChangeMode.ON_CHANGE.- Specified by:
getValueChangeModein interfaceHasValueChangeMode- Returns:
- current value change mode of the component, or
nullif the value is not synchronized
-
setValueChangeMode
public void setValueChangeMode(ValueChangeMode valueChangeMode)
Description copied from interface:HasValueChangeModeSets new value change mode for the component.- Specified by:
setValueChangeModein interfaceHasValueChangeMode- Parameters:
valueChangeMode- new value change mode, ornullto disable the value synchronization
-
setValueChangeTimeout
public void setValueChangeTimeout(int valueChangeTimeout)
Description copied from interface:HasValueChangeModeSets how oftenHasValue.ValueChangeEvents are triggered when the ValueChangeMode is set toValueChangeMode.LAZY, orValueChangeMode.TIMEOUT.Implementations should use
ValueChangeMode.applyChangeTimeout(ValueChangeMode, int, DomListenerRegistration).- Specified by:
setValueChangeTimeoutin interfaceHasValueChangeMode- Parameters:
valueChangeTimeout- the timeout in milliseconds of how oftenHasValue.ValueChangeEvents are triggered.
-
getValueChangeTimeout
public int getValueChangeTimeout()
Description copied from interface:HasValueChangeModeReturns the currently set timeout, for how oftenHasValue.ValueChangeEvents are triggered when the ValueChangeMode is set toValueChangeMode.LAZY, orValueChangeMode.TIMEOUT.- Specified by:
getValueChangeTimeoutin interfaceHasValueChangeMode- Returns:
- the timeout in milliseconds of how often
HasValue.ValueChangeEvents are triggered.
-
getErrorMessage
public String getErrorMessage()
Description copied from interface:HasValidationGets current error message from the component.- Specified by:
getErrorMessagein interfaceHasValidation- Returns:
- current error message
-
setErrorMessage
public void setErrorMessage(String errorMessage)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
Error to show when the input value is invalid.
- Specified by:
setErrorMessagein interfaceHasValidation- Overrides:
setErrorMessagein classGeneratedVaadinTextArea<TextArea,String>- Parameters:
errorMessage- the String value to set
-
isInvalid
public boolean isInvalid()
Description copied from interface:HasValidationReturnstrueif component input is invalid,falseotherwise.- Specified by:
isInvalidin interfaceHasValidation- Returns:
- whether the component input is valid
-
setInvalid
public void setInvalid(boolean invalid)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
This property is set to true when the control value is invalid.
- Specified by:
setInvalidin interfaceHasValidation- Overrides:
setInvalidin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
invalid- the boolean value to set
-
setLabel
public void setLabel(String label)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
String used for the label element.
-
getLabel
public String getLabel()
String used for the label element.
-
setPlaceholder
public void setPlaceholder(String placeholder)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
A hint to the user of what can be entered in the control.
- Overrides:
setPlaceholderin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
placeholder- the String value to set
-
getPlaceholder
public String getPlaceholder()
A hint to the user of what can be entered in the component.- Returns:
- the
placeholderproperty from the webcomponent
-
isAutoselect
public boolean isAutoselect()
Specifies if the field value gets automatically selected when the field gains focus.- Returns:
trueif autoselect is active,falseotherwise
-
setAutoselect
public void setAutoselect(boolean autoselect)
Set totrueto always have the field value automatically selected when the field gains focus,falseotherwise.- Overrides:
setAutoselectin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
autoselect-trueto set auto select on,falseotherwise
-
setAutofocus
public void setAutofocus(boolean autofocus)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
Specify that this control should have input focus when the page loads.
- Overrides:
setAutofocusin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
autofocus- the boolean value to set
-
isAutofocus
public boolean isAutofocus()
Specify that this control should have input focus when the page loads.- Returns:
- the
autofocusproperty from the webcomponent
-
setMaxLength
public void setMaxLength(int maxLength)
Maximum number of characters (in Unicode code points) that the user can enter.- Parameters:
maxLength- the maximum length
-
getMaxLength
public int getMaxLength()
Maximum number of characters (in Unicode code points) that the user can enter.- Returns:
- the
maxlengthproperty from the webcomponent
-
setMinLength
public void setMinLength(int minLength)
Minimum number of characters (in Unicode code points) that the user can enter.- Parameters:
minLength- the minimum length
-
getMinLength
public int getMinLength()
Minimum number of characters (in Unicode code points) that the user can enter.- Returns:
- the
minlengthproperty from the webcomponent
-
isRequired
public boolean isRequired()
Specifies that the user must fill in a value.- Returns:
- the
requiredproperty from the webcomponent
-
setRequired
public void setRequired(boolean required)
Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
Specifies that the user must fill in a value.
- Overrides:
setRequiredin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
required- the boolean value to set
-
isPreventInvalidInput
@Deprecated public boolean isPreventInvalidInput()
Deprecated.Since 23.2, this API is deprecated.When set totrue, user is prevented from typing a value that conflicts with the givenpattern.- Returns:
- the
preventInvalidInputproperty from the webcomponent
-
setPreventInvalidInput
public void setPreventInvalidInput(boolean preventInvalidInput)
Deprecated.Since 23.2, this API is deprecated in favor ofHasAllowedCharPattern.setAllowedCharPattern(String)Description copied from class:GeneratedVaadinTextAreaDescription copied from corresponding location in WebComponent:
When set to true, user is prevented from typing a value that conflicts with the given
maxlengthorminlengthproperties.- Overrides:
setPreventInvalidInputin classGeneratedVaadinTextArea<TextArea,String>- Parameters:
preventInvalidInput- the boolean value to set
-
setPattern
public void setPattern(String pattern)
Sets a regular expression for the value to pass on the client-side. The pattern must be a valid JavaScript Regular Expression that matches the entire value, not just some subset.- Parameters:
pattern- the new String pattern- See Also:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefpattern>, https://html.spec.whatwg.org/multipage/input.html#attr-input-pattern>
-
getPattern
public String getPattern()
A regular expression that the value is checked against. The pattern must match the entire value, not just some subset.- Returns:
- the
patternproperty
-
getEmptyValue
public String getEmptyValue()
Description copied from interface:HasValueReturns the value that represents an empty value.By default
HasValueis expected to supportnullas empty values. Specific implementations might not support this.- Specified by:
getEmptyValuein interfaceHasValue<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>- Overrides:
getEmptyValuein classAbstractField<TextArea,String>- Returns:
- empty value
-
setValue
public void setValue(String value)
Sets the value of this text area. If the new value is not equal togetValue(), fires a value change event. ThrowsNullPointerException, if the value is null.Note:
Binderwill take care of thenullconversion when integrates with text area, as long as no new converter is defined.- Specified by:
setValuein interfaceHasValue<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>- Overrides:
setValuein classAbstractField<TextArea,String>- Parameters:
value- the new value, notnull
-
getValue
public String getValue()
Returns the current value of the text area. By default, the empty text area will return an empty string.- Specified by:
getValuein interfaceHasValue<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>- Overrides:
getValuein classAbstractField<TextArea,String>- Returns:
- the current value.
-
setRequiredIndicatorVisible
public void setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
Description copied from interface:HasValueSets the required indicator visible or not.If set visible, it is visually indicated in the user interface.
The method is intended to be used with
Binderwhich does server-side validation. In case HTML element has its own (client-side) validation it should be disabled whensetRequiredIndicatorVisible(true)is called and re-enabled back onsetRequiredIndicatorVisible(false). It's responsibility of each component implementation to follow the contract so that the method call doesn't do anything else than show/hide the "required" indication. Usually components provide their ownsetRequiredmethod which should be called in case the client-side validation is required.- Specified by:
setRequiredIndicatorVisiblein interfaceHasValue<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>- Specified by:
setRequiredIndicatorVisiblein interfaceHasValueAndElement<AbstractField.ComponentValueChangeEvent<TextArea,String>,String>- Parameters:
requiredIndicatorVisible-trueto make the required indicator visible,falseif not
-
getDefaultValidator
public Validator<String> getDefaultValidator()
Description copied from interface:HasValidatorReturns a validator that checks the state of the Value. This should be overridden for components with internal value conversion or validation, e.g. when the user is providing a string that has to be parsed into a date. An invalid input from user will be exposed to aBinderand can be seen as a validation failure.- Specified by:
getDefaultValidatorin interfaceHasValidator<String>- Returns:
- state validator
-
validate
protected void validate()
Performs server-side validation of the current value. This is needed because it is possible to circumvent the client-side validation constraints using browser development tools.- Overrides:
validatein classGeneratedVaadinTextArea<TextArea,String>
-
onAttach
protected void onAttach(AttachEvent attachEvent)
Description copied from class:ComponentCalled when the component is attached to a UI.The default implementation does nothing.
This method is invoked before the
AttachEventis fired for the component.
-
addThemeVariants
public void addThemeVariants(TextAreaVariant... variants)
Description copied from interface:HasThemeVariantAdds theme variants to the component.- Specified by:
addThemeVariantsin interfaceHasThemeVariant<TextAreaVariant>- Parameters:
variants- theme variants to add
-
removeThemeVariants
public void removeThemeVariants(TextAreaVariant... variants)
Description copied from interface:HasThemeVariantRemoves theme variants from the component.- Specified by:
removeThemeVariantsin interfaceHasThemeVariant<TextAreaVariant>- Parameters:
variants- theme variants to remove
-
isFeatureFlagEnabled
protected boolean isFeatureFlagEnabled(Feature feature)
Returns true if the given feature flag is enabled, false otherwise.Exposed with protected visibility to support mocking
The method requires the
VaadinServiceinstance to obtain the available feature flags, otherwise, the feature is considered disabled.- Parameters:
feature- the feature flag.- Returns:
- whether the feature flag is enabled.
-
-