com.lowagie.text.rtf.style

Class RtfStylesheetList

public class RtfStylesheetList extends RtfElement implements RtfExtendedElement

The RtfStylesheetList stores the RtfParagraphStyles that are used in the document.

Version: $Id: RtfStylesheetList.java 3440 2008-05-25 18:16:48Z howard_s $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) Thomas Bickel (tmb99@inode.at)

Field Summary
booleandefaultsLoaded
Whether the default settings have been loaded.
HashMapstyleMap
The HashMap containing the RtfParagraphStyles.
Constructor Summary
RtfStylesheetList(RtfDocument doc)
Constructs a new RtfStylesheetList for the RtfDocument.
Method Summary
RtfParagraphStylegetRtfParagraphStyle(String styleName)
Gets the RtfParagraphStyle with the given name.
voidregisterDefaultStyles()
Registers all default styles.
voidregisterParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
Register a RtfParagraphStyle with this RtfStylesheetList.
voidwriteContent(OutputStream out)
unused
voidwriteDefinition(OutputStream result)
Writes the definition of the stylesheet list.

Field Detail

defaultsLoaded

private boolean defaultsLoaded
Whether the default settings have been loaded.

styleMap

private HashMap styleMap
The HashMap containing the RtfParagraphStyles.

Constructor Detail

RtfStylesheetList

public RtfStylesheetList(RtfDocument doc)
Constructs a new RtfStylesheetList for the RtfDocument.

Parameters: doc The RtfDocument this RtfStylesheetList belongs to.

Method Detail

getRtfParagraphStyle

public RtfParagraphStyle getRtfParagraphStyle(String styleName)
Gets the RtfParagraphStyle with the given name. Makes sure that the defaults have been loaded.

Parameters: styleName The name of the RtfParagraphStyle to get.

Returns: The RtfParagraphStyle with the given name or null.

registerDefaultStyles

private void registerDefaultStyles()
Registers all default styles. If styles with the given name have already been registered, then they are NOT overwritten.

registerParagraphStyle

public void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
Register a RtfParagraphStyle with this RtfStylesheetList.

Parameters: rtfParagraphStyle The RtfParagraphStyle to add.

writeContent

public void writeContent(OutputStream out)
unused

writeDefinition

public void writeDefinition(OutputStream result)
Writes the definition of the stylesheet list.