From 0adbe6caf3fe94874e2744ab509e4194c1e85782 Mon Sep 17 00:00:00 2001 From: Kevin Pfannenstiel Date: Mon, 6 Feb 2023 05:11:36 +0100 Subject: [PATCH] commented --- .../example/vpr_javafx/MainController.java | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/example/vpr_javafx/MainController.java b/src/main/java/com/example/vpr_javafx/MainController.java index d437490..8ae844c 100644 --- a/src/main/java/com/example/vpr_javafx/MainController.java +++ b/src/main/java/com/example/vpr_javafx/MainController.java @@ -158,6 +158,13 @@ public class MainController { private ArrayList chosenMeals; + /** + * OnSignInButton() validates if the input of the logindata are valid when the user click on the button. + * + * @author Kevin Pfannenstiel + * @param event + * @throws IOException + */ @FXML protected void OnSignInButton(ActionEvent event) throws IOException { @@ -165,7 +172,11 @@ public class MainController { data.validateData(tfPhone, pfPassword, this); } - + /** + * FillLabels() fills the labels with the dishes, allergenics and the dates. + * + * @author Kevin Pfannenstiel, Felix Düsterhaus + */ @FXML protected void FillLabels() { try { @@ -362,6 +373,12 @@ public class MainController { } } + /** + * setRadioButton() is used in the validateData() method and activates the radiobuttons in the scene, if the + * logindata are valid. + * + * @author Kevin Pfannenstiel + */ @FXML protected void setRadioButton() { @@ -396,6 +413,12 @@ public class MainController { rbFriH2.setVisible(true); } + /** + * resetSelection() sets the radiobuttons inactive. + * + * @author Kevin Pfannenstiel + * @param event + */ @FXML protected void resetSelection(ActionEvent event) { @@ -412,6 +435,13 @@ public class MainController { chosenMeals.clear(); } + /** + * toOrder() writes the orders of the user in a text-file and switches the scene to the order-menu + * + * @author Kevin Pfannenstiel + * @param event + * @throws IOException + */ @FXML protected void toOrder(ActionEvent event) throws IOException { @@ -442,13 +472,13 @@ public class MainController { } } - @FXML - protected void removeFromOrder() throws IOException - { - - } - - + /** + * getLabelValueWithRadio() gets the string from the Label which is connected to the selected radiobutton + * and inserts it into a list + * + * @author Kevin Pfannenstiel + * @return + */ @FXML protected ArrayList getLabelValueWithRadio() {