Package com.tonic.vellum.widget
Class TextSection
- java.lang.Object
-
- com.tonic.vellum.Section
-
- com.tonic.vellum.widget.TextSection
-
public final class TextSection extends Section
Multi-line static or settable text, drawn top-down. Lines split on\n; optional word wrapping.
-
-
Constructor Summary
Constructors Constructor Description TextSection(java.lang.String text)Creates a text section.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextSectionsetText(java.lang.String text)Sets the text.TextSectionstyle(Style style)Sets the text style.TextSectionwrap(boolean wrap)Enables width-aware word wrapping (default off).
-
-
-
Method Detail
-
setText
public TextSection setText(java.lang.String text)
Sets the text. The text is split into lines on\n.- Parameters:
text- the new text- Returns:
- this TextSection for chaining
-
style
public TextSection style(Style style)
Sets the text style.- Parameters:
style- the style- Returns:
- this TextSection for chaining
-
wrap
public TextSection wrap(boolean wrap)
Enables width-aware word wrapping (default off).- Parameters:
wrap-trueto enable wrapping- Returns:
- this TextSection for chaining
-
-