Class RtfDocumentHeader
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.document.RtfDocumentHeader
- All Implemented Interfaces:
RtfBasicElement
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)
-
Field Summary
Fields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a RtfDocumentHeader for a RtfDocument -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInfoElement(RtfInfoElement rtfInfoElement) Adds an RtfInfoElement to the list of RtfInfoElementsvoidfreeListNumber(RtfList list) Removes a RtfList from the list tableintgetColorNumber(RtfColor color) Gets the number of the specified RtfColorintgetFontNumber(RtfFont font) Gets the number of the specified RtfFontintgetListNumber(RtfList list) Gets the number of the specified RtfListGet theRtfListTableobject.Gets the RtfPageSetting object of this RtfDocumentgetRtfParagraphStyle(String styleName) Gets the RtfParagraphStyle with the given style name.protected voidinit()initializes the RtfDocumentHeader.voidregisterParagraphStyle(RtfParagraphStyle rtfParagraphStyle) Registers the RtfParagraphStyle for further use in the document.voidsetFooter(com.lowagie.text.HeaderFooter footer) Sets the current footer to usevoidsetHeader(com.lowagie.text.HeaderFooter header) Sets the current header to usevoidwriteContent(OutputStream result) Writes the contents of the document header area.voidwriteSectionDefinition(OutputStream result) Writes the section definition dataMethods inherited from class RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
-
Constructor Details
-
RtfDocumentHeader
Constructs a RtfDocumentHeader for a RtfDocument- Parameters:
doc- The RtfDocument this RtfDocumentHeader belongs to
-
-
Method Details
-
init
protected void init()initializes the RtfDocumentHeader. -
writeContent
Writes the contents of the document header area.- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
writeSectionDefinition
Writes the section definition data- Parameters:
result-
-
getFontNumber
Gets the number of the specified RtfFont- Parameters:
font- The RtfFont for which to get the number- Returns:
- The number of the font
-
getColorNumber
Gets the number of the specified RtfColor- Parameters:
color- The RtfColor for which to get the number- Returns:
- The number of the color
-
getListNumber
Gets the number of the specified RtfList- Parameters:
list- The RtfList for which to get the number- Returns:
- The number of the list
-
getRtfParagraphStyle
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
Removes a RtfList from the list table- Parameters:
list- The RtfList to remove
-
getPageSetting
Gets the RtfPageSetting object of this RtfDocument- Returns:
- The RtfPageSetting object
-
addInfoElement
Adds an RtfInfoElement to the list of RtfInfoElements- Parameters:
rtfInfoElement- The RtfInfoElement to add
-
registerParagraphStyle
Registers the RtfParagraphStyle for further use in the document.- Parameters:
rtfParagraphStyle- The RtfParagraphStyle to register.
-
getListTable
Get theRtfListTableobject.- Returns:
- the ListTable object.
- Since:
- 2.1.3
-