Class Text

  • All Implemented Interfaces:
    BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, com.inet.report.ReferenceHolder, TextProperties, java.io.Serializable, java.lang.Cloneable

    public class Text
    extends Element
    implements TextProperties, com.inet.report.ReferenceHolder, HyperlinkProperties, BorderProperties
    This class provides an object that represents a label. It consists of paragraph elements and will be used like a frame for the containing paragraphs. Note that it is not possible to insert a text or a field directly. You have to add it into a paragraph and the paragraph into a text object.
    code example:
     Text text = section.addText(0,0,1000,200);
     Paragraph para = text.addParagraph();
     para.addTextPart("This line has");
     TextPart tPart = para.addTextPart("different ");tPart.setCursive(true);
     para.addTextPart(" format.\n");
     Paragraph paraDyn = text.addParagraph();
     paraDyn.addFieldPart(fields.getDatabaseField(0));
     FieldPart fPart = paraDyn.addFieldPart(fields.getDatabaseField(1));fPart.setFontColor(CoderXML.COLOR_BLUE);
     paraDyn.addTextPart("\n");

    This example inserts a label into the section section and into the label two lines para and paraDyn. Into both lines it inserts three parts, four static texts and two dynamic. The dynamic parts consists of the database fields with idx 0 and 1. Note that you need one single part for each field.

    This class is part of the RDC.
    Since:
    6.0
    See Also:
    Paragraph, TextPart, FieldPart, FieldElement, Section.addText(int, int, int, int), Section.remove(Element), Section.getElements(), Section.getElementsV(), Serialized Form