private void handleEditTask(Button source) { int taskId = getTaskId(source.getParent().getParent().getId()); EditTaskController editTaskController = new EditTaskController(userStoryModel.getTaskById(taskId)); TaskManagementEditTaskView editView = new TaskManagementEditTaskView(editTaskController, userStoryModel.getTaskById(taskId)); }
private void handleTaskOperations(Button source) { int taskId = getTaskId(source.getParent().getParent().getId()); switch (getButtonType(source.getId())) { case TASK_MOVEUP: userStoryModel.moveTaskUp(taskId); break; case TASK_MOVEDOWN: userStoryModel.moveTaskDown(taskId); break; case TASK_DELETE: userStoryModel.removeTask(taskId); break; case TASK_MOVERIGHT: userStoryModel.getTaskById(taskId).increaseStatus(); userStoryModel.notifyViews(); break; } }