org.eclipse.actf.accservice.core
Class AccessibleElementTreeWalker
java.lang.Object
org.eclipse.actf.model.traverse.AbstractNodeWalker
org.eclipse.actf.model.traverse.AbstractTreeNodeWalker
org.eclipse.actf.accservice.core.AccessibleElementTreeWalker
- All Implemented Interfaces:
- INodeWalker, ITreeNodeWalker
public class AccessibleElementTreeWalker
- extends AbstractTreeNodeWalker
implementation of TreeWalker
for walking a tree of IAccessibleElement
- Author:
- Mike Squillace
- See Also:
IAccessibleElement
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccessibleElementTreeWalker
public AccessibleElementTreeWalker()
getChildren
public Object[] getChildren(Object element)
throws InvalidComponentException
- Description copied from interface:
ITreeNodeWalker
- 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
getChild
public Object getChild(Object element,
int index)
throws InvalidComponentException
- default implementation returns the child at the specified index in the array returned by
a call to
getChildren
. This method should be overwritten by clients (if possible)
for the sake of performance.
- Specified by:
getChild
in interface ITreeNodeWalker
- Overrides:
getChild
in class AbstractTreeNodeWalker
- Parameters:
element
- - node of treeindex
- - index of desired child
- Returns:
- child at specified index in array of children returned by
getChildren
- Throws:
InvalidComponentException
- if element is disposed or otherwise invalid
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
hasChildren
public boolean hasChildren(Object element)
throws InvalidComponentException
- returns whether or not the given node has any children.
- Specified by:
hasChildren
in interface ITreeNodeWalker
- Overrides:
hasChildren
in class AbstractTreeNodeWalker
- Parameters:
element
- - node of tree
- Returns:
true
if node has children, false
otherwise
- Throws:
InvalidComponentException
- if component 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