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. |
getElement
default void setText(String text)
HasComponents.add(Component...)
with the Text
component
for the textual parts.text
- the text content to setdefault String getText()
null
default void setWhiteSpace(HasText.WhiteSpace value)
value
as "white-space"
style value.value
- the "white-space"
style value, not null
default 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 null
Copyright © 2022. All rights reserved.