Package org.apache.batik.gvt
Class GVTTreeWalker
java.lang.Object
org.apache.batik.gvt.GVTTreeWalker
GVTTreeWalker
objects are used to navigate a GVT tree or subtree.- Version:
- $Id: GVTTreeWalker.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GraphicsNode
The current GraphicsNode.protected GraphicsNode
The GVT root into which text is searched.protected GraphicsNode
The root of the subtree of the GVT which is traversed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the first child of the currentGraphicsNode
.Returns the currentGraphicsNode
.protected static GraphicsNode
getFirstChild
(GraphicsNode node) Returns the GVT root graphics node.protected static GraphicsNode
getLastChild
(GraphicsNode node) protected GraphicsNode
Returns the next sibling of the currentGraphicsNode
.protected static GraphicsNode
getNextSibling
(GraphicsNode node) protected GraphicsNode
Returns the next previous of the currentGraphicsNode
.protected static GraphicsNode
getRoot()
Returns the root graphics node.Returns the last child of the currentGraphicsNode
.Returns the nextGraphicsNode
.Returns the parent of the currentGraphicsNode
.Returns the previousGraphicsNode
.void
Sets the current GraphicsNode to the specified node.
-
Field Details
-
gvtRoot
The GVT root into which text is searched. -
treeRoot
The root of the subtree of the GVT which is traversed. -
currentNode
The current GraphicsNode.
-
-
Constructor Details
-
GVTTreeWalker
Constructs a newGVTTreeWalker
.- Parameters:
treeRoot
- the top of the graphics node tree to search
-
-
Method Details
-
getRoot
Returns the root graphics node. -
getGVTRoot
Returns the GVT root graphics node. -
setCurrentGraphicsNode
Sets the current GraphicsNode to the specified node.- Parameters:
node
- the new current graphics node- Throws:
IllegalArgumentException
- if the node is not part of the GVT Tree this walker is dedicated to
-
getCurrentGraphicsNode
Returns the currentGraphicsNode
. -
previousGraphicsNode
Returns the previousGraphicsNode
. If the current graphics node does not have a previous node, returns null and retains the current node. -
nextGraphicsNode
Returns the nextGraphicsNode
. If the current graphics node does not have a next node, returns null and retains the current node. -
parentGraphicsNode
Returns the parent of the currentGraphicsNode
. If the current graphics node has no parent, returns null and retains the current node. -
getNextSibling
Returns the next sibling of the currentGraphicsNode
. If the current graphics node does not have a next sibling, returns null and retains the current node. -
getPreviousSibling
Returns the next previous of the currentGraphicsNode
. If the current graphics node does not have a previous sibling, returns null and retains the current node. -
firstChild
Returns the first child of the currentGraphicsNode
. If the current graphics node does not have a first child, returns null and retains the current node. -
lastChild
Returns the last child of the currentGraphicsNode
. If the current graphics node does not have a last child, returns null and retains the current node. -
getNextGraphicsNode
-
getPreviousGraphicsNode
-
getLastChild
-
getPreviousSibling
-
getFirstChild
-
getNextSibling
-