Class TaskController

java.lang.Object
no.ntnu.idatt.controller.TaskController
Direct Known Subclasses:
ExtendedTaskController

public class TaskController extends Object
The controller for task.fxml. It is a superclass of the ExtendedTaskController.

The controller contains methods to edit tasks and to change the view style

  • Field Details

    • taskRoot

      protected javafx.scene.layout.StackPane taskRoot
    • label

      protected javafx.scene.control.Label label
    • dueDate

      protected javafx.scene.control.Label dueDate
    • checkButton

      protected javafx.scene.control.Button checkButton
    • task

      protected Task task
    • mainController

      protected MainController mainController
  • Constructor Details

    • TaskController

      public TaskController()
  • Method Details

    • initialize

      public void initialize(Task task)
      Fills the element with information
      Parameters:
      task - the task the element gets information from
    • setMainController

      public void setMainController(MainController mainController)
      Allows the task controller to use methods from the main controller
      Parameters:
      mainController -
    • setLabel

      public void setLabel(String label)
    • setDueDate

      public void setDueDate(Task task)
      Sets the due date label, it also formats the label depending on the due dates relation to the current date
      Parameters:
      task - element to get the duedate from
    • setTask

      public void setTask(Task task)
    • completed

      public void completed(boolean completed, int priority)
      Change style of button depending on completion status and priority
      Parameters:
      completed -
      priority -
    • handleCheckButtonAction

      public void handleCheckButtonAction()
      Changes completion status and style of button when pressed
    • showTaskExtendedLayer

      public void showTaskExtendedLayer()
      Shows extended view of task