newLayout.setSize(vv.getSize());
map.getHistory().execute(new Command() {
@Override
public Object undo() {
map.setLayout(oldLayout);
new Animator(new LayoutTransition<Device, Connection>(vv, newLayout, oldLayout)).start();
vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
return null;
}
@Override
public Object redo() {
map.setLayout(newLayout);
new Animator(new LayoutTransition<Device, Connection>(vv, oldLayout, newLayout)).start();
vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
return null;
}
});