vis.putAction("recolor", recolor);
// repaint
ActionList repaint = new ActionList();
repaint.add(recolor);
repaint.add(new RepaintAction());
vis.putAction("repaint", repaint);
// animate paint change
ActionList animatePaint = new ActionList(400);
animatePaint.add(new ColorAnimator(Constants.TREE_NODES));
animatePaint.add(new RepaintAction());
vis.putAction("animatePaint", animatePaint);
//TreeLayout graphLayout = new RadialTreeLayout(Constants.TREE);
graphLayout =
new NodeLinkTreeLayout(Constants.TREE, orientation, 48, 12, 16);
// create the tree layout action
CollapsedSubtreeLayout subLayout = new CollapsedSubtreeLayout(Constants.TREE);
vis.putAction("subLayout", subLayout);
ActionList layout = new ActionList(Activity.INFINITY);
layout.add(graphLayout);
layout.add(subLayout);
layout.add(new LabelPositionLayout(Constants.NODE_DECORATORS));
vis.putAction("graphLayout", layout);
ActionList treeRoot = new ActionList();
treeRoot.add(new TreeRootAction(Constants.TREE));
vis.putAction("treeRoot", treeRoot);
// create the filtering and layout
ActionList filter = new ActionList();
filter.add(treeRoot);
filter.add(fonts);
filter.add(layout);
filter.add(edgeColor);
filter.add(recolor);
vis.putAction("filter", filter);
// animated transition
ActionList animate = new ActionList(1000);
animate.setPacingFunction(new SlowInSlowOutPacer());
animate.add(new QualityControlAnimator());
animate.add(new VisibilityAnimator(Constants.TREE));
animate.add(new PolarLocationAnimator(Constants.TREE_NODES,
Constants.LINEAR));
animate.add(new ColorAnimator(Constants.TREE_NODES));
animate.add(new RepaintAction());
vis.putAction("animate", animate);
vis.alwaysRunAfter("filter", "animate");
// initialize the display
setSize(500, 500);