Class TextPart

All Implemented Interfaces:
FontProperties, GeneralProperties, NodeParser, com.inet.report.ReferenceHolder, Serializable, Cloneable

public class TextPart extends AbstractFontElement
The text objects in a report are separated into parts of text, where each part has its own format, i.e. color and size. This elements are called text parts and are represented by this class. Note that it is not possible to instantiate this class directly. Please use the Paragraph.addTextPart(String) method from class Paragraph instead.
example: adding the line "hello World" into a text

 TextPart tPartHello = paragraph.addTextPart("hello ");
 TextPart tPartWorld = paragraph.addTextPart("World");
 tPartWorld.setFontBold(true);

paragraph is a reference to a line of a text you want to insert. The method addTextPart creates a new instance of TextPart, initialize it with the given String and formats it with default. The method saves one reference to the new TextPart into paragraph and returns one. In the example it happens twice times, because the two parts get different format. If the whole String should use the same format add only one TextPart with both words.

This class is part of the RDC.
Since:
6.0
See Also: