StaticLayout<Number,Number> staticLayout =
new StaticLayout<Number,Number>(g, layout);
LayoutTransition<Number,Number> lt =
new LayoutTransition<Number,Number>(vv, vv.getGraphLayout(),
staticLayout);
Animator animator = new Animator(lt);
animator.start();
// vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
} else {
switchLayout.setText("Switch to SpringLayout");
layout = new FRLayout<Number,Number>(g, d);
layout.setSize(d);
Relaxer relaxer = new VisRunner((IterativeContext)layout);
relaxer.stop();
relaxer.prerelax();
StaticLayout<Number,Number> staticLayout =
new StaticLayout<Number,Number>(g, layout);
LayoutTransition<Number,Number> lt =
new LayoutTransition<Number,Number>(vv, vv.getGraphLayout(),
staticLayout);
Animator animator = new Animator(lt);
animator.start();
// vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
}
}