org.eclipse.actf.model.mozdom.traverse
Class MozillaDomTreeWalker
java.lang.Object
org.eclipse.actf.model.traverse.AbstractNodeWalker
org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
org.eclipse.actf.model.mozdom.traverse.MozillaDomTreeWalker
- All Implemented Interfaces:
- INodeWalker, ITreeNodeWalker
public class MozillaDomTreeWalker
- extends AbstractTreeNodeWalker
a tree walker for the Mozilla browser DOM. This TreeWalker is based on the hierarchy obtained from a
Mozilla browser via XPCOM. Thus, each node in the tree will be expected to be an instance of
org.mozilla.interfaces.nsIDOMNode
.
- Author:
- Mike Squillace
- See Also:
- XPCOM API Reference
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MozillaDomTreeWalker
public MozillaDomTreeWalker()
getChildren
public Object[] getChildren(Object element)
throws InvalidComponentException
- returns the children of the given node.
- Parameters:
element
- - node of tree
- Returns:
- children of given node or empty array if no children are found
- Throws:
InvalidComponentException
- if the element is disposed or otherwise invalid
getStartNodes
public Object[] getStartNodes()
- Description copied from interface:
INodeWalker
- get the starting nodes of the graph. These are the nodes of the graph that have
no predecessors.
- Returns:
- starting nodes of graph
getParent
public Object getParent(Object element)
throws InvalidComponentException
- return the parent of the given node.
- Parameters:
element
- - node of tree
- Returns:
- parent of given node or
null
if node has no parent
- Throws:
InvalidComponentException
- if component is disposed or otherwise invalid