public abstract class RtfElement extends Object implements RtfBasicElement
| Modifier and Type | Field and Description |
|---|---|
protected RtfDocument |
document
The RtfDocument this RtfElement belongs to
|
protected boolean |
inHeader
Whether this RtfElement is in a header
|
protected boolean |
inTable
Whether this RtfElement is in a table
|
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR| Constructor and Description |
|---|
RtfElement(RtfDocument doc)
Constructs a RtfElement belonging to the specified RtfDocument.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
intToByteArray(int i)
Transforms an integer into its String representation and then returns the bytes
of that string.
|
boolean |
isInTable()
Gets whether this RtfElement is in a table
|
void |
setInHeader(boolean inHeader)
Sets whether this RtfElement is in a header
|
void |
setInTable(boolean inTable)
Sets whether this RtfElement is in a table
|
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfElement belongs to
|
abstract void |
writeContent(OutputStream out)
Writes the element content to the given output stream.
|
protected RtfDocument document
protected boolean inTable
protected boolean inHeader
public RtfElement(RtfDocument doc)
doc - The RtfDocument this RtfElement belongs topublic byte[] intToByteArray(int i)
i - The integer to convertpublic abstract void writeContent(OutputStream out) throws IOException
writeContent in interface RtfBasicElementout - The OutputStream to write the content toIOExceptionpublic void setRtfDocument(RtfDocument doc)
setRtfDocument in interface RtfBasicElementdoc - The RtfDocument to usepublic boolean isInTable()
public void setInTable(boolean inTable)
setInTable in interface RtfBasicElementinTable - True if this RtfElement is in a table, false otherwisepublic void setInHeader(boolean inHeader)
setInHeader in interface RtfBasicElementinHeader - True if this RtfElement is in a header, false otherwiseCopyright © 2015. All rights reserved.