com.lowagie.text
Class HeaderFooter
- Element, MarkupAttributes
public class HeaderFooter
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);
private Phrase | after - This is the
Phrase that comes after the pagenumber.
|
private int | alignment - This is alignment of the header/footer.
|
private Phrase | before - This is the
Phrase that comes before the pagenumber.
|
private boolean | numbered - Does the page contain a pagenumber?
|
private int | pageN - This is number of the page.
|
BOTTOM , BOX , LEFT , NO_BORDER , RIGHT , TOP , UNDEFINED , background , border , borderColorBottom , borderColorLeft , borderColorRight , borderColorTop , borderWidth , borderWidthBottom , borderWidthLeft , borderWidthRight , borderWidthTop , color , llx , lly , markupAttributes , rotation , urx , ury , useVariableBorders |
ALIGN_BASELINE , ALIGN_BOTTOM , ALIGN_CENTER , ALIGN_JUSTIFIED , ALIGN_JUSTIFIED_ALL , ALIGN_LEFT , ALIGN_MIDDLE , ALIGN_RIGHT , ALIGN_TOP , ALIGN_UNDEFINED , ANCHOR , ANNOTATION , AUTHOR , CCITTG3_1D , CCITTG3_2D , CCITTG4 , CCITT_BLACKIS1 , CCITT_ENCODEDBYTEALIGN , CCITT_ENDOFBLOCK , CCITT_ENDOFLINE , CELL , CHAPTER , CHUNK , CREATIONDATE , CREATOR , GRAPHIC , HEADER , IMGRAW , IMGTEMPLATE , JPEG , KEYWORDS , LIST , LISTITEM , MULTI_COLUMN_TEXT , PARAGRAPH , PHRASE , PRODUCER , PTABLE , RECTANGLE , ROW , SECTION , SUBJECT , TABLE , TITLE |
backgroundColor , border , borderColor , borderWidth , bottom , bottom , cloneNonPositionParameters , disableBorderSide , enableBorderSide , getBorderColorBottom , getBorderColorLeft , getBorderColorRight , getBorderColorTop , getBorderWidthBottom , getBorderWidthLeft , getBorderWidthRight , getBorderWidthTop , getChunks , getMarkupAttribute , getMarkupAttributeNames , getMarkupAttributes , getRotation , getVariableBorderWidth , grayFill , hasBorder , hasBorders , height , isUseVariableBorders , left , left , normalize , process , rectangle , right , right , rotate , setBackgroundColor , setBorder , setBorderColor , setBorderColorBottom , setBorderColorLeft , setBorderColorRight , setBorderColorTop , setBorderWidth , setBorderWidthBottom , setBorderWidthLeft , setBorderWidthRight , setBorderWidthTop , setBottom , setGrayFill , setLeft , setMarkupAttribute , setMarkupAttributes , setRight , setTop , setUseVariableBorders , softCloneNonPositionParameters , toString , top , top , type , updateBorderBasedOnWidth , width |
after
private Phrase after
This is the Phrase
that comes after the pagenumber.
alignment
private int alignment
This is alignment of the header/footer.
before
private Phrase before
This is the Phrase
that comes before the pagenumber.
numbered
private boolean numbered
Does the page contain a pagenumber?
pageN
private int pageN
This is number of the page.
HeaderFooter
public HeaderFooter(Phrase before,
boolean numbered)
Constructs a Header
-object with a pagenumber at the end.
before
- the Phrase
before the pagenumbernumbered
- true
if the page has to be numbered
HeaderFooter
public HeaderFooter(Phrase before,
Phrase after)
Constructs a HeaderFooter
-object.
before
- the Phrase
before the pagenumberafter
- the Phrase
before the pagenumber
alignment
public int alignment()
Gets the alignment of this HeaderFooter.
getAfter
public Phrase getAfter()
Gets the part that comes after the pageNumber.
getBefore
public Phrase getBefore()
Gets the part that comes before the pageNumber.
isNumbered
public boolean isNumbered()
Checks if the HeaderFooter contains a page number.
- true if the page has to be numbered
paragraph
public Paragraph paragraph()
Gets the Paragraph
that can be used as header or footer.
setAlignment
public void setAlignment(int alignment)
Sets the alignment.
alignment
- the new alignment
setPageNumber
public void setPageNumber(int pageN)
Sets the page number.
pageN
- the new page number