public class RtfElement extends java.lang.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
|
byte[] |
write()
Returns the content of the RtfElement in a byte array.
|
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 byte[] write()
write
in interface RtfBasicElement
public void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
doc
- The RtfDocument to usepublic boolean isInTable()
public void setInTable(boolean inTable)
setInTable
in interface RtfBasicElement
inTable
- True
if this RtfElement is in a table, false
otherwisepublic void setInHeader(boolean inHeader)
setInHeader
in interface RtfBasicElement
inHeader
- True
if this RtfElement is in a header, false
otherwise