public class HeaderFooter extends Story
HeaderFooter can contain Paragraph and Table child nodes.
HeaderFooter is a section-level node and can only be a child of Section. There can only be one HeaderFooter or each getHeaderFooterType() in a Section.
If Section does not have a HeaderFooter of a specific type or the HeaderFooter has no child nodes, this header/footer is considered linked to the header/footer of the same type of the previous section in Microsoft Word.
When HeaderFooter contains at least one Paragraph, it is no longer considered linked to previous in Microsoft Word.
| Constructor and Description |
|---|
HeaderFooter(DocumentBase doc,
int headerFooterType)
Initializes a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
int |
getHeaderFooterType()
Gets the type of this header/footer.
|
int |
getNodeType()
Returns NodeType.HeaderFooter.
|
Section |
getParentSection()
Gets the parent section of this story.
|
boolean |
isHeader()
True if this HeaderFooter object is a header.
|
boolean |
isLinkedToPrevious()
True if this header or footer is linked to the corresponding header or footer in the previous section.
|
void |
isLinkedToPrevious(boolean value)
True if this header or footer is linked to the corresponding header or footer in the previous section.
|
appendParagraph, deleteShapes, getFirstParagraph, getLastParagraph, getParagraphs, getStoryType, getTablesacceptChildren, acceptCore, appendChild, coreRemoveSelfOnly, getChild, getChildNodes, getChildNodes, getContainer, getCount, getCurrentNode, getFirstChild, getLastChild, getNextMatchingNode, getText, hasChildNodes, indexOf, insertAfter, insertBefore, isComposite, iterator, prependChild, removeAllChildren, removeChild, removeSmartTags, selectNodes, selectSingleNodedd, deepClone, getAncestor, getAncestor, getCustomNodeId, getDocument, getNextSibling, getParentNode, getPreviousSibling, getRange, memberwiseClone, nextPreOrder, nodeTypeToString, previousPreOrder, remove, setCustomNodeId, toString, toString, toString, visitorActionToBoolpublic HeaderFooter(DocumentBase doc, int headerFooterType)
public int getNodeType()
getNodeType in class NodeNodeType constants.public Section getParentSection()
ParentSection is equivalent to (Section)ParentNode.
public int getHeaderFooterType()
HeaderFooterType constants.public boolean isHeader()
boolean value.public boolean isLinkedToPrevious()
Default is true.
Note, when your link a header or footer, its contents is cleared.
boolean value.public void isLinkedToPrevious(boolean value)
Default is true.
Note, when your link a header or footer, its contents is cleared.
value - The corresponding boolean value.public boolean accept(DocumentVisitor visitor) throws java.lang.Exception
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.