public interface HasText extends HasElement
The default implementations set the text as text content of
HasElement.getElement(). Override all methods in this interface if the text
should be added to some other element.
| Modifier and Type | Interface and Description |
|---|---|
static class |
HasText.WhiteSpace
Represents
"white-space" style values. |
| Modifier and Type | Method and Description |
|---|---|
default String |
getText()
Gets the text content of this component.
|
default HasText.WhiteSpace |
getWhiteSpace()
Gets the
"white-space" style value. |
default void |
setText(String text)
Sets the given string as the content of this component.
|
default void |
setWhiteSpace(HasText.WhiteSpace value)
Sets the given
value as "white-space" style value. |
getElementdefault void setText(String text)
HasComponents.add(Component...) with the Text component
for the textual parts.text - the text content to setdefault String getText()
nulldefault void setWhiteSpace(HasText.WhiteSpace value)
value as "white-space" style value.value - the "white-space" style value, not nulldefault HasText.WhiteSpace getWhiteSpace()
"white-space" style value.
The default value is WhiteSpace#NORMAL. If the
"white-space" style value is non standard then null is
returned.
"white-space" style value, may be nullCopyright © 2023. All rights reserved.