com.lowagie.text.rtf
Class RtfTOC

java.lang.Object
  extended bycom.lowagie.text.Chunk
      extended bycom.lowagie.text.rtf.RtfTOC
All Implemented Interfaces:
Element, MarkupAttributes, RtfField

public class RtfTOC
extends Chunk
implements RtfField

This class can be used to insert a table of contents into the RTF document. Therefore the field TOC is used. It works great in Word 2000. StarOffice doesn't support such fields. Other word version are not tested yet. This class is based on the RtfWriter-package from Mark Hall.

Version:
$Revision: 1.9 $Date: 2004/02/07 10:29:03 $
Author:
Steffen.Stundzig@smb-tec.com

Field Summary
private  boolean addTOCAsTOCEntry
           
private  String defaultText
           
private  Font entryFont
           
private  String entryName
           
 
Fields inherited from class com.lowagie.text.Chunk
ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, markupAttributes, NEWLINE, NEWPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE
 
Fields inherited from interface com.lowagie.text.Element
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, CHAPTER, CHUNK, CREATIONDATE, CREATOR, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE
 
Constructor Summary
RtfTOC(String tocName, Font tocFont)
           
 
Method Summary
 void addTOCAsTOCEntry(String entryName, Font entryFont)
           
 void setDefaultText(String text)
           
 void write(RtfWriter writer, OutputStream out)
           
 
Methods inherited from class com.lowagie.text.Chunk
addToArray, append, content, font, getAttributes, getChunks, getImage, getKeySet, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, hasAttributes, isEmpty, isTag, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setFont, setGenericTag, setHyphenation, setLocalDestination, setLocalGoto, setMarkupAttribute, setMarkupAttributes, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.Element
toString
 

Field Detail

defaultText

private String defaultText

addTOCAsTOCEntry

private boolean addTOCAsTOCEntry

entryFont

private Font entryFont

entryName

private String entryName
Constructor Detail

RtfTOC

public RtfTOC(String tocName,
              Font tocFont)
Parameters:
tocName - the headline of the table of contents
tocFont - the font for the headline
Method Detail

write

public void write(RtfWriter writer,
                  OutputStream out)
           throws IOException
Specified by:
write in interface RtfField
Throws:
IOException

addTOCAsTOCEntry

public void addTOCAsTOCEntry(String entryName,
                             Font entryFont)

setDefaultText

public void setDefaultText(String text)