public class HeaderFooterCollection extends NodeCollection
HeaderFooter nodes of a Section.
There can be maximum of one HeaderFooter
of eachHeaderFooterType per Section.
HeaderFooter objects can occur in any order in the collection.
| Modifier and Type | Method and Description |
|---|---|
Node |
get(int index)
Retrieves a HeaderFooter at the given index.
|
HeaderFooter |
getByHeaderFooterType(int headerFooterType) |
void |
linkToPrevious(boolean isLinkToPrevious)
Links or unlinks all headers and footers to the corresponding headers and footers in the previous section.
|
void |
linkToPrevious(int headerFooterType,
boolean isLinkToPrevious) |
HeaderFooter[] |
toArray()
Copies all
HeaderFoorter s from the collection to a new array of HeaderFoorter s. |
add, clear, contains, getContainer, getCount, getCurrentNode, getNextMatchingNode, indexOf, insert, iterator, remove, removeAtpublic Node get(int index)
The index is zero-based.
Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.
If index is greater than or equal to the number of items in the list, this returns a null reference.
If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.
get in class NodeCollectionindex - An index into the collection.HeaderFooter value.public HeaderFooter getByHeaderFooterType(int headerFooterType)
public void linkToPrevious(boolean isLinkToPrevious)
If any of the headers or footers do not exist, creates them automatically.
isLinkToPrevious - True to link the headers and footers to the previous section; false to unlink them.public void linkToPrevious(int headerFooterType,
boolean isLinkToPrevious)
public HeaderFooter[] toArray()
HeaderFoorter s from the collection to a new array of HeaderFoorter s.toArray in class NodeCollectionHeaderFoorter s.