commented

This commit is contained in:
Kevin Pfannenstiel 2023-02-06 05:11:36 +01:00
parent 911dd9f2d3
commit 0adbe6caf3

View File

@ -158,6 +158,13 @@ public class MainController {
private ArrayList<String> chosenMeals; private ArrayList<String> 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 @FXML
protected void OnSignInButton(ActionEvent event) throws IOException protected void OnSignInButton(ActionEvent event) throws IOException
{ {
@ -165,7 +172,11 @@ public class MainController {
data.validateData(tfPhone, pfPassword, this); data.validateData(tfPhone, pfPassword, this);
} }
/**
* FillLabels() fills the labels with the dishes, allergenics and the dates.
*
* @author Kevin Pfannenstiel, Felix Düsterhaus
*/
@FXML @FXML
protected void FillLabels() { protected void FillLabels() {
try { 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 @FXML
protected void setRadioButton() protected void setRadioButton()
{ {
@ -396,6 +413,12 @@ public class MainController {
rbFriH2.setVisible(true); rbFriH2.setVisible(true);
} }
/**
* resetSelection() sets the radiobuttons inactive.
*
* @author Kevin Pfannenstiel
* @param event
*/
@FXML @FXML
protected void resetSelection(ActionEvent event) protected void resetSelection(ActionEvent event)
{ {
@ -412,6 +435,13 @@ public class MainController {
chosenMeals.clear(); 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 @FXML
protected void toOrder(ActionEvent event) throws IOException 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 @FXML
protected ArrayList<String> getLabelValueWithRadio() protected ArrayList<String> getLabelValueWithRadio()
{ {