Class RtfDocumentHeader

java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.document.RtfDocumentHeader
All Implemented Interfaces:
RtfBasicElement

public class RtfDocumentHeader extends RtfElement
The RtfDocumentHeader contains all classes required for the generation of the document header area.
Version:
$Id: RtfDocumentHeader.java 3580 2008-08-06 15:52:00Z howard_s $
Author:
Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at), Howard Shank (hgshank@yahoo.com)
  • Constructor Details

    • RtfDocumentHeader

      protected RtfDocumentHeader(RtfDocument doc)
      Constructs a RtfDocumentHeader for a RtfDocument
      Parameters:
      doc - The RtfDocument this RtfDocumentHeader belongs to
  • Method Details

    • init

      protected void init()
      initializes the RtfDocumentHeader.
    • writeContent

      public void writeContent(OutputStream result) throws IOException
      Writes the contents of the document header area.
      Specified by:
      writeContent in interface RtfBasicElement
      Specified by:
      writeContent in class RtfElement
      Parameters:
      result - The OutputStream to write the content to
      Throws:
      IOException
    • writeSectionDefinition

      public void writeSectionDefinition(OutputStream result)
      Writes the section definition data
      Parameters:
      result -
    • getFontNumber

      public int getFontNumber(RtfFont font)
      Gets the number of the specified RtfFont
      Parameters:
      font - The RtfFont for which to get the number
      Returns:
      The number of the font
    • getColorNumber

      public int getColorNumber(RtfColor color)
      Gets the number of the specified RtfColor
      Parameters:
      color - The RtfColor for which to get the number
      Returns:
      The number of the color
    • getListNumber

      public int getListNumber(RtfList list)
      Gets the number of the specified RtfList
      Parameters:
      list - The RtfList for which to get the number
      Returns:
      The number of the list
    • getRtfParagraphStyle

      public RtfParagraphStyle getRtfParagraphStyle(String styleName)
      Gets the RtfParagraphStyle with the given style name.
      Parameters:
      styleName - The style name of the RtfParagraphStyle to get.
      Returns:
      The RtfParagraphStyle with the given style name or null.
    • freeListNumber

      public void freeListNumber(RtfList list)
      Removes a RtfList from the list table
      Parameters:
      list - The RtfList to remove
    • getPageSetting

      public RtfPageSetting getPageSetting()
      Gets the RtfPageSetting object of this RtfDocument
      Returns:
      The RtfPageSetting object
    • addInfoElement

      public void addInfoElement(RtfInfoElement rtfInfoElement)
      Adds an RtfInfoElement to the list of RtfInfoElements
      Parameters:
      rtfInfoElement - The RtfInfoElement to add
    • setHeader

      public void setHeader(com.lowagie.text.HeaderFooter header)
      Sets the current header to use
      Parameters:
      header - The HeaderFooter to use as header
    • setFooter

      public void setFooter(com.lowagie.text.HeaderFooter footer)
      Sets the current footer to use
      Parameters:
      footer - The HeaderFooter to use as footer
    • registerParagraphStyle

      public void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
      Registers the RtfParagraphStyle for further use in the document.
      Parameters:
      rtfParagraphStyle - The RtfParagraphStyle to register.
    • getListTable

      public RtfListTable getListTable()
      Get the RtfListTable object.
      Returns:
      the ListTable object.
      Since:
      2.1.3