|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.pdf.cos.COSBasedObject
de.intarsys.pdf.pd.PDObject
de.intarsys.pdf.pd.PDPageNode
de.intarsys.pdf.pd.PDPageTree
public class PDPageTree
A page tree node is a container for pages (and other page tree nodes) within
a PFD document. All pages in the document are direct or indirect children of
the root page tree node in the COSCatalog object
| Nested Class Summary | |
|---|---|
static class |
PDPageTree.MetaClass
The meta class implementation |
| Field Summary | |
|---|---|
static COSName |
DK_Count
|
static COSName |
DK_Kids
|
static PDPageTree.MetaClass |
META
The meta class instance |
| Fields inherited from class de.intarsys.pdf.pd.PDPageNode |
|---|
CN_Type_Page, CN_Type_Pages, DK_Parent, DK_Rotate |
| Fields inherited from class de.intarsys.pdf.pd.PDObject |
|---|
DK_Subtype, DK_Type |
| Method Summary | |
|---|---|
void |
addNode(int index,
PDPageNode newNode)
Add a page after at the designated index. |
void |
addNode(PDPageNode newNode)
Add a page as immediate child at last position |
void |
addNodeAfter(PDPageNode newNode,
PDPageNode destination)
Add a page after the designated destination page. the destination page must be in the receiver tree node |
int |
getCount()
The total number of pages represented by this node. |
PDPageNode |
getFirstNode()
Get the first node within the receiver or the receiver if it is not a collection (page tree). |
PDPage |
getFirstPage()
Get the first page (leaf node) within the receiver hierarchy. |
List |
getGenericChildren()
Get a collection of PDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields). |
List |
getKids()
Get the list of all page nodes that are children of the receiver. |
PDPageNode |
getLastNode()
Get the last node within the receiver or the receiver if it is not a collection (page tree). |
PDPage |
getLastPage()
Get the last page (leaf node) within the receiver hierarchy. |
void |
invalidateCaches()
Invalidate all local caches as the base object may have changed. |
boolean |
isPage()
Answer true if this is a single page node. |
boolean |
isValid()
true if this page node object is a valid participant in
the documents page tree. |
PDPageTree |
rebalance()
Rebalance this. |
void |
removeNode(PDPageNode node)
Remove a node |
| Methods inherited from class de.intarsys.pdf.pd.PDPageNode |
|---|
dispose, getCropBox, getFirstAnnotation, getGenericParent, getLastAnnotation, getMediaBox, getNextNode, getNodeIndex, getPageAt, getParent, getPreviousNode, getRotate, setCropBox, setGenericParent, setMediaBox, setRotate |
| Methods inherited from class de.intarsys.pdf.pd.PDObject |
|---|
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, toString |
| Methods inherited from class de.intarsys.pdf.cos.COSBasedObject |
|---|
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PDPageTree.MetaClass META
public static final COSName DK_Kids
public static final COSName DK_Count
| Method Detail |
|---|
public void addNode(int index,
PDPageNode newNode)
index - the index which to insert the new child atnewNode - the child page to addpublic void addNode(PDPageNode newNode)
newNode - the child page to create
public void addNodeAfter(PDPageNode newNode,
PDPageNode destination)
newNode - the child page to adddestination - the page after which to insert the new childpublic int getCount()
PDPageNode
getCount in class PDPageNodepublic PDPageNode getFirstNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getFirstNode in class PDPageNodepublic PDPage getFirstPage()
PDPageNode
getFirstPage in class PDPageNodepublic List getGenericChildren()
PDObjectPDObject children if the receiver is a node
in a hierarchical structure (like page nodes or form fields).
This enables the generic implementation of inherited field values and so on.
A concrete PDObject implementation supporting inheritance should implement this method.
getGenericChildren in class PDObjectPDObject children if the receiver is a
node in a hierarchical structure .public List getKids()
public PDPageNode getLastNode()
PDPageNodeThis may return null if the receiver is an empty collection.
getLastNode in class PDPageNodepublic PDPage getLastPage()
PDPageNode
getLastPage in class PDPageNodepublic void invalidateCaches()
COSBasedObject
invalidateCaches in class PDPageNodepublic boolean isPage()
PDPageNodetrue if this is a single page node.
isPage in class PDPageNodetrue if this is a single page node.public boolean isValid()
PDPageNodetrue if this page node object is a valid participant in
the documents page tree.
isValid in class PDPageNodetrue if this page node object is a valid
participant in the documents page tree.public PDPageTree rebalance()
PDPageTree created or null if nothing changed.public void removeNode(PDPageNode node)
node - The child node to remove
|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||