Class RtfHeaderFooterGroup
java.lang.Object
com.lowagie.text.Rectangle
com.lowagie.text.HeaderFooter
com.lowagie.text.rtf.headerfooter.RtfHeaderFooterGroup
- All Implemented Interfaces:
com.lowagie.text.Element,RtfBasicElement
The RtfHeaderFooterGroup holds 0 - 3 RtfHeaderFooters that create a group
of headers or footers.
- Version:
- $Id: RtfHeaderFooterGroup.java 3373 2008-05-12 16:21:24Z xlv $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RtfDocumentThe RtfDocument this RtfHeaderFooterGroup belongs toprivate RtfHeaderFooterThe RtfHeaderFooter for all pagesprivate RtfHeaderFooterThe RtfHeaderFooter for the first pageprivate RtfHeaderFooterThe RtfHeaderFooter for the left hand pagesprivate RtfHeaderFooterThe RtfHeaderFooter for the right hand pagesprivate intThe current mode of this RtfHeaderFooterGroup.private static final intThis RtfHeaderFooterGroup contains two or three RtfHeaderFooter objectsprivate static final intThis RtfHeaderFooterGroup contains no RtfHeaderFooter objectsprivate static final intThis RtfHeaderFooterGroup contains one RtfHeaderFooter objectprivate intThe current type of this RtfHeaderFooterGroup.Fields inherited from class com.lowagie.text.Rectangle
backgroundColor, border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, offsetToTop, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBordersFields inherited from interface com.lowagie.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARKFields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a RtfHeaderGroup to which you add headers/footers using via the setHeaderFooter method.RtfHeaderFooterGroup(RtfDocument doc, int type) Constructs a certain type of RtfHeaderFooterGroup.RtfHeaderFooterGroup(RtfDocument doc, com.lowagie.text.HeaderFooter headerFooter, int type) Constructs a RtfHeaderGroup for a certain HeaderFooterRtfHeaderFooterGroup(RtfDocument doc, RtfHeaderFooterGroup headerFooter, int type) Constructs a RtfHeaderFooterGroup by copying the content of the original RtfHeaderFooterGroupRtfHeaderFooterGroup(RtfDocument doc, RtfHeaderFooter headerFooter, int type) Constructs a RtfHeaderFooterGroup for a certain RtfHeaderFooter. -
Method Summary
Modifier and TypeMethodDescriptionprotected RtfHeaderFooterGets the RtfHeaderFooter for all pagesprotected RtfHeaderFooterGets the RtfHeaderFooter for the title pageprotected RtfHeaderFooterGets the RtfHeaderFooter for all left hand pagesprotected RtfHeaderFooterGets the RtfHeaderFooter for all right hand pagesprotected intgetMode()Gets the mode of this RtfHeaderFooterGroupbooleanGet whether this RtfHeaderFooterGroup has facing pagesbooleanGet whether this RtfHeaderFooterGroup has a titlepagevoidSet that this RtfHeaderFooterGroup should have facing pages.voidSet that this RtfHeaderFooterGroup should have a title page.voidsetHeaderFooter(com.lowagie.text.HeaderFooter headerFooter, int displayAt) Set a HeaderFooter to be displayed at a certain positionvoidsetHeaderFooter(RtfHeaderFooter headerFooter, int displayAt) Set a RtfHeaderFooter to be displayed at a certain positionvoidsetInHeader(boolean inHeader) UnusedvoidsetInTable(boolean inTable) UnusedvoidSets the RtfDocument this RtfElement belongs tovoidsetType(int type) Set the type of this RtfHeaderFooterGroup.voidwriteContent(OutputStream result) Write the content of this RtfHeaderFooterGroup.Methods inherited from class com.lowagie.text.HeaderFooter
addPadding, addSpecialContent, alignment, getAfter, getBefore, getPadding, getSpecialContent, isNumbered, paragraph, setAlignment, setPadding, setPageNumberMethods inherited from class com.lowagie.text.Rectangle
cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBackgroundColor, getBorder, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getBottom, getChunks, getGrayFill, getHeight, getLeft, getLeft, getRelativeTop, getRight, getRight, getRotation, getTop, getTop, getWidth, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, normalize, process, rectangle, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setBottom, setGrayFill, setLeft, setRelativeTop, setRight, setRotation, setTop, setUseVariableBorders, softCloneNonPositionParameters, toString, type
-
Field Details
-
MODE_NONE
private static final int MODE_NONEThis RtfHeaderFooterGroup contains no RtfHeaderFooter objects- See Also:
-
MODE_SINGLE
private static final int MODE_SINGLEThis RtfHeaderFooterGroup contains one RtfHeaderFooter object- See Also:
-
MODE_MULTIPLE
private static final int MODE_MULTIPLEThis RtfHeaderFooterGroup contains two or three RtfHeaderFooter objects- See Also:
-
mode
private int modeThe current mode of this RtfHeaderFooterGroup. Defaults to MODE_NONE -
type
private int typeThe current type of this RtfHeaderFooterGroup. Defaults to RtfHeaderFooter.TYPE_HEADER -
headerAll
The RtfHeaderFooter for all pages -
headerFirst
The RtfHeaderFooter for the first page -
headerLeft
The RtfHeaderFooter for the left hand pages -
headerRight
The RtfHeaderFooter for the right hand pages -
document
The RtfDocument this RtfHeaderFooterGroup belongs to
-
-
Constructor Details
-
RtfHeaderFooterGroup
public RtfHeaderFooterGroup()Constructs a RtfHeaderGroup to which you add headers/footers using via the setHeaderFooter method. -
RtfHeaderFooterGroup
Constructs a certain type of RtfHeaderFooterGroup. RtfHeaderFooter.TYPE_HEADER and RtfHeaderFooter.TYPE_FOOTER are valid values for type.- Parameters:
doc- The RtfDocument this RtfHeaderFooter belongs totype- The type of RtfHeaderFooterGroup to create
-
-
Method Details
-
setRtfDocument
Sets the RtfDocument this RtfElement belongs to- Specified by:
setRtfDocumentin interfaceRtfBasicElement- Parameters:
doc- The RtfDocument to use
-
writeContent
Write the content of this RtfHeaderFooterGroup.- Specified by:
writeContentin interfaceRtfBasicElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
setHasTitlePage
public void setHasTitlePage()Set that this RtfHeaderFooterGroup should have a title page. If only a header / footer for all pages exists, then it will be copied to the first page as well. -
setHasFacingPages
public void setHasFacingPages()Set that this RtfHeaderFooterGroup should have facing pages. If only a header / footer for all pages exists, then it will be copied to the left and right pages as well. -
hasTitlePage
public boolean hasTitlePage()Get whether this RtfHeaderFooterGroup has a titlepage- Returns:
- Whether this RtfHeaderFooterGroup has a titlepage
-
hasFacingPages
public boolean hasFacingPages()Get whether this RtfHeaderFooterGroup has facing pages- Returns:
- Whether this RtfHeaderFooterGroup has facing pages
-
setInTable
public void setInTable(boolean inTable) Unused- Specified by:
setInTablein interfaceRtfBasicElement- Parameters:
inTable-
-
setInHeader
public void setInHeader(boolean inHeader) Unused- Specified by:
setInHeaderin interfaceRtfBasicElement- Parameters:
inHeader-
-
setType
public void setType(int type) Set the type of this RtfHeaderFooterGroup. RtfHeaderFooter.TYPE_HEADER or RtfHeaderFooter.TYPE_FOOTER. Also sets the type for all RtfHeaderFooters of this RtfHeaderFooterGroup.- Parameters:
type- The type to use
-
getMode
protected int getMode()Gets the mode of this RtfHeaderFooterGroup- Returns:
- The mode of this RtfHeaderFooterGroup
-
getHeaderAll
Gets the RtfHeaderFooter for all pages- Returns:
- The RtfHeaderFooter for all pages
-
getHeaderFirst
Gets the RtfHeaderFooter for the title page- Returns:
- The RtfHeaderFooter for the title page
-
getHeaderLeft
Gets the RtfHeaderFooter for all left hand pages- Returns:
- The RtfHeaderFooter for all left hand pages
-
getHeaderRight
Gets the RtfHeaderFooter for all right hand pages- Returns:
- The RtfHeaderFooter for all right hand pages
-