java.lang.Object
no.ntnu.idatt.controller.TaskController
- Direct Known Subclasses:
ExtendedTaskController
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 Summary
FieldsModifier and TypeFieldDescriptionprotected javafx.scene.control.Button
protected javafx.scene.control.Label
protected javafx.scene.control.Label
protected MainController
protected Task
protected javafx.scene.layout.StackPane
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
completed(boolean completed, int priority)
Change style of button depending on completion status and priorityvoid
Changes completion status and style of button when pressedvoid
initialize(Task task)
Fills the element with informationvoid
setDueDate(Task task)
Sets the due date label, it also formats the label depending on the due dates relation to the current datevoid
void
setMainController(MainController mainController)
Allows the task controller to use methods from the main controllervoid
void
Shows extended view of task
-
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
-
mainController
-
-
Constructor Details
-
TaskController
public TaskController()
-
-
Method Details
-
initialize
Fills the element with information- Parameters:
task
- the task the element gets information from
-
setMainController
Allows the task controller to use methods from the main controller- Parameters:
mainController
-
-
setLabel
-
setDueDate
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
-
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
-