Package com.lowagie.text.rtf.text
Class RtfPhrase
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.text.RtfPhrase
- All Implemented Interfaces:
RtfBasicElement
- Direct Known Subclasses:
RtfFootnote,RtfParagraph
The RtfPhrase contains multiple RtfChunks
- Version:
- $Id: RtfPhrase.java 3580 2008-08-06 15:52:00Z howard_s $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayList<RtfBasicElement>ArrayList containing the RtfChunks of this RtfPhrasestatic final byte[]Constant for phrase in a table indicationstatic final byte[]Constant for the line spacing.private intThe height of each line.static final byte[]Constant for the resetting of the paragraph defaultsstatic final byte[]Constant for resetting of font settings to their defaultsFields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTableFields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRtfPhrase(RtfDocument doc) A basically empty constructor that is used by the RtfParagraph.RtfPhrase(RtfDocument doc, com.lowagie.text.Phrase phrase) Constructs a new RtfPhrase for the RtfDocument with the given Phrase -
Method Summary
Modifier and TypeMethodDescriptionvoidsetInHeader(boolean inHeader) Sets whether this RtfPhrase is in a header.voidsetInTable(boolean inTable) Sets whether this RtfPhrase is in a table.voidSets the RtfDocument this RtfPhrase belongs to.voidwriteContent(OutputStream result) Write the content of this RtfPhrase.Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable
-
Field Details
-
PARAGRAPH_DEFAULTS
public static final byte[] PARAGRAPH_DEFAULTSConstant for the resetting of the paragraph defaults -
PLAIN
public static final byte[] PLAINConstant for resetting of font settings to their defaults -
IN_TABLE
public static final byte[] IN_TABLEConstant for phrase in a table indication -
LINE_SPACING
public static final byte[] LINE_SPACINGConstant for the line spacing. -
chunks
ArrayList containing the RtfChunks of this RtfPhrase -
lineLeading
private int lineLeadingThe height of each line.
-
-
Constructor Details
-
RtfPhrase
A basically empty constructor that is used by the RtfParagraph.- Parameters:
doc- The RtfDocument this RtfPhrase belongs to.
-
RtfPhrase
Constructs a new RtfPhrase for the RtfDocument with the given Phrase- Parameters:
doc- The RtfDocument this RtfPhrase belongs tophrase- The Phrase this RtfPhrase is based on
-
-
Method Details
-
writeContent
Write the content of this RtfPhrase. First resets to the paragraph defaults then if the RtfPhrase is in a RtfCell a marker for this is written and finally the RtfChunks of this RtfPhrase are written.- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
setInTable
public void setInTable(boolean inTable) Sets whether this RtfPhrase is in a table. Sets the correct inTable setting for all child elements.- Specified by:
setInTablein interfaceRtfBasicElement- Overrides:
setInTablein classRtfElement- Parameters:
inTable-Trueif this RtfPhrase is in a table,falseotherwise
-
setInHeader
public void setInHeader(boolean inHeader) Sets whether this RtfPhrase is in a header. Sets the correct inTable setting for all child elements.- Specified by:
setInHeaderin interfaceRtfBasicElement- Overrides:
setInHeaderin classRtfElement- Parameters:
inHeader-Trueif this RtfPhrase is in a header,falseotherwise
-
setRtfDocument
Sets the RtfDocument this RtfPhrase belongs to. Also sets the RtfDocument for all child elements.- Specified by:
setRtfDocumentin interfaceRtfBasicElement- Overrides:
setRtfDocumentin classRtfElement- Parameters:
doc- The RtfDocument to use
-