Class HeaderFooter
java.lang.Object
com.lowagie.text.Rectangle
com.lowagie.text.HeaderFooter
- All Implemented Interfaces:
Element
Deprecated.
A
HeaderFooter-object is a Rectangle with text that can be put above and/or below every
page.
Example:
HeaderFooter header = new HeaderFooter(new Phrase("This is a header."), false);
HeaderFooter footer = new HeaderFooter(new Phrase("This is page "), new Phrase("."));
document.setHeader(header); document.setFooter(footer);
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PhraseDeprecated.This is thePhrasethat comes after the pagenumber.private intDeprecated.This is alignment of the header/footer.private PhraseDeprecated.This is thePhrasethat comes before the pagenumber.private booleanDeprecated.Does the page contain a pagenumber?private floatDeprecated.This is the padding of height of header/footer.private intDeprecated.This is number of the page.Deprecated.This is theListcontaining non-textElement.Fields inherited from class 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 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, YMARK -
Constructor Summary
ConstructorsConstructorDescriptionHeaderFooter(boolean numbered) Deprecated.Constructs aHeader-object with only a pagenumber.HeaderFooter(boolean numbered, Phrase after) Deprecated.Constructs aHeader-object with a pagenumber at the beginning.HeaderFooter(Phrase before, boolean numbered) Deprecated.Constructs aHeader-object with a pagenumber at the end.HeaderFooter(Phrase before, Phrase after) Deprecated.Constructs aHeaderFooter-object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPadding(float augment) Deprecated.Increases current padding by adding new value into itvoidaddSpecialContent(Element element) Deprecated.Adds non-textElementintospecialContentintDeprecated.Gets the alignment of this HeaderFooter.getAfter()Deprecated.Gets the part that comes after the pageNumber.Deprecated.Gets the part that comes before the pageNumber.private FontgetFont()Deprecated.floatDeprecated.Gets padding of height of header/footer.Deprecated.GetsspecialContentbooleanDeprecated.Checks if the HeaderFooter contains a page number.Deprecated.Gets theParagraphthat can be used as header or footer.voidsetAlignment(int alignment) Deprecated.Sets the alignment.voidsetPadding(float padding) Deprecated.Sets padding of height of header/footer.voidsetPageNumber(int pageN) Deprecated.Sets the page number.Methods inherited from class 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
-
numbered
private boolean numberedDeprecated.Does the page contain a pagenumber? -
before
-
pageN
private int pageNDeprecated.This is number of the page. -
after
-
alignment
private int alignmentDeprecated.This is alignment of the header/footer. -
specialContent
-
padding
private float paddingDeprecated.This is the padding of height of header/footer.
-
-
Constructor Details
-
HeaderFooter
-
HeaderFooter
Deprecated.Constructs aHeader-object with a pagenumber at the end.- Parameters:
before- thePhrasebefore the pagenumbernumbered- page will be numbered iftrue
-
HeaderFooter
Deprecated.Constructs aHeader-object with a pagenumber at the beginning.- Parameters:
numbered- page will be numbered iftrueafter- thePhraseafter the pagenumber
-
HeaderFooter
public HeaderFooter(boolean numbered) Deprecated.Constructs aHeader-object with only a pagenumber.- Parameters:
numbered-trueif the page has to be numbered
-
-
Method Details
-
isNumbered
public boolean isNumbered()Deprecated.Checks if the HeaderFooter contains a page number.- Returns:
- true if the page has to be numbered
-
getBefore
Deprecated.Gets the part that comes before the pageNumber.- Returns:
- a Phrase
-
getAfter
Deprecated.Gets the part that comes after the pageNumber.- Returns:
- a Phrase
-
setPageNumber
public void setPageNumber(int pageN) Deprecated.Sets the page number.- Parameters:
pageN- the new page number
-
setAlignment
public void setAlignment(int alignment) Deprecated.Sets the alignment.- Parameters:
alignment- the new alignment
-
getPadding
public float getPadding()Deprecated.Gets padding of height of header/footer.- Returns:
- the padding of height
-
setPadding
public void setPadding(float padding) Deprecated.Sets padding of height of header/footer.- Parameters:
padding- the new padding of height
-
addPadding
public void addPadding(float augment) Deprecated.Increases current padding by adding new value into it- Parameters:
augment- the new value
-
addSpecialContent
Deprecated.Adds non-textElementintospecialContent- Parameters:
element- the new non-textElement
-
getSpecialContent
-
paragraph
Deprecated.Gets theParagraphthat can be used as header or footer.- Returns:
- a
Paragraph
-
getFont
Deprecated. -
alignment
public int alignment()Deprecated.Gets the alignment of this HeaderFooter.- Returns:
- alignment
-