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 void
Creates a window for adding a new categorystatic void
Creates a window for adding a new taskstatic void
editCategory(Category selectedCategory)
Creates a window for editing a categorystatic void
Method for creating a window where you can edit an existing taskstatic void
removeAllTasksInCategory(int categoryId)
Creates a confirmation for deleting a category, also deletes all tasks associated with the categorystatic void
removeCategory(Category selectedCategory)
Removes the selected categorystatic void
removeTask(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
-