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.ButtonImage for showing the product logojavafx.scene.control.MenuItemMenu item for adding tasksjavafx.scene.layout.AnchorPaneMain anchor pane of the windows -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds new categoryvoidAdds new taskvoidexit()Gets called on exit.voidMethod for generating the category list and displaying it Configures the view and adds neccesary informationvoidMethod 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 secondsvoidshowByCategory(int id)Changes the pane to category viewvoidSwitches the view to categoriesvoidSwitches 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.
-