|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.dom.traversal.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 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,
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() . |
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 NodeFilter filter
protected boolean expandEntityReferences
protected Node currentNode
Constructor Detail |
public DOMTreeWalker(Node n, int what, 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 TreeWalker
public int getWhatToShow()
TreeWalker.getWhatToShow()
.getWhatToShow
in interface TreeWalker
public NodeFilter getFilter()
TreeWalker.getFilter()
.getFilter
in interface TreeWalker
public boolean getExpandEntityReferences()
TreeWalker.getExpandEntityReferences()
.getExpandEntityReferences
in interface TreeWalker
public Node getCurrentNode()
TreeWalker.getCurrentNode()
.getCurrentNode
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
DOMException
- NOT_SUPPORTED_ERR: Raised if an attempt is made to set
currentNode
to null
.public void setCurrentNode(Node n)
TreeWalker.setCurrentNode(Node)
.setCurrentNode
in interface TreeWalker
public Node parentNode()
TreeWalker.parentNode()
.parentNode
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node
has no parent in the TreeWalker
's logical view.public Node firstChild()
TreeWalker.firstChild()
.firstChild
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
visible children in the TreeWalker
's logical view.public Node lastChild()
TreeWalker.lastChild()
.lastChild
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
children in the TreeWalker
's logical view.public Node previousSibling()
TreeWalker.previousSibling()
.previousSibling
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
previous sibling. in the TreeWalker
's logical view.public Node nextSibling()
TreeWalker.nextSibling()
.nextSibling
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
next sibling. in the TreeWalker
's logical view.public Node previousNode()
TreeWalker.previousNode()
.previousNode
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
previous node in the TreeWalker
's logical view.public Node nextNode()
TreeWalker.nextNode()
.nextNode
in interface TreeWalker
org.w3c.dom.traversal.TreeWalker
null
if the current node has no
next node in the TreeWalker
's logical view.protected 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |