com.lowagie.text.rtf.document
public class RtfDocumentHeader extends RtfElement
Modifier and Type | Field and Description |
---|---|
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 HeaderFooter |
footer
The current RtfHeaderFooterGroup for the footer
|
private RtfGenerator |
generator
Generator string in document
|
private HeaderFooter |
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 RtfProtectionSetting |
protectionSetting
The protection settings
Author: Howard Shank (hgshank@yahoo.com)
|
private RtfStylesheetList |
stylesheetList
Stores all paragraph styles used in the document.
|
private static byte[] |
TITLE_PAGE
Constant for the title page
|
document, inHeader, inTable
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
Modifier | Constructor and Description |
---|---|
protected |
RtfDocumentHeader(RtfDocument doc)
Constructs a RtfDocumentHeader for a RtfDocument
|
Modifier and Type | Method and Description |
---|---|
void |
addInfoElement(RtfInfoElement rtfInfoElement)
Adds an RtfInfoElement to the list of RtfInfoElements
|
private RtfHeaderFooterGroup |
convertHeaderFooter(HeaderFooter hf,
int type)
Converts a HeaderFooter into a RtfHeaderFooterGroup.
|
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
|
RtfListTable |
getListTable()
Get the
RtfListTable object. |
RtfPageSetting |
getPageSetting()
Gets the RtfPageSetting object of this RtfDocument
|
RtfParagraphStyle |
getRtfParagraphStyle(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(HeaderFooter footer)
Sets the current footer to use
|
void |
setHeader(HeaderFooter header)
Sets the current header to use
|
void |
writeContent(OutputStream result)
Writes the contents of the document header area.
|
void |
writeSectionDefinition(OutputStream result)
Writes the section definition data
|
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
private static final byte[] TITLE_PAGE
private static final byte[] FACING_PAGES
private RtfCodePage codePage
private RtfColorList colorList
private RtfFontList fontList
private RtfListTable listTable
private RtfStylesheetList stylesheetList
private RtfGenerator generator
private RtfInfoGroup infoGroup
private RtfProtectionSetting protectionSetting
private RtfPageSetting pageSetting
private HeaderFooter header
private HeaderFooter footer
protected RtfDocumentHeader(RtfDocument doc)
doc
- The RtfDocument this RtfDocumentHeader belongs toprotected void init()
public void writeContent(OutputStream result) throws IOException
writeContent
in interface RtfBasicElement
writeContent
in class RtfElement
result
- The OutputStream
to write the content toIOException
public void writeSectionDefinition(OutputStream result)
result
- public int getFontNumber(RtfFont font)
font
- The RtfFont for which to get the numberpublic int getColorNumber(RtfColor color)
color
- The RtfColor for which to get the numberpublic int getListNumber(RtfList list)
list
- The RtfList for which to get the numberpublic RtfParagraphStyle getRtfParagraphStyle(String styleName)
styleName
- The style name of the RtfParagraphStyle to get.public void freeListNumber(RtfList list)
list
- The RtfList to removepublic RtfPageSetting getPageSetting()
public void addInfoElement(RtfInfoElement rtfInfoElement)
rtfInfoElement
- The RtfInfoElement to addpublic void setHeader(HeaderFooter header)
header
- The HeaderFooter to use as headerpublic void setFooter(HeaderFooter footer)
footer
- The HeaderFooter to use as footerpublic void registerParagraphStyle(RtfParagraphStyle rtfParagraphStyle)
rtfParagraphStyle
- The RtfParagraphStyle to register.private RtfHeaderFooterGroup convertHeaderFooter(HeaderFooter hf, int type)
hf
- The HeaderFooter to convert.type
- Whether the conversion is being done on a footer or headerRtfHeaderFooter
,
RtfHeaderFooterGroup
public RtfListTable getListTable()
RtfListTable
object.