com.lowagie.text
public class HeaderFooter extends Rectangle
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 | |
---|---|
Phrase | after This is the Phrase that comes after the pagenumber. |
int | alignment This is alignment of the header/footer. |
Phrase | before This is the Phrase that comes before the pagenumber. |
boolean | numbered Does the page contain a pagenumber? |
int | pageN This is number of the page. |
Constructor Summary | |
---|---|
HeaderFooter(Phrase before, Phrase after)
Constructs a HeaderFooter -object.
| |
HeaderFooter(Phrase before, boolean numbered)
Constructs a Header -object with a pagenumber at the end.
|
Method Summary | |
---|---|
int | alignment()
Gets the alignment of this HeaderFooter.
|
Phrase | getAfter()
Gets the part that comes after the pageNumber.
|
Phrase | getBefore()
Gets the part that comes before the pageNumber.
|
boolean | isNumbered()
Checks if the HeaderFooter contains a page number.
|
Paragraph | paragraph()
Gets the Paragraph that can be used as header or footer.
|
void | setAlignment(int alignment)
Sets the alignment.
|
void | setPageNumber(int pageN)
Sets the page number.
|
Phrase
that comes after the pagenumber.Phrase
that comes before the pagenumber.HeaderFooter
-object.
Parameters: before the Phrase
before the pagenumber after the Phrase
before the pagenumber
Header
-object with a pagenumber at the end.
Parameters: before the Phrase
before the pagenumber numbered true
if the page has to be numbered
Returns: alignment
Returns: a Phrase
Returns: a Phrase
Returns: true if the page has to be numbered
Paragraph
that can be used as header or footer.
Returns: a Paragraph
Parameters: alignment the new alignment
Parameters: pageN the new page number