## com.lowagie.text.rtf.document
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:
  $Version:$
Author:
  Mark Hall (mhall@edu.uni-klu.ac.at)

Field Summary
`private RtfCodePage` `codePage` The code page to use
`private RtfColorList` `colorList` Stores all the colors used in the document
`private static byte[]` `FACING_PAGES` Constant for facing pages
`private RtfFontList` `fontList` Stores all the fonts used in the document
`private RtfHeaderFooterGroup` `footer` The current RtfHeaderFooterGroup for the footer
`private RtfHeaderFooterGroup` `header` The current RtfHeaderFooterGroup for the header
`private RtfInfoGroup` `infoGroup` The information group with author/subject/keywords/title/producer/creationdate data
`private RtfListTable` `listTable` Manages List tables
`private RtfPageSetting` `pageSetting` The page settings
`private static byte[]` `TITLE_PAGE` Constant for the title page

Fields inherited from class com.lowagie.text.rtf.RtfElement
`document, inHeader, inTable`

Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
`CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR`

Constructor Summary
`protected` `RtfDocumentHeader(RtfDocument doc)` Constructs a RtfDocumentHeader for a RtfDocument

Method Summary
`void` `addInfoElement(RtfInfoElement rtfInfoElement)` Adds an RtfInfoElement to the list of RtfInfoElements
`void` `freeListNumber(RtfList list)` Removes a RtfList from the list table
`int` `getColorNumber(RtfColor color)` Gets the number of the specified RtfColor
`int` `getFontNumber(RtfFont font)` Gets the number of the specified RtfFont
`int` `getListNumber(RtfList list)` Gets the number of the specified RtfList
`RtfPageSetting` `getPageSetting()` Gets the RtfPageSetting object of this RtfDocument
`protected void` `init()` Initialises the RtfDocumentHeader.
`void` `setFooter(HeaderFooter footer)` Sets the current footer to use
`void` `setHeader(HeaderFooter header)` Sets the current header to use
`byte[]` `write()` Write the contents of the document header area.
`byte[]` `writeSectionDefinition()` Writes the section definition data

Methods inherited from class com.lowagie.text.rtf.RtfElement
`intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TITLE_PAGE

    private static final byte[] TITLE_PAGE

  Constant for the title page

### FACING_PAGES

    private static final byte[] FACING_PAGES

  Constant for facing pages

### codePage

    private RtfCodePage codePage

  The code page to use

### colorList

    private RtfColorList colorList

  Stores all the colors used in the document

### fontList

    private RtfFontList fontList

  Stores all the fonts used in the document

### listTable

    private RtfListTable listTable

  Manages List tables

### infoGroup

    private RtfInfoGroup infoGroup

  The information group with author/subject/keywords/title/producer/creationdate data

### pageSetting

    private RtfPageSetting pageSetting

  The page settings

### header

    private RtfHeaderFooterGroup header

  The current RtfHeaderFooterGroup for the header

### footer

    private RtfHeaderFooterGroup footer

  The current RtfHeaderFooterGroup for the footer

Constructor Detail

### RtfDocumentHeader

    protected RtfDocumentHeader(RtfDocument doc)

  Constructs a RtfDocumentHeader for a RtfDocument

Parameters:
  `doc` - The RtfDocument this RtfDocumentHeader belongs to

Method Detail

### init

    protected void init()

  Initialises the RtfDocumentHeader.

### write

    public byte[] write()

  Write the contents of the document header area.

  Specified by:
    `write` in interface `RtfBasicElement`
  Overrides:
    `write` in class `RtfElement`
  Returns:
    A byte array with the contents of the document header area

### writeSectionDefinition

    public byte[] writeSectionDefinition()

  Writes the section definition data

  Returns:
    A byte array with the section definition data

### 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

### 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(HeaderFooter header)

  Sets the current header to use

  Parameters:
    `header` - The HeaderFooter to use as header

### setFooter

    public void setFooter(HeaderFooter footer)

  Sets the current footer to use

  Parameters:
    `footer` - The HeaderFooter to use as footer