public abstract class RtfAddableElement extends Chunk implements RtfBasicElement
Modifier and Type | Field and Description |
---|---|
protected RtfDocument |
doc
The RtfDocument this RtfAddableElement belongs to.
|
protected boolean |
inHeader
Whether this RtfAddableElement is contained in a header.
|
protected boolean |
inTable
Whether this RtfAddableElement is contained in a table.
|
ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, CHAR_SPACING, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, TEXTRENDERMODE, UNDERLINE
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CREATIONDATE, CREATOR, HEADER, CHAPTER, CHUNK, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK
Constructor and Description |
---|
RtfAddableElement()
Constructs a new RtfAddableElement.
|
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 |
isEmpty()
RtfAddableElement subclasses are never assumed to be empty.
|
void |
setInHeader(boolean inHeader)
Sets whether this RtfAddableElement is contained in a header/footer.
|
void |
setInTable(boolean inTable)
Sets whether this RtfAddableElement is contained in a table.
|
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfAddableElement belongs to.
|
abstract void |
writeContent(OutputStream out)
Writes the element content to the given output stream.
|
append, getAttributes, getContent, getFont, getHorizontalScaling, getHyphenation, getCharacterSpacing, getChunks, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setAttributes, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setCharacterSpacing, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type
protected RtfDocument doc
protected boolean inTable
protected boolean inHeader
public RtfAddableElement()
public abstract void writeContent(OutputStream out) throws IOException
writeContent
in interface RtfBasicElement
out
- The OutputStream
to write the content toIOException
public void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
doc
- The @link{com.lowagie.text.rtf.document.RtfDocument} this RtfElement
belongs topublic void setInTable(boolean inTable)
setInTable
in interface RtfBasicElement
inTable
- Whether this RtfBasicElement is in a tablepublic void setInHeader(boolean inHeader)
setInHeader
in interface RtfBasicElement
inHeader
- Whether this RtfBasicElement is in a headerpublic byte[] intToByteArray(int i)
i
- The integer to convertCopyright © 2015. All rights reserved.