public class RtfChunk extends RtfElement
Modifier and Type | Field and Description |
---|---|
private RtfColor |
background
An optional background color.
|
private static byte[] |
BACKGROUND_COLOR
Constant for background color.
|
private String |
content
The actual content of this RtfChunk
|
private RtfFont |
font
The font of this RtfChunk
|
private static byte[] |
FONT_END_SUPER_SUBSCRIPT
Constant for the end of sub / superscript flag
|
private static byte[] |
FONT_SUBSCRIPT
Constant for the subscript flag
|
private static byte[] |
FONT_SUPERSCRIPT
Constant for the superscript flag
|
private boolean |
softLineBreaks
Whether to use soft line breaks instead of hard ones.
|
private float |
superSubScript
The super / subscript of this RtfChunk
|
document, inHeader, inTable
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
Constructor and Description |
---|
RtfChunk(RtfDocument doc,
Chunk chunk)
Constructs a RtfChunk based on the content of a Chunk
|
Modifier and Type | Method and Description |
---|---|
boolean |
getSoftLineBreaks()
Gets whether to use soft line breaks instead of default hard ones.
|
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfChunk belongs to.
|
void |
setSoftLineBreaks(boolean softLineBreaks)
Sets whether to use soft line breaks instead of default hard ones.
|
void |
writeContent(OutputStream result)
Writes the content of this RtfChunk.
|
intToByteArray, isInTable, setInHeader, setInTable
private static final byte[] FONT_SUBSCRIPT
private static final byte[] FONT_SUPERSCRIPT
private static final byte[] FONT_END_SUPER_SUBSCRIPT
private static final byte[] BACKGROUND_COLOR
private RtfFont font
private String content
private boolean softLineBreaks
private float superSubScript
private RtfColor background
public RtfChunk(RtfDocument doc, Chunk chunk)
doc
- The RtfDocument that this Chunk belongs tochunk
- The Chunk that this RtfChunk is based onpublic void writeContent(OutputStream result) throws IOException
writeContent
in interface RtfBasicElement
writeContent
in class RtfElement
result
- The OutputStream
to write the content toIOException
public void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
setRtfDocument
in class RtfElement
doc
- The RtfDocument to usepublic void setSoftLineBreaks(boolean softLineBreaks)
softLineBreaks
- whether to use soft line breaks instead of default hard ones.public boolean getSoftLineBreaks()