Class Paragraph

All Implemented Interfaces:
ContentLogger, Serializable

public class Paragraph extends Sequence

This content is rendered as a paragraph. A subsequent content will begin after a line break and (depending on the renderer) after some vertical distance. A Paragraph serves as a container for several Contents that have Content.isInlineContent() returning true.

Usage example:

        Sequence sq= new Sequence();
  Paragraph para= new Paragraph(Inline.format(includeSpec, 
             "Expected return value from '%s': %f. Observed: %f.", avgMethodName, expected, observed)));
  para.formatInlineItem(includeSpec, FontWeightAndStyle.smaller(), " Here comes some debug information ...");
  sq.addItem(para);
See Also:
  • Constructor Details

    • Paragraph

      public Paragraph()
      Create an empty paragraph.
    • Paragraph

      public Paragraph(IncludeSpec includeSpec, String firstInlineData)
      Create a paragraph with a first inline content with normal font style.
      Parameters:
      includeSpec - the include spec of the first inline content
      firstInlineData - the text of the first inline content
    • Paragraph

      public Paragraph(IncludeSpec includeSpec, String firstInlineData, FontWeightAndStyle fwas)
      Create a paragraph with a first inline content with given font style.
      Parameters:
      includeSpec - the include Spec of the first inline content
      firstInlineData - the text of the first inline content
      fwas - the font of the first inline content
    • Paragraph

      public Paragraph(Inline firstInline)
      Create a paragraph with a first inline content.
      Parameters:
      firstInline - the first inline content
  • Method Details