prefuse.data.tree
Class FilteredDeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>
java.lang.Object
prefuse.data.tree.AbstractDeclarativeTree<N,E>
prefuse.data.tree.FilteredDeclarativeTree<N,E>
- Type Parameters:
N
- E
-
- All Implemented Interfaces:
- DeclarativeTree<N,E>
public class FilteredDeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>
- extends AbstractDeclarativeTree<N,E>
Allows a tree subset to be defined.
- Author:
- Anton Marsden
Method Summary |
java.util.List<E> |
childEdges(N n)
Get all the edges connecting a child to the parent node. |
java.util.List<N> |
children(N parent)
Get all the children of the parent node. |
N |
getParent(N child)
Get a node's parent node |
E |
getParentEdge(N child)
Get the edge to the given node's parent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeFilter
protected Predicate nodeFilter
reverse
protected boolean reverse
FilteredDeclarativeTree
public FilteredDeclarativeTree(N root,
Predicate nodeFilter)
FilteredDeclarativeTree
public FilteredDeclarativeTree(N root,
Predicate nodeFilter,
boolean reverse)
children
public java.util.List<N> children(N parent)
- Description copied from interface:
DeclarativeTree
- Get all the children of the parent node.
- Returns:
- an list of the child nodes of the parent node
getParent
public N getParent(N child)
- Description copied from interface:
DeclarativeTree
- Get a node's parent node
- Returns:
- the parent node, or null if there is no parent
getParentEdge
public E getParentEdge(N child)
- Description copied from interface:
DeclarativeTree
- Get the edge to the given node's parent.
- Returns:
- the parent Edge connecting the given node to its parent
childEdges
public java.util.List<E> childEdges(N n)
- Description copied from interface:
DeclarativeTree
- Get all the edges connecting a child to the parent node.
- Parameters:
n
- the parent node
- Returns:
- an list of the child edge nodes of the parent node
Copyright © 2008 Regents of the University of California