Package 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
,com.lowagie.text.RtfElementInterface
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 RtfCodePage
The code page to useprivate RtfColorList
Stores all the colors used in the documentprivate static final byte[]
Constant for facing pagesprivate RtfFontList
Stores all the fonts used in the documentprivate com.lowagie.text.HeaderFooter
The current RtfHeaderFooterGroup for the footerprivate RtfFootnoteSetting
Footnote settingsprivate RtfGenerator
Generator string in documentprivate com.lowagie.text.HeaderFooter
The current RtfHeaderFooterGroup for the headerprivate RtfInfoGroup
The information group with author/subject/keywords/title/producer/creationdate dataprivate RtfListTable
Manages List tablesprivate RtfPageSetting
The page settingsprivate RtfProtectionSetting
The protection settings Author: Howard Shank (hgshank@yahoo.com)private RtfStylesheetList
Stores all paragraph styles used in the document.private static final byte[]
Constant for the title pageFields 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
ConstructorsModifierConstructorDescriptionprotected
Constructs a RtfDocumentHeader for a RtfDocument -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInfoElement
(RtfInfoElement rtfInfoElement) Adds an RtfInfoElement to the list of RtfInfoElementsprivate RtfHeaderFooterGroup
convertHeaderFooter
(com.lowagie.text.HeaderFooter hf, int type) Converts a HeaderFooter into a RtfHeaderFooterGroup.void
freeListNumber
(RtfList list) Removes a RtfList from the list tableint
getColorNumber
(RtfColor color) Gets the number of the specified RtfColorint
getFontNumber
(RtfFont font) Gets the number of the specified RtfFontint
getListNumber
(RtfList list) Gets the number of the specified RtfListGet theRtfListTable
object.Gets the RtfPageSetting object of this RtfDocumentgetRtfParagraphStyle
(String styleName) Gets the RtfParagraphStyle with the given style name.protected void
init()
initializes the RtfDocumentHeader.void
registerParagraphStyle
(RtfParagraphStyle rtfParagraphStyle) Registers the RtfParagraphStyle for further use in the document.void
setFooter
(com.lowagie.text.HeaderFooter footer) Sets the current footer to usevoid
setHeader
(com.lowagie.text.HeaderFooter header) Sets the current header to usevoid
writeContent
(OutputStream result) Writes the contents of the document header area.void
writeSectionDefinition
(OutputStream result) Writes the section definition dataMethods inherited from class com.lowagie.text.rtf.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:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfElement
- Parameters:
result
- TheOutputStream
to 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 theRtfListTable
object.- Returns:
- the ListTable object.
- Since:
- 2.1.3
-