|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lowagie.text.Rectangle
com.lowagie.text.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);
| Field Summary | |
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. |
| Fields inherited from class com.lowagie.text.Rectangle |
background, border, borderWidth, BOTTOM, BOX, color, grayFill, LEFT, llx, lly, markupAttributes, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury |
| Fields 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, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE |
| Constructor Summary | |
HeaderFooter(Phrase before,
boolean numbered)
Constructs a Header-object with a pagenumber at the end. |
|
HeaderFooter(Phrase before,
Phrase after)
Constructs a HeaderFooter-object. |
|
| 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. |
| Methods inherited from class com.lowagie.text.Rectangle |
backgroundColor, border, borderColor, borderWidth, bottom, bottom, getChunks, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getRotation, grayFill, hasBorder, hasBorders, height, left, left, process, rectangle, right, right, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderWidth, setBottom, setGrayFill, setLeft, setMarkupAttribute, setMarkupAttributes, setRight, setTop, top, top, type, width |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.lowagie.text.MarkupAttributes |
getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, setMarkupAttribute, setMarkupAttributes |
| Methods inherited from interface com.lowagie.text.Element |
getChunks, process, toString, type |
| Field Detail |
private boolean numbered
private Phrase before
Phrase that comes before the pagenumber.
private int pageN
private Phrase after
Phrase that comes after the pagenumber.
private int alignment
| Constructor Detail |
public HeaderFooter(Phrase before,
Phrase after)
HeaderFooter-object.
before - the Phrase before the pagenumberafter - the Phrase before the pagenumber
public HeaderFooter(Phrase before,
boolean numbered)
Header-object with a pagenumber at the end.
before - the Phrase before the pagenumbernumbered - true if the page has to be numbered| Method Detail |
public boolean isNumbered()
public Phrase getBefore()
public Phrase getAfter()
public void setPageNumber(int pageN)
pageN - the new page numberpublic void setAlignment(int alignment)
alignment - the new alignmentpublic Paragraph paragraph()
Paragraph that can be used as header or footer.
Paragraphpublic int alignment()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||