Class MainApplicationController

java.lang.Object
ntnu.team1.application.main.MainApplicationController

public class MainApplicationController extends Object
Class that handles the main view of the application
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    javafx.scene.control.Button
    Image for showing the product logo
    javafx.scene.control.MenuItem
    Menu item for adding tasks
    javafx.scene.layout.AnchorPane
    Main anchor pane of the windows
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds new category
    void
    Adds new task
    void
    Gets called on exit.
    void
    Method for generating the category list and displaying it Configures the view and adds neccesary information
    void
    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
    void
    showByCategory​(int id)
    Changes the pane to category view
    void
    Switches the view to categories
    void
    Switches the view to tasks

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logoImage

      public javafx.scene.control.Button logoImage
      Image for showing the product logo
    • pane

      public javafx.scene.layout.AnchorPane pane
      Main anchor pane of the windows
  • Constructor Details

    • MainApplicationController

      public MainApplicationController()
  • Method Details

    • initialize

      public void initialize() throws IOException
      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

      public void showByCategory(int id) throws IOException
      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

      public void switchToTasks() throws IOException
      Switches the view to tasks
      Throws:
      IOException - Throws IOException if the fxml file cannot be found
    • switchToCategory

      public void switchToCategory() throws IOException
      Switches the view to categories
      Throws:
      IOException - Throws IOException if the fxml file cannot be found
    • addNewTask

      public void addNewTask() throws IOException
      Adds new task
      Throws:
      IOException - if fxml file not found
    • addNewCategory

      public void addNewCategory() throws IOException
      Adds new category
      Throws:
      IOException - if fxml file not found
    • exit

      public void exit()
      Gets called on exit.