Package ntnu.team1.application.main
Class MainApplicationController
java.lang.Object
ntnu.team1.application.main.MainApplicationController
Class that handles the main view of the application
-
Field Summary
FieldsModifier and TypeFieldDescriptionjavafx.scene.control.Button
Image for showing the product logojavafx.scene.control.MenuItem
Menu item for adding tasksjavafx.scene.layout.AnchorPane
Main anchor pane of the windows -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds new categoryvoid
Adds new taskvoid
exit()
Gets called on exit.void
Method for generating the category list and displaying it Configures the view and adds neccesary informationvoid
Method that gets called on load of class Sets up necessary layout and configures it Sets up a check and updates category list every 0.1 secondsvoid
showByCategory(int id)
Changes the pane to category viewvoid
Switches the view to categoriesvoid
Switches the view to tasks
-
Field Details
-
logoImage
public javafx.scene.control.Button logoImageImage for showing the product logo -
pane
public javafx.scene.layout.AnchorPane paneMain anchor pane of the windows
-
Constructor Details
-
MainApplicationController
public MainApplicationController()
-
-
Method Details
-
initialize
Method that gets called on load of class Sets up necessary layout and configures it Sets up a check and updates category list every 0.1 seconds- Throws:
IOException
- if the fxml file isnt found
-
generateCategoryList
public void generateCategoryList()Method for generating the category list and displaying it Configures the view and adds neccesary information -
showByCategory
Changes the pane to category view- Parameters:
id
- Id of the category we want to load- Throws:
IOException
- If the fxml file cant be found
-
switchToTasks
Switches the view to tasks- Throws:
IOException
- Throws IOException if the fxml file cannot be found
-
switchToCategory
Switches the view to categories- Throws:
IOException
- Throws IOException if the fxml file cannot be found
-
addNewTask
Adds new task- Throws:
IOException
- if fxml file not found
-
addNewCategory
Adds new category- Throws:
IOException
- if fxml file not found
-
exit
public void exit()Gets called on exit.
-