Class LayoutBox.Text

  • Enclosing class:
    LayoutBox

    public final class LayoutBox.Text
    extends LayoutBox.Box
    The Text class is a subclass of LayoutBox.Box which is specifically for displaying Text.
    Since:
    1.2
    • Method Detail

      • getStyle

        public PDFStyle getStyle()
        Return the style of this Text item
      • getText

        public String getText()
        Return the content of this Text item as a String.
      • getNextTwin

        public LayoutBox.Text getNextTwin()
        Return the next "twin" of this Text item, or null if none exist. A "twin" is a second (or third, fourth etc.) Text object which was created when a phrase of text was split at the end of the line.
      • setText

        public void setText​(String s)
        Replace the contents of this Text box with a different line of text. This method does not reflow the text, so you need to ensure that the contents of the box are the same length by sticking to digits or using a fixed-width font. This method is not recommended for normal use.
        Since:
        1.2.1