463464465466467468469470471
} } public void executeMoveSelectionByOne(int direction) { Command comm = new MoveByOne(selected, direction); executeCommand(comm); }
469470471472473474475476477
executeCommand(comm); } public void executeResizeSelectionByOne(boolean up) { Command comm = new ResizeByOne(selected, up); executeCommand(comm); }
475476477478479480481482483
executeCommand(comm); } public void executeDelete() { Command comm = new DeleteCommand(); executeCommand(comm); }
481482483484485486487488489
executeCommand(comm); } public void executeDraw(Krug toDraw) { Command comm = new DrawCommand(toDraw); executeCommand(comm); }
491492493494495496497498499
public void startResize() { oldSelectedR = getSelected().getPoluprecnik(); } public void executeResize() { Command comm = new ResizeCommand(oldSelectedR, selected.getPoluprecnik(), selected); executeCommand(comm); }
501502503504505506507508509
public void startMove() { oldSelectedCenter = getSelected().getCentar(); } public void executeMove() { Command comm = new MoveCommand(oldSelectedCenter, selected.getCentar(), selected); executeCommand(comm); }
517518519520521522523524525526527528529
ActionManager.getInstance().undoEnabled(true); } public void undo() { if (doneCommands.size() > 0) { Command comm = doneCommands.pop(); comm.undo(); undoneCommands.push(comm); } ActionManager.getInstance().redoEnabled(true);
535536537538539540541542543544545546547
drawImage(); } public void redo() { if (undoneCommands.size() > 0) { Command comm = undoneCommands.pop(); comm.execute(); doneCommands.push(comm); } if (undoneCommands.size() == 0) {