use of org.openlca.app.editors.graphical.command.ChangeStateCommand in project olca-app by GreenDelta.
the class ChangeAllStateAction method run.
@Override
public void run() {
Command actualCommand = null;
for (ProcessNode node : editor.getModel().getChildren()) {
boolean minimize = type == MINIMIZE;
if (node.isMinimized() == minimize)
continue;
ChangeStateCommand newCommand = new ChangeStateCommand(node);
actualCommand = Commands.chain(newCommand, actualCommand);
}
if (actualCommand == null)
return;
editor.getCommandStack().execute(actualCommand);
}
Aggregations