Class TextElement

    • Method Detail

      • text

        public static TextElement text​(String format,
                                       InlineElement... elements)
        Creates a block of text with placeholders ("%s") that will be replaced with proper string representation of given InlineElement. For example:

        text("This is a text with a link %s", link("https://somepage", "to here"))

        Parameters:
        format - text with placeholders for elements
        elements - elements to be put in the text
        Returns:
        block of text
      • text

        public static TextElement text​(String text)
        Creates a simple block of text.
        Parameters:
        text - a simple block of text
        Returns:
        block of text
      • code

        public static TextElement code​(String text)
        Creates a block of text formatted as code.
        Parameters:
        text - a block of text that will be formatted as code
        Returns:
        block of text formatted as code
      • getFormat

        public String getFormat()
      • format

        public void format​(Formatter formatter)