|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.dom.traversal.DOMTreeWalker
public class DOMTreeWalker
This class implements the NodeIterator
interface.
| Field Summary | |
|---|---|
protected Node |
currentNode
The current node. |
protected boolean |
expandEntityReferences
Whether the children of entity reference nodes are visible to the iterator. |
protected org.w3c.dom.traversal.NodeFilter |
filter
The NodeFilter used to screen nodes. |
protected Node |
root
The root node. |
protected int |
whatToShow
Which node types are presented via the iterator. |
| Constructor Summary | |
|---|---|
DOMTreeWalker(Node n,
int what,
org.w3c.dom.traversal.NodeFilter nf,
boolean exp)
Creates a new TreeWalker object. |
|
| Method Summary | |
|---|---|
protected short |
acceptNode(Node n)
Whether or not the given node is accepted by this tree walker. |
Node |
firstChild()
DOM: Implements TreeWalker.firstChild(). |
protected Node |
firstChild(Node n)
Returns the first child of the given node. |
Node |
getCurrentNode()
DOM: Implements TreeWalker.getCurrentNode(). |
boolean |
getExpandEntityReferences()
DOM: Implements TreeWalker.getExpandEntityReferences(). |
org.w3c.dom.traversal.NodeFilter |
getFilter()
DOM: Implements TreeWalker.getFilter(). |
Node |
getRoot()
DOM: Implements TreeWalker.getRoot(). |
int |
getWhatToShow()
DOM: Implements TreeWalker.getWhatToShow(). |
Node |
lastChild()
DOM: Implements TreeWalker.lastChild(). |
protected Node |
lastChild(Node n)
Returns the last child of the given node. |
Node |
nextNode()
DOM: Implements TreeWalker.nextNode(). |
Node |
nextSibling()
DOM: Implements TreeWalker.nextSibling(). |
protected Node |
nextSibling(Node n,
Node root)
Returns the next sibling of the given node. |
Node |
parentNode()
DOM: Implements TreeWalker.parentNode(). |
protected Node |
parentNode(Node n)
Returns the parent node of the given node. |
Node |
previousNode()
DOM: Implements TreeWalker.previousNode(). |
Node |
previousSibling()
DOM: Implements TreeWalker.previousSibling(). |
protected Node |
previousSibling(Node n,
Node root)
Returns the previous sibling of the given node. |
void |
setCurrentNode(Node n)
DOM: Implements TreeWalker.setCurrentNode(Node). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Node root
protected int whatToShow
protected org.w3c.dom.traversal.NodeFilter filter
protected boolean expandEntityReferences
protected Node currentNode
| Constructor Detail |
|---|
public DOMTreeWalker(Node n,
int what,
org.w3c.dom.traversal.NodeFilter nf,
boolean exp)
n - The root node.what - Which node types are presented via the iterator.nf - The NodeFilter used to screen nodes.exp - Whether the children of entity reference nodes are visible
to the tree walker.| Method Detail |
|---|
public Node getRoot()
TreeWalker.getRoot().
getRoot in interface org.w3c.dom.traversal.TreeWalkerpublic int getWhatToShow()
TreeWalker.getWhatToShow().
getWhatToShow in interface org.w3c.dom.traversal.TreeWalkerpublic org.w3c.dom.traversal.NodeFilter getFilter()
TreeWalker.getFilter().
getFilter in interface org.w3c.dom.traversal.TreeWalkerpublic boolean getExpandEntityReferences()
TreeWalker.getExpandEntityReferences().
getExpandEntityReferences in interface org.w3c.dom.traversal.TreeWalkerpublic Node getCurrentNode()
TreeWalker.getCurrentNode().
getCurrentNode in interface org.w3c.dom.traversal.TreeWalkerpublic void setCurrentNode(Node n)
TreeWalker.setCurrentNode(Node).
setCurrentNode in interface org.w3c.dom.traversal.TreeWalkerpublic Node parentNode()
TreeWalker.parentNode().
parentNode in interface org.w3c.dom.traversal.TreeWalkerpublic Node firstChild()
TreeWalker.firstChild().
firstChild in interface org.w3c.dom.traversal.TreeWalkerpublic Node lastChild()
TreeWalker.lastChild().
lastChild in interface org.w3c.dom.traversal.TreeWalkerpublic Node previousSibling()
TreeWalker.previousSibling().
previousSibling in interface org.w3c.dom.traversal.TreeWalkerpublic Node nextSibling()
TreeWalker.nextSibling().
nextSibling in interface org.w3c.dom.traversal.TreeWalkerpublic Node previousNode()
TreeWalker.previousNode().
previousNode in interface org.w3c.dom.traversal.TreeWalkerpublic Node nextNode()
TreeWalker.nextNode().
nextNode in interface org.w3c.dom.traversal.TreeWalkerprotected Node parentNode(Node n)
protected Node firstChild(Node n)
protected Node lastChild(Node n)
protected Node previousSibling(Node n,
Node root)
protected Node nextSibling(Node n,
Node root)
protected short acceptNode(Node n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||