Class TextSection


  • public final class TextSection
    extends Section
    Multi-line static or settable text, drawn top-down. Lines split on \n; optional word wrapping.
    • Constructor Detail

      • TextSection

        public TextSection​(java.lang.String text)
        Creates a text section. The text is split into lines on \n.
        Parameters:
        text - the initial text
    • 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 - true to enable wrapping
        Returns:
        this TextSection for chaining