Class PageTreeNode
- java.lang.Object
-
- de.erichseifert.vectorgraphics2d.pdf.PageTreeNode
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Page>
children
private PageTreeNode
parent
-
Constructor Summary
Constructors Constructor Description PageTreeNode(PageTreeNode parent)
Initializes aPageTreeNode
with the specified parent node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Page page)
Adds the specifiedPage
to the node's children.int
getCount()
Returns the total number ofPage
objects in this subtree.java.util.List<Page>
getKids()
Returns allPage
objects that are immediate children of this node.PageTreeNode
getParent()
Returns the parent of this node.java.lang.String
getType()
Returns the type of this object.
-
-
-
Field Detail
-
parent
private final PageTreeNode parent
-
children
private final java.util.List<Page> children
-
-
Constructor Detail
-
PageTreeNode
public PageTreeNode(PageTreeNode parent)
Initializes aPageTreeNode
with the specified parent node.- Parameters:
parent
- Parent node ornull
to create a root node.
-
-
Method Detail
-
getType
public java.lang.String getType()
Returns the type of this object. The return value is always Pages.- Returns:
- The String Pages.
-
getParent
public PageTreeNode getParent()
Returns the parent of this node. If this node is a root node, the method returnsnull
.- Returns:
- Parent node or
null
, if this is a root node.
-
add
public void add(Page page)
Adds the specifiedPage
to the node's children.- Parameters:
page
-Page
to be added.
-
getKids
public java.util.List<Page> getKids()
Returns allPage
objects that are immediate children of this node.- Returns:
- List of child pages.
-
getCount
public int getCount()
Returns the total number ofPage
objects in this subtree.- Returns:
- Number of pages that are direct or indirect children.
-
-