|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.document.RtfDocument
The RtfDocument stores all document related data and also the main data stream. INTERNAL CLASS - NOT TO BE USED DIRECTLY Version: $Id: RtfDocument.java,v 1.10 2005/02/02 18:08:20 hallm Exp $
Field Summary | |
---|---|
private boolean |
autogenerateTOCEntries
Whether to automatically generate TOC entries for Chapters and Sections. |
private RtfDataCache |
data
Stores the actual document data |
private boolean |
dataWritten
Whether data has been written to the RtfDataCache. |
private RtfDocumentHeader |
documentHeader
The RtfDocumentHeader that handles all document header methods |
private RtfMapper |
mapper
The RtfMapper to use in this RtfDocument |
private ArrayList |
previousRandomInts
Stores integers that have been generated as unique random numbers |
private static byte[] |
RTF_DOCUMENT
Constant for the Rtf document start |
Fields inherited from class com.lowagie.text.rtf.RtfElement |
---|
document, inHeader, inTable |
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement |
---|
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR |
Constructor Summary | |
---|---|
RtfDocument()
The default constructor for a RtfDocument |
Method Summary | |
---|---|
void |
add(RtfBasicElement element)
Adds an element to the rtf document |
String |
filterSpecialChar(String str,
boolean useHex,
boolean softLineBreaks)
Replaces special characters with their unicode values |
boolean |
getAutogenerateTOCEntries()
Get whether to autmatically generate table of contents entries |
RtfDocumentHeader |
getDocumentHeader()
Gets the RtfDocumentHeader of this RtfDocument |
RtfMapper |
getMapper()
Gets the RtfMapper object of this RtfDocument |
int |
getRandomInt()
Generates a random integer that is unique with respect to the document. |
void |
setAutogenerateTOCEntries(boolean autogenerate)
Whether to automagically generate table of contents entries when adding Chapters or Sections. |
void |
setDataCacheStyle(int dataCacheStyle)
Sets the rtf data cache style to use. |
byte[] |
writeDocument()
Writes the document |
Methods inherited from class com.lowagie.text.rtf.RtfElement |
---|
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private RtfDataCache data
private RtfMapper mapper
private RtfDocumentHeader documentHeader
private ArrayList previousRandomInts
private boolean autogenerateTOCEntries
private boolean dataWritten
private static final byte[] RTF_DOCUMENT
Constructor Detail |
public RtfDocument()
Method Detail |
public byte[] writeDocument()
public void add(RtfBasicElement element)
element
- The element to addpublic RtfMapper getMapper()
public int getRandomInt()
public RtfDocumentHeader getDocumentHeader()
public String filterSpecialChar(String str, boolean useHex, boolean softLineBreaks)
str
- The original String
useHex
- indicated if the hexadecimal value has to be usedsoftLineBreaks
- whether to use soft line breaks instead of default hard ones.
public void setAutogenerateTOCEntries(boolean autogenerate)
autogenerate
- Whether to automatically generate TOC entriespublic boolean getAutogenerateTOCEntries()
public void setDataCacheStyle(int dataCacheStyle) throws DocumentException, IOException
dataCacheStyle
- The style to use.
DocumentException
- If data has already been written into the data cache.
IOException
- If the disk cache could not be initialised.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |