Package ntnu.team1.application.helpers
Class RegisterModifiers
java.lang.Object
ntnu.team1.application.helpers.RegisterModifiers
Class used for modifying the register
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreates a window for adding a new categorystatic voidCreates a window for adding a new taskstatic voideditCategory(Category selectedCategory)Creates a window for editing a categorystatic voidMethod for creating a window where you can edit an existing taskstatic voidremoveAllTasksInCategory(int categoryId)Creates a confirmation for deleting a category, also deletes all tasks associated with the categorystatic voidremoveCategory(Category selectedCategory)Removes the selected categorystatic voidremoveTask(Task task)Creates a confiramtion dialog for removing a task
-
Constructor Details
-
RegisterModifiers
public RegisterModifiers()
-
-
Method Details
-
editTask
Method for creating a window where you can edit an existing task- Parameters:
existingTask- The task that should be edited
-
addNewTask
public static void addNewTask()Creates a window for adding a new task -
removeTask
Creates a confiramtion dialog for removing a task- Parameters:
task- Task to be removed- Throws:
FileNotFoundException
-
removeAllTasksInCategory
public static void removeAllTasksInCategory(int categoryId)Creates a confirmation for deleting a category, also deletes all tasks associated with the category- Parameters:
categoryId- Id of category to be deleted
-
addNewCategory
public static void addNewCategory()Creates a window for adding a new category -
editCategory
Creates a window for editing a category- Parameters:
selectedCategory- Category to be edited
-
removeCategory
Removes the selected category- Parameters:
selectedCategory- Category to be removed- Throws:
RemoveException- If it cant remove the selected category
-