}
return memento;
}
private Memento saveNodeLocations() {
Memento state = new Memento();
for (VisualItem visualItem : getVisualItems()) {
NodeItem nodeItem = visualItem.getDisplayObject();
Point location = graphDisplay.getLocation(nodeItem.getNode());
Memento nodeMemento = new Memento();
nodeMemento.setValue(MEMENTO_X, location.getX());
nodeMemento.setValue(MEMENTO_Y, location.getY());
state.addChild(visualItem.getId(), nodeMemento);
}
return state;
}