@Tag(value="super-text-area")
@JsModule(value="./super-text-area.js")
@CssImport(value="./styles/label-positions.css",
themeFor="super-text-area")
public class SuperTextArea
extends com.vaadin.flow.component.textfield.TextArea
implements CanSelectText, TextSelectionNotifier<SuperTextArea>, CanModifyText, WithRequiredMixin<SuperTextArea>, WithLabelPositionableMixin<SuperTextArea>, WithIdMixin<SuperTextArea>, WithLabelMixin<SuperTextArea>, WithPlaceholderMixin<SuperTextArea>, WithReceivingSelectionEventsFromClientMixin<SuperTextArea>, WithClearButtonMixin<SuperTextArea>, WithHelperMixin<SuperTextArea>, WithHelperPositionableMixin<SuperTextArea>, WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>,String,SuperTextArea>, WithTooltipMixin<SuperTextArea>
TextArea with some useful features.com.vaadin.flow.component.textfield.GeneratedVaadinTextArea.ChangeEvent<R extends com.vaadin.flow.component.textfield.GeneratedVaadinTextArea<R,?>>, com.vaadin.flow.component.textfield.GeneratedVaadinTextArea.InvalidChangeEvent<R extends com.vaadin.flow.component.textfield.GeneratedVaadinTextArea<R,?>>com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>com.vaadin.flow.component.shared.HasClientValidation.ClientValidatedEventLABEL_POSITION_ATTRIBUTE, LABEL_POSITION_DETAILS_ATTRIBUTEHELPER_ABOVE_THEME_VARIANTDEFAULT_CHANGE_TIMEOUTAUTOCOMPLETE_ATTRIBUTE| Constructor and Description |
|---|
SuperTextArea() |
SuperTextArea(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>> listener) |
SuperTextArea(String label) |
SuperTextArea(String label,
com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>> listener) |
SuperTextArea(String label,
String placeholder) |
SuperTextArea(String label,
String initialValue,
com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>> listener) |
SuperTextArea(String label,
String initialValue,
String placeholder) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addTextSelectionListener(TextSelectionListener<SuperTextArea> listener)
Adds the listener.
|
String |
getTooltipText() |
boolean |
isClearButtonVisible()
Checks if the clear button is currently visible.
|
boolean |
isReceivingSelectionEventsFromClient()
Check if client will inform server on selection change.
|
void |
modifyText(String replacement,
int from,
int to)
Modifies the text at given coordinates.
|
protected void |
onAttach(com.vaadin.flow.component.AttachEvent attachEvent) |
protected void |
onDetach(com.vaadin.flow.component.DetachEvent detachEvent) |
void |
select(int from,
int to)
Selects text starting from index
from (inclusive) and ending at index to (exclusive). |
void |
selectAll()
Selects entire text in the component.
|
void |
selectNone()
Removes the current selection and selects no text.
|
void |
setClearButtonVisible(boolean clearButtonVisible)
Sets the visibility of the clear button.
|
void |
setReceivingSelectionEventsFromClient(boolean receivingSelectionEventsFromClient)
Configures sending events by the client-side component.
|
void |
setTooltipText(String title) |
addValidationStatusChangeListener, getDefaultValidator, getEmptyValue, getErrorMessage, getLabel, getMaxLength, getMinLength, getPattern, getPlaceholder, getValue, getValueChangeMode, getValueChangeTimeout, isAutofocus, isAutoselect, isEnforcedFieldValidationEnabled, isInvalid, isPreventInvalidInput, isRequired, setAutofocus, setAutoselect, setErrorMessage, setInvalid, setLabel, setMaxLength, setMinLength, setPattern, setPlaceholder, setPreventInvalidInput, setRequired, setRequiredIndicatorVisible, setValue, setValueChangeMode, setValueChangeTimeout, validateaddChangeListener, addInvalidChangeListener, addThemeVariants, addToPrefix, addToSuffix, addToTextarea, checkValidity, getAutocapitalizeString, getAutocompleteString, getAutocorrectString, getErrorMessageString, getLabelString, getMaxlengthDouble, getMinlengthDouble, getNameString, getPlaceholderString, isAutofocusBoolean, isAutoselectBoolean, isClearButtonVisibleBoolean, isDisabledBoolean, isInvalidBoolean, isPreventInvalidInputBoolean, isReadonlyBoolean, isRequiredBoolean, remove, removeAll, removeThemeVariants, setAutocapitalize, setAutocomplete, setAutocorrect, setDisabled, setMaxlength, setMinlength, setName, setReadonlygetSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventaddValueChangeListener, isEmpty, setModelValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmodifyText, modifyTextwithoutRequired, withRequired, withRequiredisRequired, setRequiredwithLabelPositiongetLabelPosition, setLabelPositionwithIdwithLabelwithPlaceholdergetPlaceholder, setPlaceholderwithoutReceivingSelectionEventsFromClient, withReceivingSelectionEventsFromClient, withReceivingSelectionEventsFromClientwithClearButtonVisible, withClearButtonVisible, withoutClearButtonVisiblewithHelperComponent, withHelperTextgetHelperComponent, getHelperText, setHelperComponent, setHelperTextwithHelperAbove, withHelperAbove, withHelperBelowisHelperAbove, setHelperAbove, setHelperAbove, setHelperBelowwithValueaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setValuewithTooltipTextgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullgetPrefixComponent, getSuffixComponent, setPrefixComponent, setSuffixComponentaddKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListeneraddCompositionEndListener, addCompositionStartListener, addCompositionUpdateListenergetAutocomplete, setAutocompletegetAutocapitalize, setAutocapitalizeisAutocorrect, setAutocorrectaddClientValidatedEventListeneraddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddFocusShortcut, blur, focus, getTabIndex, setTabIndexaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNamepublic SuperTextArea()
public SuperTextArea(String label)
public SuperTextArea(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>> listener)
public SuperTextArea(String label, com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.textfield.TextArea,String>> listener)
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
onAttach in class com.vaadin.flow.component.textfield.TextAreaprotected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
onDetach in class com.vaadin.flow.component.Componentpublic boolean isReceivingSelectionEventsFromClient()
CanReceiveSelectionEventsFromClientisReceivingSelectionEventsFromClient in interface CanReceiveSelectionEventsFromClienttrue, each selection change in the client-side component will result in this component broadcasting a TextSelectionEvent.public void setReceivingSelectionEventsFromClient(boolean receivingSelectionEventsFromClient)
CanReceiveSelectionEventsFromClientsetReceivingSelectionEventsFromClient in interface CanReceiveSelectionEventsFromClientreceivingSelectionEventsFromClient - When false, selecting text in client-side component will not send an event to server-side component. When true, it will.public void selectAll()
CanSelectTextselectAll in interface CanSelectTextpublic void selectNone()
CanSelectTextselectNone in interface CanSelectTextpublic void select(int from,
int to)
CanSelectTextfrom (inclusive) and ending at index to (exclusive).select in interface CanSelectTextfrom - Starting index (inclusive).to - Ending index (exclusive).public void modifyText(String replacement, int from, int to)
CanModifyTextmodifyText in interface CanModifyTextreplacement - Text to put.from - The starting index of what to replace.to - The end index of what to replace.public com.vaadin.flow.shared.Registration addTextSelectionListener(TextSelectionListener<SuperTextArea> listener)
TextSelectionNotifieraddTextSelectionListener in interface TextSelectionNotifier<SuperTextArea>listener - A listener to add.Registration that can be used to stop listening to the event.public void setTooltipText(String title)
setTooltipText in interface HasTooltippublic String getTooltipText()
getTooltipText in interface HasTooltippublic void setClearButtonVisible(boolean clearButtonVisible)
HasClearButtonsetClearButtonVisible in interface HasClearButtonsetClearButtonVisible in class com.vaadin.flow.component.textfield.TextAreaclearButtonVisible - New state.public boolean isClearButtonVisible()
HasClearButtonisClearButtonVisible in interface HasClearButtonisClearButtonVisible in class com.vaadin.flow.component.textfield.TextAreaCopyright © 2023 Miki. All rights reserved.