Constructor constructor = layoutC.getConstructor(new Class[] {Graph.class});
Object o = constructor.newInstance(map);
final Layout<Device, Connection> newLayout = (Layout<Device, Connection>) o;
newLayout.setInitializer(vv.getGraphLayout());
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();