com.lowagie.text.rtf

Class RtfTOC

public class RtfTOC extends Chunk implements RtfField

Deprecated: Please move to the RtfWriter2 and associated classes. com.lowagie.text.rtf.field.RtfTableOfContents replaces the functionality of this class.

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. ONLY FOR USE WITH THE RtfWriter NOT with the RtfWriter2. This class is based on the RtfWriter-package from Mark Hall.

Version: $Revision: 2698 $Date: 2007/03/15 19:26:36 $

Author: Steffen.Stundzig (Steffen.Stundzig@smb-tec.com)

Field Summary
booleanaddTOCAsTOCEntry
StringdefaultText
FontentryFont
StringentryName
Constructor Summary
RtfTOC(String tocName, Font tocFont)
Method Summary
voidaddTOCAsTOCEntry(String entryName, Font entryFont)
Add a toc entry
voidsetDefaultText(String text)
Sets the default text of the Table of Contents
voidwrite(RtfWriter writer, OutputStream out)

Field Detail

addTOCAsTOCEntry

private boolean addTOCAsTOCEntry

defaultText

private String defaultText

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

addTOCAsTOCEntry

public void addTOCAsTOCEntry(String entryName, Font entryFont)
Add a toc entry

Parameters: entryName the name of the entry entryFont the font to be used for the entry

setDefaultText

public void setDefaultText(String text)
Sets the default text of the Table of Contents

Parameters: text the default text

write

public void write(RtfWriter writer, OutputStream out)

See Also: RtfField