Class RichTextBuilder<T extends RichTextBuilder>

java.lang.Object
com.nomagic.text.builders.AbstractTextBuilder<T>
com.nomagic.text.builders.RichTextBuilder<T>
All Implemented Interfaces:
TextBuilder<T>
Direct Known Subclasses:
ColoredRichTextBuilder

@OpenApiAll public class RichTextBuilder<T extends RichTextBuilder> extends AbstractTextBuilder<T>
A builder used for rich text building. Colored fragments are not supported.
  • Constructor Details

    • RichTextBuilder

      public RichTextBuilder()
  • Method Details

    • compress

      public void compress(int textLength)
      Description copied from interface: TextBuilder
      Compress current text to the given length. This function is not supported in every implementation, so it can be ignored.
      Parameters:
      textLength - text length
    • toAppendableText

      protected String toAppendableText(String text)
      Overrides:
      toAppendableText in class AbstractTextBuilder<T extends RichTextBuilder>
    • toPlainText

      public String toPlainText()
      Returns:
      result string as plain text