use of org.freeplane.features.cloud.CloudModel.Shape in project freeplane by freeplane.
the class MCloudController method setShape.
public void setShape(final NodeModel node, final CloudModel.Shape shape) {
setCloud(node, true);
final ModeController modeController = Controller.getCurrentModeController();
final CloudModel.Shape oldShape = CloudModel.getModel(node).getShape();
if (shape == oldShape || shape != null && shape.equals(oldShape)) {
return;
}
final IActor actor = new IActor() {
public void act() {
CloudModel.getModel(node).setShape(shape);
modeController.getMapController().nodeChanged(node);
}
public String getDescription() {
return "setShape";
}
public void undo() {
CloudModel.getModel(node).setShape(oldShape);
modeController.getMapController().nodeChanged(node);
}
};
modeController.execute(actor, node.getMap());
}
Aggregations