93949596979899100101102103
command.add(UnexecutableCommand.INSTANCE); return command; } else if(oldIndex <= tempIndex){ tempIndex--; } command.add(new ReorderPartCommand( (LogicSubpart)child.getModel(), (LogicDiagram)getHost().getModel(), tempIndex)); } return command;
8182838485868788
LogicDiagram parentModel = (LogicDiagram)getHost().getModel(); int oldIndex = getHost().getChildren().indexOf(child); int newIndex = getHost().getChildren().indexOf(after); if (newIndex > oldIndex) newIndex--; ReorderPartCommand command = new ReorderPartCommand(childModel, parentModel, newIndex); return command; }