Class RtfParagraph
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.text.RtfPhrase
com.lowagie.text.rtf.text.RtfParagraph
- All Implemented Interfaces:
RtfBasicElement
- Direct Known Subclasses:
RtfListItem
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 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]Constant for the end of a paragraphprotected final RtfParagraphStyleAn optional RtfParagraphStyle to use for styling.Fields inherited from class RtfPhrase
chunks, IN_TABLE, LINE_SPACING, PARAGRAPH_DEFAULTS, PLAINFields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionRtfParagraph(RtfDocument doc, com.lowagie.text.Paragraph paragraph) Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph. -
Method Summary
Modifier and TypeMethodDescriptionintGets the left indentation of this RtfParagraph.intGets 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.Methods inherited from class RtfPhrase
setInHeader, setInTable, setRtfDocumentMethods inherited from class RtfElement
intToByteArray, isInTable
-
Field Details
-
PARAGRAPH
public static final byte[] PARAGRAPHConstant for the end of a paragraph -
paragraphStyle
An optional RtfParagraphStyle to use for styling.
-
-
Constructor Details
-
RtfParagraph
Constructs a RtfParagraph belonging to a RtfDocument based on a Paragraph.- Parameters:
doc- The RtfDocument this RtfParagraph belongs toparagraph- The Paragraph that this RtfParagraph is based on
-
-
Method Details
-
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
Writes the content of this RtfParagraph. First paragraph specific data is written and then the RtfChunks of this RtfParagraph are added.- Specified by:
writeContentin interfaceRtfBasicElement- Overrides:
writeContentin classRtfPhrase- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
getIndentLeft
public int getIndentLeft()Gets the left indentation of this RtfParagraph.- Returns:
- The left indentation.
-
setIndentLeft
public void setIndentLeft(int indentLeft) Sets the left indentation of this RtfParagraph.- Parameters:
indentLeft- The left indentation to use.
-
getIndentRight
public int getIndentRight()Gets the right indentation of this RtfParagraph.- Returns:
- The right indentation.
-
setIndentRight
public void setIndentRight(int indentRight) Sets the right indentation of this RtfParagraph.- Parameters:
indentRight- The right indentation to use.
-