COSObjectable
PDDocumentOutline
, PDOutlineItem
public class PDOutlineNode extends java.lang.Object implements COSObjectable
Modifier and Type | Field | Description |
---|---|---|
protected COSDictionary |
node |
The dictionary for this node.
|
Constructor | Description |
---|---|
PDOutlineNode() |
Default Constructor.
|
PDOutlineNode(COSDictionary dict) |
Default Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
appendChild(PDOutlineItem outlineNode) |
append a child node to this node.
|
void |
closeNode() |
Close this node.
|
COSDictionary |
getCOSDictionary() |
Convert this standard java object to a COS object.
|
COSBase |
getCOSObject() |
Convert this standard java object to a COS object.
|
PDOutlineItem |
getFirstChild() |
Return the first child or null if there is no child.
|
PDOutlineItem |
getLastChild() |
Return the last child or null if there is no child.
|
int |
getOpenCount() |
Get the number of open nodes.
|
protected PDOutlineNode |
getParent() |
Get the parent of this object.
|
boolean |
isNodeOpen() |
Node is open if the open count is greater than zero.
|
void |
openNode() |
This will set this node to be open when it is shown in the viewer.
|
protected void |
setFirstChild(PDOutlineNode outlineNode) |
Set the first child, this will be maintained by this class.
|
protected void |
setLastChild(PDOutlineNode outlineNode) |
Set the last child, this will be maintained by this class.
|
protected void |
setOpenCount(int openCount) |
Set the open count.
|
protected void |
setParent(PDOutlineNode parent) |
Set the parent of this object, this is maintained by these objects and should not
be called by any clients of PDFBox code.
|
protected void |
updateParentOpenCount(int amount) |
The count parameter needs to be updated when you add or remove elements to
the outline.
|
protected COSDictionary node
public PDOutlineNode()
public PDOutlineNode(COSDictionary dict)
dict
- The dictionary storage.public COSBase getCOSObject()
getCOSObject
in interface COSObjectable
public COSDictionary getCOSDictionary()
protected PDOutlineNode getParent()
protected void setParent(PDOutlineNode parent)
parent
- The parent of this object.public void appendChild(PDOutlineItem outlineNode)
outlineNode
- The node to add.public PDOutlineItem getFirstChild()
protected void setFirstChild(PDOutlineNode outlineNode)
outlineNode
- The new first child.public PDOutlineItem getLastChild()
protected void setLastChild(PDOutlineNode outlineNode)
outlineNode
- The new last child.public int getOpenCount()
protected void setOpenCount(int openCount)
openCount
- The new open cound.public void openNode()
public void closeNode()
public boolean isNodeOpen()
protected void updateParentOpenCount(int amount)
amount
- The amount to update by.