Class Text

All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasStyle, HasText, Serializable

public class Text extends Component implements HasText
A component which encapsulates the given text in a text node.

Text node doesn't support setting any attribute or property so you may not use Element API (and Text doesn't provide any such contract) for setting attribute/property. It implies that you may not style this component as well. Any attempt to set attribute/property value throws an exception. The only available API for a Text component is set a text.

If you need a text component which can be styled then check Span class (from flow-html-components) module.

Since:
1.0
Author:
Vaadin Ltd
See Also: