com.aspose.note

Class TextRun



  • public class TextRun
    extends Object

    The class representing a piece of text with associated style.

    • Constructor Detail

      • TextRun

        public TextRun(String text,
                       TextStyle style)

        Initializes a new instance of the TextRun class.

        Parameters:
        text - The associated text.
        style - The style.
      • TextRun

        public TextRun(String text)

        Initializes a new instance of the TextRun class with default style.

        Parameters:
        text - The associated text.
      • TextRun

        public TextRun(TextStyle style)

        Initializes a new instance of the TextRun class with empty text.

        Parameters:
        style - The style.
      • TextRun

        public TextRun()

        Initializes a new instance of the TextRun class with empty text and default style.

    • Method Detail

      • getText

        public final String getText()

        Gets the text.

      • setText

        public final void setText(String value)

        Sets the text.

      • getStyle

        public final TextStyle getStyle()

        Gets the style.

      • setStyle

        public final void setStyle(TextStyle value)

        Sets the style.

      • getLength

        public final int getLength()

        Gets the length of the associated text.