Class PageTreeNode
- java.lang.Object
-
- de.erichseifert.vectorgraphics2d.pdf.PageTreeNode
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Page>childrenprivate PageTreeNodeparent
-
Constructor Summary
Constructors Constructor Description PageTreeNode(PageTreeNode parent)Initializes aPageTreeNodewith the specified parent node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Page page)Adds the specifiedPageto the node's children.intgetCount()Returns the total number ofPageobjects in this subtree.java.util.List<Page>getKids()Returns allPageobjects that are immediate children of this node.PageTreeNodegetParent()Returns the parent of this node.java.lang.StringgetType()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 aPageTreeNodewith the specified parent node.- Parameters:
parent- Parent node ornullto 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 specifiedPageto the node's children.- Parameters:
page-Pageto be added.
-
getKids
public java.util.List<Page> getKids()
Returns allPageobjects that are immediate children of this node.- Returns:
- List of child pages.
-
getCount
public int getCount()
Returns the total number ofPageobjects in this subtree.- Returns:
- Number of pages that are direct or indirect children.
-
-