Class RtfHeaderFooter
java.lang.Object
com.lowagie.text.Rectangle
com.lowagie.text.HeaderFooter
com.lowagie.text.rtf.headerfooter.RtfHeaderFooter
- All Implemented Interfaces:
com.lowagie.text.Element, RtfBasicElement
The RtfHeaderFooter represents one header or footer. This class can be used
directly.
- Version:
- $Id: RtfHeaderFooter.java 3580 2008-08-06 15:52:00Z howard_s $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for displaying the header/footer on all pagesstatic final intConstant for displaying the header/footer on the first pagestatic final intConstant for displaying the header/footer on all left hand pagesstatic final intConstant for displaying the header/footer on all right hand pagesstatic final intConstant for the footer typestatic final intConstant for the header typeFields 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 RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionRtfHeaderFooter(com.lowagie.text.Element element) Constructs a RtfHeaderFooter for any Element.RtfHeaderFooter(com.lowagie.text.Element[] elements) Constructs a RtfHeaderFooter for an array of Elements.protectedRtfHeaderFooter(RtfDocument doc, com.lowagie.text.HeaderFooter headerFooter) Constructs a RtfHeaderFooter for a HeaderFooter.protectedRtfHeaderFooter(RtfDocument doc, com.lowagie.text.HeaderFooter headerFooter, int type, int displayAt) Constructs a RtfHeaderFooter based on a HeaderFooter with a certain type and displayAt location.protectedRtfHeaderFooter(RtfDocument doc, RtfHeaderFooter headerFooter, int displayAt) Constructs a RtfHeaderFooter as a copy of an existing RtfHeaderFooter. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAlignment(int alignment) Set the alignment of this RtfHeaderFooter.voidsetDisplayAt(int displayAt) Sets the display location of this RtfHeaderFootervoidsetInHeader(boolean inHeader) UnusedvoidsetInTable(boolean inTable) UnusedvoidSets the RtfDocument this RtfElement belongs tovoidsetType(int type) Sets the type of this RtfHeaderFootervoidwriteContent(OutputStream result) Writes the content of this RtfHeaderFooterMethods inherited from class com.lowagie.text.HeaderFooter
addPadding, addSpecialContent, alignment, getAfter, getBefore, getPadding, getSpecialContent, isNumbered, paragraph, 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
-
TYPE_HEADER
public static final int TYPE_HEADERConstant for the header type- See Also:
-
TYPE_FOOTER
public static final int TYPE_FOOTERConstant for the footer type- See Also:
-
DISPLAY_FIRST_PAGE
public static final int DISPLAY_FIRST_PAGEConstant for displaying the header/footer on the first page- See Also:
-
DISPLAY_ALL_PAGES
public static final int DISPLAY_ALL_PAGESConstant for displaying the header/footer on all pages- See Also:
-
DISPLAY_LEFT_PAGES
public static final int DISPLAY_LEFT_PAGESConstant for displaying the header/footer on all left hand pages- See Also:
-
DISPLAY_RIGHT_PAGES
public static final int DISPLAY_RIGHT_PAGESConstant for displaying the header/footer on all right hand pages- See Also:
-
-
Constructor Details
-
RtfHeaderFooter
public RtfHeaderFooter(com.lowagie.text.Element element) Constructs a RtfHeaderFooter for any Element.- Parameters:
element- The Element to display as content of this RtfHeaderFooter
-
RtfHeaderFooter
public RtfHeaderFooter(com.lowagie.text.Element[] elements) Constructs a RtfHeaderFooter for an array of Elements.- Parameters:
elements- The Elements to display as the content of this RtfHeaderFooter.
-
Method Details
-
setRtfDocument
Sets the RtfDocument this RtfElement belongs to- Specified by:
setRtfDocumentin interfaceRtfBasicElement- Parameters:
doc- The RtfDocument to use
-
writeContent
Writes the content of this RtfHeaderFooter- Specified by:
writeContentin interfaceRtfBasicElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
setDisplayAt
public void setDisplayAt(int displayAt) Sets the display location of this RtfHeaderFooter- Parameters:
displayAt- The display location to use.
-
setType
public void setType(int type) Sets the type of this RtfHeaderFooter- Parameters:
type- The type to use.
-
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-
-
setAlignment
public void setAlignment(int alignment) Set the alignment of this RtfHeaderFooter. Passes the setting on to the contained element.- Overrides:
setAlignmentin classcom.lowagie.text.HeaderFooter
-