m_vis.putAction("layout", layout);
// the update list updates the colors of data points and sets the visual
// properties for any labels. Color updating is limited only to the
// current focus items, ensuring faster performance.
final Action update = new ZipColorAction(FOCUS);
m_vis.putAction("update", update);
// animate a change in color in the interface. this animation is quite
// short, only 200ms, so that it does not impede with interaction.
// color animation of data points looks only at the focus items,
// ensuring faster performance.
ActionList animate = new ActionList(200);
animate.add(new ColorAnimator(FOCUS, VisualItem.FILLCOLOR));
animate.add(new ColorAnimator(LABELS, VisualItem.TEXTCOLOR));
animate.add(new RepaintAction());
animate.addActivityListener(new ActivityAdapter() {
public void activityCancelled(Activity a) {
// if animation is canceled, set colors to final state
update.run(1.0);
}
});
m_vis.putAction("animate", animate);
// update items after a resize of the display, animating them to their