Class RtfStylesheetList

java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.style.RtfStylesheetList
All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement, com.lowagie.text.RtfElementInterface

public class RtfStylesheetList extends RtfElement implements RtfExtendedElement
The RtfStylesheetList stores the RtfParagraphStyles that are used in the document.
Version:
$Id: RtfStylesheetList.java 3580 2008-08-06 15:52:00Z howard_s $
  • Field Details

    • styleMap

      private final Map<String,RtfParagraphStyle> styleMap
      The HashMap containing the RtfParagraphStyles.
    • defaultsLoaded

      private boolean defaultsLoaded
      Whether the default settings have been loaded.
  • Constructor Details

    • RtfStylesheetList

      public RtfStylesheetList(RtfDocument doc)
      Constructs a new RtfStylesheetList for the RtfDocument.
      Parameters:
      doc - The RtfDocument this RtfStylesheetList belongs to.
  • Method Details

    • writeContent

      public void writeContent(OutputStream out) throws IOException
      unused
      Specified by:
      writeContent in interface RtfBasicElement
      Specified by:
      writeContent in class RtfElement
      Parameters:
      out - The OutputStream to write the content to
      Throws:
      IOException
    • registerParagraphStyle

      public void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
      Register a RtfParagraphStyle with this RtfStylesheetList.
      Parameters:
      rtfParagraphStyle - The RtfParagraphStyle to add.
    • registerDefaultStyles

      private void registerDefaultStyles()
      Registers all default styles. If styles with the given name have already been registered, then they are NOT overwritten.
    • 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.
    • writeDefinition

      public void writeDefinition(OutputStream result) throws IOException
      Writes the definition of the stylesheet list.
      Specified by:
      writeDefinition in interface RtfExtendedElement
      Parameters:
      result - The OutputStream to write the element definition to
      Throws:
      IOException