Package com.storedobject.vaadin.util
Interface HasTextValue
- All Superinterfaces:
com.vaadin.flow.component.textfield.HasAutocomplete
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasSize
,com.vaadin.flow.component.HasStyle
,com.vaadin.flow.component.HasText
,Serializable
,SpellCheck
- All Known Implementing Classes:
ActionTextField
,CurrencyField
,GridSearchField
,SearchField
,TextArea
,TextField
,TreeSearchField
public interface HasTextValue
extends com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasText, SpellCheck, com.vaadin.flow.component.textfield.HasAutocomplete
Interface representing a component that can have a textual value along with additional
features like size, text transformation, spell check, and autocomplete.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpace
-
Field Summary
Fields inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
AUTOCOMPLETE_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Convert a string to camelcase.default void
Capitalize (camelcase) words while inputting.default String
getText()
getValue()
Retrieves the textual value associated with the component.void
inputTypeSet
(int type) This method is invoked whenever the type of input is set.default void
Convert input into lowercase characters.default void
normal()
Remove text transformation if any.void
setMaxLength
(int width) Sets the maximum length for the textual value of the component.void
setMinLength
(int width) Sets the minimum number of characters that can be entered into the specified component.void
setPattern
(String pattern) Sets the pattern used to validate the input value.default void
void
Sets the textual value for the component.default void
Convert input into uppercase characters.Methods inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
getAutocomplete, setAutocomplete
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
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.HasText
getWhiteSpace, setWhiteSpace
Methods inherited from interface com.storedobject.vaadin.SpellCheck
setSpellCheck
-
Method Details
-
setValue
Sets the textual value for the component.- Parameters:
value
- the text value to be set
-
getValue
String getValue()Retrieves the textual value associated with the component.- Returns:
- the current value of the component as a String.
-
setMinLength
void setMinLength(int width) Sets the minimum number of characters that can be entered into the specified component.- Parameters:
width
- the minimum number of characters allowed
-
setMaxLength
void setMaxLength(int width) Sets the maximum length for the textual value of the component.- Parameters:
width
- the maximum number of characters allowed
-
setPattern
Sets the pattern used to validate the input value.- Parameters:
pattern
- the regular expression pattern that the input value must conform to
-
setText
- Specified by:
setText
in interfacecom.vaadin.flow.component.HasText
-
getText
- Specified by:
getText
in interfacecom.vaadin.flow.component.HasText
-
uppercase
default void uppercase()Convert input into uppercase characters. -
lowercase
default void lowercase()Convert input into lowercase characters. -
capitalize
default void capitalize()Capitalize (camelcase) words while inputting. -
normal
default void normal()Remove text transformation if any. -
inputTypeSet
void inputTypeSet(int type) This method is invoked whenever the type of input is set.- Parameters:
type
- Type of input - 0: Normal, 1: Lowercase, 2: Uppercase, 3: Camelcase
-
camelcase
-