public class TreeDepthItemSorter extends ItemSorter
Modifier and Type | Field and Description |
---|---|
protected static int |
AGGREGATE |
protected static int |
DECORATOR |
protected static int |
EDGE |
protected static int |
ITEM |
protected static int |
NODE |
Constructor and Description |
---|
TreeDepthItemSorter()
Create a new TreeDepthItemSorter that orders nodes such that parents
are placed above their children.
|
TreeDepthItemSorter(boolean childrenAbove)
Create a new TreeDepthItemSorter with the given sort ordering by depth.
|
Modifier and Type | Method and Description |
---|---|
int |
score(VisualItem item)
Score items similarly to
ItemSorter , but additionally
ranks items based on their tree depth. |
compare, compare
protected static final int AGGREGATE
protected static final int EDGE
protected static final int ITEM
protected static final int NODE
protected static final int DECORATOR
public TreeDepthItemSorter()
public TreeDepthItemSorter(boolean childrenAbove)
childrenAbove
- true if children should be ordered above their
parents, false if parents should be ordered above their children.public int score(VisualItem item)
ItemSorter
, but additionally
ranks items based on their tree depth.score
in class ItemSorter
item
- the VisualItem to provide an ordering scoreItemSorter.score(prefuse.visual.VisualItem)
Copyright ? 2013 Regents of the University of California