com.lowagie.text.rtf.text

Class RtfPhrase

public class RtfPhrase extends RtfElement

The RtfPhrase contains multiple RtfChunks

Version: $Id: RtfPhrase.java 3580 2008-08-06 15:52:00Z howard_s $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
protected ArrayListchunks
ArrayList containing the RtfChunks of this RtfPhrase
static byte[]IN_TABLE
Constant for phrase in a table indication
intlineLeading
The height of each line.
static byte[]LINE_SPACING
Constant for the line spacing.
static byte[]PARAGRAPH_DEFAULTS
Constant for the resetting of the paragraph defaults
static byte[]PLAIN
Constant for resetting of font settings to their defaults
Constructor Summary
protected RtfPhrase(RtfDocument doc)
A basically empty constructor that is used by the RtfParagraph.
RtfPhrase(RtfDocument doc, Phrase phrase)
Constructs a new RtfPhrase for the RtfDocument with the given Phrase
Method Summary
voidsetInHeader(boolean inHeader)
Sets whether this RtfPhrase is in a header.
voidsetInTable(boolean inTable)
Sets whether this RtfPhrase is in a table.
voidsetRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfPhrase belongs to.
voidwriteContent(OutputStream result)
Write the content of this RtfPhrase.

Field Detail

chunks

protected ArrayList chunks
ArrayList containing the RtfChunks of this RtfPhrase

IN_TABLE

public static final byte[] IN_TABLE
Constant for phrase in a table indication

lineLeading

private int lineLeading
The height of each line.

LINE_SPACING

public static final byte[] LINE_SPACING
Constant for the line spacing.

PARAGRAPH_DEFAULTS

public static final byte[] PARAGRAPH_DEFAULTS
Constant for the resetting of the paragraph defaults

PLAIN

public static final byte[] PLAIN
Constant for resetting of font settings to their defaults

Constructor Detail

RtfPhrase

protected RtfPhrase(RtfDocument doc)
A basically empty constructor that is used by the RtfParagraph.

Parameters: doc The RtfDocument this RtfPhrase belongs to.

RtfPhrase

public RtfPhrase(RtfDocument doc, Phrase phrase)
Constructs a new RtfPhrase for the RtfDocument with the given Phrase

Parameters: doc The RtfDocument this RtfPhrase belongs to phrase The Phrase this RtfPhrase is based on

Method Detail

setInHeader

public void setInHeader(boolean inHeader)
Sets whether this RtfPhrase is in a header. Sets the correct inTable setting for all child elements.

Parameters: inHeader True if this RtfPhrase is in a header, false otherwise

setInTable

public void setInTable(boolean inTable)
Sets whether this RtfPhrase is in a table. Sets the correct inTable setting for all child elements.

Parameters: inTable True if this RtfPhrase is in a table, false otherwise

setRtfDocument

public void setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfPhrase belongs to. Also sets the RtfDocument for all child elements.

Parameters: doc The RtfDocument to use

writeContent

public void writeContent(OutputStream result)
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.