Class RtfElement
java.lang.Object
com.lowagie.text.rtf.RtfElement
- All Implemented Interfaces:
RtfBasicElement
- Direct Known Subclasses:
RtfAnnotation, RtfBorder, RtfBorderGroup, RtfChunk, RtfCodePage, RtfColor, RtfColorList, RtfDocument, RtfDocumentHeader, RtfFontList, RtfFootnoteSetting, RtfGenerator, RtfImage, RtfInfoElement, RtfInfoGroup, RtfList, RtfListLevel, RtfListTable, RtfNewPage, RtfPageSetting, RtfPhrase, RtfPictureList, RtfProtectionSetting, RtfRow, RtfSection, RtfStylesheetList, RtfTable
RtfElement is the base class for all RTF Element classes
- Version:
- $Id:RtfElement.java 3126 2008-02-07 20:30:46Z hallm $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RtfDocumentThe RtfDocument this RtfElement belongs toprotected booleanWhether this RtfElement is in a headerprotected booleanWhether this RtfElement is in a tableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionRtfElement(RtfDocument doc) Constructs a RtfElement belonging to the specified RtfDocument. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]intToByteArray(int i) Transforms an integer into its String representation and then returns the bytes of that string.booleanGets whether this RtfElement is in a tablevoidsetInHeader(boolean inHeader) Sets whether this RtfElement is in a headervoidsetInTable(boolean inTable) Sets whether this RtfElement is in a tablevoidSets the RtfDocument this RtfElement belongs toabstract voidwriteContent(OutputStream out) Writes the element content to the given output stream.
-
Field Details
-
document
The RtfDocument this RtfElement belongs to -
inTable
protected boolean inTableWhether this RtfElement is in a table -
inHeader
protected boolean inHeaderWhether this RtfElement is in a header
-
-
Constructor Details
-
RtfElement
Constructs a RtfElement belonging to the specified RtfDocument.- Parameters:
doc- The RtfDocument this RtfElement belongs to
-
-
Method Details
-
intToByteArray
public byte[] intToByteArray(int i) Transforms an integer into its String representation and then returns the bytes of that string.- Parameters:
i- The integer to convert- Returns:
- A byte array representing the integer
-
writeContent
Writes the element content to the given output stream.- Specified by:
writeContentin interfaceRtfBasicElement- Parameters:
out- TheOutputStreamto write the content to- Throws:
IOException
-
setRtfDocument
Sets the RtfDocument this RtfElement belongs to- Specified by:
setRtfDocumentin interfaceRtfBasicElement- Parameters:
doc- The RtfDocument to use
-
isInTable
public boolean isInTable()Gets whether this RtfElement is in a table- Returns:
- Whether this RtfElement is in a table
-
setInTable
public void setInTable(boolean inTable) Sets whether this RtfElement is in a table- Specified by:
setInTablein interfaceRtfBasicElement- Parameters:
inTable-Trueif this RtfElement is in a table,falseotherwise
-
setInHeader
public void setInHeader(boolean inHeader) Sets whether this RtfElement is in a header- Specified by:
setInHeaderin interfaceRtfBasicElement- Parameters:
inHeader-Trueif this RtfElement is in a header,falseotherwise
-