Package org.docx4j.model.structure
Class HeaderFooterPolicy
java.lang.Object
org.docx4j.model.structure.HeaderFooterPolicy
public class HeaderFooterPolicy
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlog -
Constructor Summary
Constructors Constructor Description HeaderFooterPolicy(SectPr sectPr, HeaderFooterPolicy previousHF, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders)Figures out the policy for the given section, and creates any header and footer objects as required. -
Method Summary
Modifier and Type Method Description FooterPartgetDefaultFooter()If an even footer is present this is the odd footer otherwise it is both, even and odd footerHeaderPartgetDefaultHeader()If an even header is present this is the odd header otherwise it is both, even and odd headerFooterPartgetEvenFooter()HeaderPartgetEvenHeader()FooterPartgetFirstFooter()HeaderPartgetFirstHeader()FooterPartgetFooter(int pageNumber)Get the footer that applies to the given (1 based) page.HeaderPartgetHeader(int pageNumber)Get the header that applies to the given (1 based) page.
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
HeaderFooterPolicy
public HeaderFooterPolicy(SectPr sectPr, HeaderFooterPolicy previousHF, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders)Figures out the policy for the given section, and creates any header and footer objects as required.
-
-
Method Details
-
getFirstHeader
-
getFirstFooter
-
getEvenHeader
-
getEvenFooter
-
getDefaultHeader
If an even header is present this is the odd header otherwise it is both, even and odd header -
getDefaultFooter
If an even footer is present this is the odd footer otherwise it is both, even and odd footer -
getHeader
Get the header that applies to the given (1 based) page.- Parameters:
pageNumber- The one based page number
-
getFooter
Get the footer that applies to the given (1 based) page.- Parameters:
pageNumber- The one based page number
-