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 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RtfCodePageThe code page to useprivate RtfColorListStores all the colors used in the documentprivate static final byte[]Constant for facing pagesprivate RtfFontListStores all the fonts used in the documentprivate com.lowagie.text.HeaderFooterThe current RtfHeaderFooterGroup for the footerprivate RtfFootnoteSettingFootnote settingsprivate RtfGeneratorGenerator string in documentprivate com.lowagie.text.HeaderFooterThe current RtfHeaderFooterGroup for the headerprivate RtfInfoGroupThe information group with author/subject/keywords/title/producer/creationdate dataprivate RtfListTableManages List tablesprivate RtfPageSettingThe page settingsprivate RtfProtectionSettingThe protection settings Author: Howard Shank (hgshank@yahoo.com)private RtfStylesheetListStores all paragraph styles used in the document.private static final byte[]Constant for the title pageFields 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 RtfInfoElementsprivate RtfHeaderFooterGroupconvertHeaderFooter(com.lowagie.text.HeaderFooter hf, int type) Converts a HeaderFooter into a RtfHeaderFooterGroup.voidfreeListNumber(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
-
Field Details
-
TITLE_PAGE
private static final byte[] TITLE_PAGEConstant for the title page -
FACING_PAGES
private static final byte[] FACING_PAGESConstant for facing pages -
codePage
The code page to use -
colorList
Stores all the colors used in the document -
fontList
Stores all the fonts used in the document -
listTable
Manages List tables -
stylesheetList
Stores all paragraph styles used in the document. -
generator
Generator string in document -
infoGroup
The information group with author/subject/keywords/title/producer/creationdate data -
protectionSetting
The protection settings Author: Howard Shank (hgshank@yahoo.com)- Since:
- 2.1.1
-
pageSetting
The page settings -
footnoteSetting
Footnote settings -
header
private com.lowagie.text.HeaderFooter headerThe current RtfHeaderFooterGroup for the header
-
-
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
-