Package org.docx4j.model.structure
Class HeaderFooterPolicy
java.lang.Object
org.docx4j.model.structure.HeaderFooterPolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FooterPartprivate HeaderPartprivate static FooterPartprivate static HeaderPartprivate static Objectprivate FooterPartprivate HeaderPartprivate FooterPartprivate FooterPartprivate HeaderPartprivate HeaderPartprotected static org.slf4j.Logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateHeaderFooterPolicy(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 TypeMethodDescriptionprivate voidIf an even footer is present this is the odd footer otherwise it is both, even and odd footerIf an even header is present this is the odd header otherwise it is both, even and odd headerprivate FooterPartprivate HeaderPartgetFooter(int pageNumber) Get the footer that applies to the given (1 based) page.getHeader(int pageNumber) Get the header that applies to the given (1 based) page.private voidsetFooterReferences(List<CTRel> hdrFtrRefs, RelationshipsPart rels, BooleanDefaultTrue titlePage) private voidsetHeaderReferences(List<CTRel> hdrFtrRefs, RelationshipsPart rels, BooleanDefaultTrue titlePage)
-
Field Details
-
log
protected static org.slf4j.Logger log -
firstHeaderActive
-
firstHeader
-
evenHeader
-
defaultHeader
-
dummyHeader
-
-
Constructor Details
-
HeaderFooterPolicy
private HeaderFooterPolicy()
-
-
Method Details
-
getDummyHeader
-
setHeaderReferences
private void setHeaderReferences(List<CTRel> hdrFtrRefs, RelationshipsPart rels, BooleanDefaultTrue titlePage) -
getFirstHeader
-
getEvenHeader
-
getDefaultHeader
If an even header is present this is the odd header otherwise it is both, even and odd header -
getHeader
Get the header that applies to the given (1 based) page.- Parameters:
pageNumber- The one based page number
-