com.lowagie.text.rtf.text

Class RtfParagraph

public class RtfParagraph extends RtfPhrase

The RtfParagraph is an extension of the RtfPhrase that adds alignment and indentation properties. It wraps a Paragraph.

Version: $Id: RtfParagraph.java 3670 2009-02-01 09:13:48Z blowagie $

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

Field Summary
protected RtfParagraphStyleparagraphStyle
An optional RtfParagraphStyle to use for styling.
static byte[]PARAGRAPH
Constant for the end of a paragraph
Constructor Summary
RtfParagraph(RtfDocument doc, Paragraph paragraph)
Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph.
Method Summary
intgetIndentLeft()
Gets the left indentation of this RtfParagraph.
intgetIndentRight()
Gets the right indentation of this RtfParagraph.
voidsetIndentLeft(int indentLeft)
Sets the left indentation of this RtfParagraph.
voidsetIndentRight(int indentRight)
Sets the right indentation of this RtfParagraph.
voidsetKeepTogetherWithNext(boolean keepTogetherWithNext)
Set whether this RtfParagraph must stay on the same page as the next one.
voidwriteContent(OutputStream result)
Writes the content of this RtfParagraph.

Field Detail

paragraphStyle

protected RtfParagraphStyle paragraphStyle
An optional RtfParagraphStyle to use for styling.

PARAGRAPH

public static final byte[] PARAGRAPH
Constant for the end of a paragraph

Constructor Detail

RtfParagraph

public RtfParagraph(RtfDocument doc, Paragraph paragraph)
Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph.

Parameters: doc The RtfDocument this RtfParagraph belongs to paragraph The Paragraph that this RtfParagraph is based on

Method Detail

getIndentLeft

public int getIndentLeft()
Gets the left indentation of this RtfParagraph.

Returns: The left indentation.

getIndentRight

public int getIndentRight()
Gets the right indentation of this RtfParagraph.

Returns: The right indentation.

setIndentLeft

public void setIndentLeft(int indentLeft)
Sets the left indentation of this RtfParagraph.

Parameters: indentLeft The left indentation to use.

setIndentRight

public void setIndentRight(int indentRight)
Sets the right indentation of this RtfParagraph.

Parameters: indentRight The right indentation to use.

setKeepTogetherWithNext

public void setKeepTogetherWithNext(boolean keepTogetherWithNext)
Set whether this RtfParagraph must stay on the same page as the next one.

Parameters: keepTogetherWithNext Whether this RtfParagraph must keep together with the next.

writeContent

public void writeContent(OutputStream result)
Writes the content of this RtfParagraph. First paragraph specific data is written and then the RtfChunks of this RtfParagraph are added.