2023-01-25 10:30:40 +01:00
|
|
|
package com.example.vpr_javafx;
|
|
|
|
|
2023-01-30 10:13:37 +01:00
|
|
|
import javafx.event.ActionEvent;
|
2023-01-25 10:30:40 +01:00
|
|
|
import javafx.fxml.FXML;
|
2023-01-30 10:13:37 +01:00
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.scene.Node;
|
|
|
|
import javafx.scene.Parent;
|
|
|
|
import javafx.scene.Scene;
|
|
|
|
import javafx.scene.control.*;
|
2023-01-30 17:45:57 +01:00
|
|
|
import javafx.scene.image.Image;
|
|
|
|
import javafx.scene.image.ImageView;
|
2023-01-31 15:49:57 +01:00
|
|
|
import javafx.scene.layout.AnchorPane;
|
2023-01-30 10:13:37 +01:00
|
|
|
import javafx.stage.Stage;
|
2023-01-27 21:51:01 +01:00
|
|
|
|
2023-01-30 17:45:57 +01:00
|
|
|
import java.io.Console;
|
|
|
|
import java.io.File;
|
2023-01-31 14:57:37 +01:00
|
|
|
import java.io.FileWriter;
|
2023-01-27 21:51:01 +01:00
|
|
|
import java.io.IOException;
|
|
|
|
import java.nio.file.Files;
|
|
|
|
import java.nio.file.Paths;
|
2023-01-31 15:49:57 +01:00
|
|
|
import java.util.ArrayList;
|
2023-01-27 21:51:01 +01:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
2023-01-25 10:30:40 +01:00
|
|
|
|
|
|
|
public class HelloController {
|
2023-01-31 14:57:37 +01:00
|
|
|
|
2023-01-25 10:30:40 +01:00
|
|
|
@FXML
|
2023-01-27 21:51:01 +01:00
|
|
|
private Label lMonH1;
|
|
|
|
@FXML
|
|
|
|
private Label lMonH2;
|
|
|
|
@FXML
|
|
|
|
private Label lMonD1;
|
|
|
|
@FXML
|
|
|
|
private Label lMonD2;
|
|
|
|
@FXML
|
|
|
|
private Label lTueH1;
|
|
|
|
@FXML
|
|
|
|
private Label lTueH2;
|
|
|
|
@FXML
|
|
|
|
private Label lTueD1;
|
|
|
|
@FXML
|
|
|
|
private Label lTueD2;
|
|
|
|
@FXML
|
|
|
|
private Label lWednH1;
|
|
|
|
@FXML
|
|
|
|
private Label lWednH2;
|
|
|
|
@FXML
|
|
|
|
private Label lWednD1;
|
|
|
|
@FXML
|
|
|
|
private Label lWednD2;
|
|
|
|
@FXML
|
|
|
|
private Label lThurH1;
|
|
|
|
@FXML
|
|
|
|
private Label lThurH2;
|
|
|
|
@FXML
|
|
|
|
private Label lThurD1;
|
|
|
|
@FXML
|
|
|
|
private Label lThurD2;
|
|
|
|
@FXML
|
|
|
|
private Label lFriH1;
|
|
|
|
@FXML
|
|
|
|
private Label lFriH2;
|
|
|
|
@FXML
|
|
|
|
private Label lFriD1;
|
|
|
|
@FXML
|
|
|
|
private Label lFriD2;
|
2023-01-25 10:30:40 +01:00
|
|
|
|
2023-01-30 17:45:57 +01:00
|
|
|
@FXML
|
|
|
|
private ImageView imgImage1;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage2;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage3;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage4;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage5;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage6;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage7;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage8;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage9;
|
|
|
|
@FXML
|
|
|
|
private ImageView imgImage10;
|
2023-01-31 15:49:57 +01:00
|
|
|
@FXML
|
|
|
|
private AnchorPane anchorPane;
|
2023-01-30 17:45:57 +01:00
|
|
|
|
2023-01-25 10:30:40 +01:00
|
|
|
@FXML
|
2023-01-27 21:51:01 +01:00
|
|
|
private TextField tfPhone;
|
2023-01-31 14:57:37 +01:00
|
|
|
@FXML
|
|
|
|
public TextField tfName;
|
|
|
|
@FXML
|
|
|
|
public TextField tfChild;
|
2023-01-31 18:36:32 +01:00
|
|
|
@FXML
|
|
|
|
public TextField tfStreet;
|
|
|
|
@FXML
|
|
|
|
public TextField tfHouseNumber;
|
|
|
|
@FXML
|
|
|
|
public TextField tfPostalCode;
|
|
|
|
@FXML
|
|
|
|
public TextField tfCity;
|
2023-01-31 14:57:37 +01:00
|
|
|
|
2023-01-27 21:51:01 +01:00
|
|
|
@FXML
|
|
|
|
private PasswordField pfPassword;
|
2023-01-30 15:10:54 +01:00
|
|
|
@FXML
|
|
|
|
private Label allergene;
|
2023-01-27 21:51:01 +01:00
|
|
|
|
2023-01-31 15:49:57 +01:00
|
|
|
@FXML
|
|
|
|
private Button btResetSelection;
|
|
|
|
@FXML
|
|
|
|
private Button btToOrder;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbMonH1;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbMonH2;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbTueH1;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbTueH2;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbWednH1;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbWednH2;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbThurH1;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbThurH2;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbFriH1;
|
|
|
|
@FXML
|
|
|
|
private RadioButton rbFriH2;
|
2023-01-30 15:10:54 +01:00
|
|
|
|
2023-01-28 21:40:00 +01:00
|
|
|
|
2023-01-30 17:45:57 +01:00
|
|
|
@FXML
|
2023-01-31 16:22:57 +01:00
|
|
|
final String imagePathUrl = "file:target/classes/com/example/vpr_javafx/pics/";
|
2023-01-30 17:45:57 +01:00
|
|
|
@FXML
|
2023-01-31 16:22:57 +01:00
|
|
|
final String veggieImageUrl = imagePathUrl + "vegetarisch.png";
|
2023-01-30 17:45:57 +01:00
|
|
|
@FXML
|
2023-01-31 16:22:57 +01:00
|
|
|
final String veganImageUrl = imagePathUrl + "vegan.png";
|
|
|
|
@FXML
|
|
|
|
final String meatImageUrl = imagePathUrl + "fleisch.png";
|
2023-01-30 17:45:57 +01:00
|
|
|
@FXML
|
|
|
|
private String imageUrl;
|
|
|
|
|
2023-01-31 15:49:57 +01:00
|
|
|
private ArrayList<String> chosenMeals;
|
|
|
|
|
2023-01-27 21:51:01 +01:00
|
|
|
@FXML
|
2023-01-30 10:13:37 +01:00
|
|
|
protected void OnSignInButton(ActionEvent event) throws IOException
|
2023-01-27 21:51:01 +01:00
|
|
|
{
|
2023-01-31 15:49:57 +01:00
|
|
|
Data data = new Data("user.txt");
|
|
|
|
data.validateData(tfPhone, pfPassword, this);
|
2023-01-30 14:33:30 +01:00
|
|
|
}
|
2023-01-27 21:51:01 +01:00
|
|
|
|
2023-01-30 10:13:37 +01:00
|
|
|
|
2023-01-27 21:51:01 +01:00
|
|
|
@FXML
|
|
|
|
protected void FillLabels() {
|
|
|
|
try {
|
2023-01-30 14:33:30 +01:00
|
|
|
List<String> menu = Files.readAllLines(Paths.get("menue.txt"));
|
2023-01-27 21:51:01 +01:00
|
|
|
|
2023-01-30 14:33:30 +01:00
|
|
|
for (int i = 0; i < menu.size(); i++)
|
|
|
|
{
|
2023-01-30 17:45:57 +01:00
|
|
|
|
2023-01-30 14:33:30 +01:00
|
|
|
String[] parts = menu.get(i).split(";");
|
|
|
|
|
|
|
|
String dish = parts[1];
|
|
|
|
String sideDish = parts[2];
|
2023-01-30 17:45:57 +01:00
|
|
|
String typ = parts[3];
|
|
|
|
String allergenic = parts[4];
|
|
|
|
|
|
|
|
String dayMenu = dish+"\n"+sideDish+"\n"+"("+allergenic+")";
|
|
|
|
|
2023-01-31 15:49:57 +01:00
|
|
|
if(typ.equals("Fleisch")) {
|
2023-01-31 16:22:57 +01:00
|
|
|
imageUrl=meatImageUrl;
|
2023-01-31 15:49:57 +01:00
|
|
|
}
|
|
|
|
if(typ.equals("Vegetarisch")) {
|
|
|
|
imageUrl=veggieImageUrl;
|
|
|
|
}
|
|
|
|
if(typ.equals("Vegan")) {
|
2023-01-31 16:22:57 +01:00
|
|
|
imageUrl=veganImageUrl;
|
2023-01-31 15:49:57 +01:00
|
|
|
}
|
|
|
|
|
2023-01-31 16:22:57 +01:00
|
|
|
Image image = new Image(imageUrl);
|
2023-01-30 14:33:30 +01:00
|
|
|
|
|
|
|
switch (i) {
|
|
|
|
case 0:
|
|
|
|
lMonH1.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage1.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
lMonD1.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
lMonH2.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage2.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
lMonD2.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
lTueH1.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage3.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
lTueD1.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
lTueH2.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage4.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
lTueD2.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
lWednH1.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage5.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 9:
|
|
|
|
lWednD1.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 10:
|
|
|
|
lWednH2.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage6.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 11:
|
|
|
|
lWednD2.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 12:
|
|
|
|
lThurH1.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage7.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 13:
|
|
|
|
lThurD1.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 14:
|
|
|
|
lThurH2.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage8.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 15:
|
|
|
|
lThurD2.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
lFriH1.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage9.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 17:
|
|
|
|
lFriD1.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
case 18:
|
|
|
|
lFriH2.setText(dayMenu);
|
2023-01-31 15:49:57 +01:00
|
|
|
imgImage10.setImage(image);
|
2023-01-30 14:33:30 +01:00
|
|
|
break;
|
|
|
|
case 19:
|
|
|
|
lFriD2.setText(dayMenu);
|
|
|
|
break;
|
|
|
|
}
|
2023-01-27 21:51:01 +01:00
|
|
|
}
|
|
|
|
}
|
2023-01-30 14:33:30 +01:00
|
|
|
catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
|
2023-01-30 12:23:17 +01:00
|
|
|
}
|
2023-01-27 21:51:01 +01:00
|
|
|
|
2023-01-30 14:33:30 +01:00
|
|
|
/**
|
|
|
|
* writeAllergene() is a method to format and set allergene
|
|
|
|
* @author Madeleine Vigier
|
|
|
|
*/
|
|
|
|
@FXML
|
|
|
|
protected void writeAllergene() {
|
|
|
|
allergene.setText("a: Eier; b: Soja,\n"
|
|
|
|
+ "c: Milch; d: Erdnüsse;\n"
|
|
|
|
+ "e: Weichtiere; f: Krebstiere;\n"
|
|
|
|
+ "g: Getreide; h: Senf; i: Sesam;\n"
|
|
|
|
+ "j: Schwefeldioxid und Sulfit;\n"
|
|
|
|
+ "k: Nüsse; l: Sellerie;\n"
|
|
|
|
+ "m: Fische; n: Lupinen\n\n"
|
|
|
|
+ "1: Nitrit-Pökelsalz\n"
|
2023-01-31 14:57:37 +01:00
|
|
|
+ "2: Phosphat\n"
|
2023-01-30 14:33:30 +01:00
|
|
|
+ "3: Nitrat\n"
|
|
|
|
+ "4: Antioxidationsmittel\n"
|
|
|
|
+ "5: Farbstoff\n"
|
|
|
|
+ "6: Geschmacksverstärker;\n"
|
|
|
|
+ "7: Süßungsmittel;\n"
|
|
|
|
+ "8: Konservierungsstoff");
|
2023-01-25 10:30:40 +01:00
|
|
|
}
|
2023-01-30 14:33:30 +01:00
|
|
|
|
2023-01-31 18:36:32 +01:00
|
|
|
/**
|
|
|
|
* ToRegistration() ruft die Registration-View auf, sobald man auf den Registrierungs-Button klickt
|
|
|
|
* @param event
|
|
|
|
* @throws IOException
|
|
|
|
* @author Kevin Maier
|
|
|
|
*/
|
2023-01-31 16:20:51 +01:00
|
|
|
@FXML
|
|
|
|
protected void ToRegistration(ActionEvent event) throws IOException
|
|
|
|
{
|
|
|
|
Parent root = FXMLLoader.load(getClass().getResource("Registration-view.fxml"));
|
|
|
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
|
|
|
Scene scene = new Scene(root);
|
|
|
|
stage.setScene(scene);
|
|
|
|
stage.show();
|
|
|
|
}
|
|
|
|
|
2023-01-31 18:36:32 +01:00
|
|
|
/**
|
2023-01-31 21:24:48 +01:00
|
|
|
* OnRegistrationButton() creates a new user
|
2023-01-31 18:36:32 +01:00
|
|
|
* @param event
|
|
|
|
* @throws IOException
|
|
|
|
* @author Kevin Maier
|
|
|
|
*/
|
2023-01-31 14:57:37 +01:00
|
|
|
@FXML
|
|
|
|
protected void OnRegistrationButton(ActionEvent event) throws IOException
|
|
|
|
{
|
|
|
|
Alert alert = new Alert(Alert.AlertType.WARNING);
|
2023-01-31 21:24:48 +01:00
|
|
|
Data validRegistration = new Data("user.txt");
|
2023-01-31 14:57:37 +01:00
|
|
|
|
2023-01-31 21:24:48 +01:00
|
|
|
if (validRegistration.validateRegistration(tfName, tfPhone, pfPassword, tfStreet, tfHouseNumber, tfPostalCode, tfCity, tfChild, this))
|
2023-01-31 14:57:37 +01:00
|
|
|
{
|
2023-01-31 21:24:48 +01:00
|
|
|
try (FileWriter writer = new FileWriter("user.txt", true)){
|
|
|
|
writer.write(tfName.getText() + ";" + tfStreet.getText() + " " + tfHouseNumber.getText() + "," + tfPostalCode.getText() + " " + tfCity.getText() + ";" + tfPhone.getText() + ";" + tfChild.getText() + ";" + pfPassword.getText() + System.lineSeparator());
|
|
|
|
|
|
|
|
Parent root = FXMLLoader.load(getClass().getResource("MenuOverview-view.fxml"));
|
|
|
|
Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
|
|
|
|
Scene scene = new Scene(root);
|
|
|
|
stage.setScene(scene);
|
|
|
|
stage.show();
|
2023-01-31 14:57:37 +01:00
|
|
|
}
|
|
|
|
catch (IOException e)
|
|
|
|
{
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-31 15:49:57 +01:00
|
|
|
|
|
|
|
@FXML
|
|
|
|
protected void setRadioButton()
|
|
|
|
{
|
|
|
|
ToggleGroup monToggle = new ToggleGroup();
|
|
|
|
ToggleGroup tueToggle = new ToggleGroup();
|
|
|
|
ToggleGroup wednToggle = new ToggleGroup();
|
|
|
|
ToggleGroup thurToggle = new ToggleGroup();
|
|
|
|
ToggleGroup friToggle = new ToggleGroup();
|
|
|
|
|
|
|
|
rbMonH1.setToggleGroup(monToggle);
|
|
|
|
rbMonH2.setToggleGroup(monToggle);
|
|
|
|
rbTueH1.setToggleGroup(tueToggle);
|
|
|
|
rbTueH2.setToggleGroup(tueToggle);
|
|
|
|
rbWednH1.setToggleGroup(wednToggle);
|
|
|
|
rbWednH2.setToggleGroup(wednToggle);
|
|
|
|
rbThurH1.setToggleGroup(thurToggle);
|
|
|
|
rbThurH2.setToggleGroup(thurToggle);
|
|
|
|
rbFriH1.setToggleGroup(friToggle);
|
|
|
|
rbFriH1.setToggleGroup(friToggle);
|
|
|
|
|
|
|
|
btResetSelection.setVisible(true);
|
|
|
|
btToOrder.setVisible(true);
|
|
|
|
rbMonH1.setVisible(true);
|
|
|
|
rbMonH2.setVisible(true);
|
|
|
|
rbTueH1.setVisible(true);
|
|
|
|
rbTueH2.setVisible(true);
|
|
|
|
rbWednH1.setVisible(true);
|
|
|
|
rbWednH2.setVisible(true);
|
|
|
|
rbThurH1.setVisible(true);
|
|
|
|
rbThurH2.setVisible(true);
|
|
|
|
rbFriH1.setVisible(true);
|
|
|
|
rbFriH2.setVisible(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@FXML
|
|
|
|
protected void resetSelection(ActionEvent event) throws IOException
|
|
|
|
{
|
|
|
|
rbMonH1.setSelected(false);
|
|
|
|
rbMonH2.setSelected(false);
|
|
|
|
rbTueH1.setSelected(false);
|
|
|
|
rbTueH2.setSelected(false);
|
|
|
|
rbWednH1.setSelected(false);
|
|
|
|
rbWednH2.setSelected(false);
|
|
|
|
rbThurH1.setSelected(false);
|
|
|
|
rbThurH2.setSelected(false);
|
|
|
|
rbFriH1.setSelected(false);
|
|
|
|
rbFriH2.setSelected(false);
|
|
|
|
chosenMeals.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@FXML
|
2023-01-31 19:51:00 +01:00
|
|
|
protected ArrayList<String> getLabelValueWithRadio(ActionEvent event)
|
2023-01-31 15:49:57 +01:00
|
|
|
{
|
|
|
|
chosenMeals = new ArrayList<>();
|
|
|
|
String mainDish;
|
|
|
|
String dessert;
|
|
|
|
|
|
|
|
if (rbMonH1.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lMonH1.getText();
|
|
|
|
dessert = lMonD1.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (rbMonH2.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lMonH2.getText();
|
|
|
|
dessert = lMonD2.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbTueH1.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lTueH1.getText();
|
|
|
|
dessert = lTueD1.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbTueH2.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lTueH2.getText();
|
|
|
|
dessert = lTueD2.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbWednH1.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lWednH1.getText();
|
|
|
|
dessert = lWednD1.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbWednH2.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lWednH2.getText();
|
|
|
|
dessert = lWednD2.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbThurH1.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lThurH1.getText();
|
|
|
|
dessert = lThurD1.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbThurH2.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lThurH2.getText();
|
|
|
|
dessert = lThurD2.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbFriH1.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lFriH1.getText();
|
|
|
|
dessert = lFriD1.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
if (rbFriH2.isSelected())
|
|
|
|
{
|
|
|
|
mainDish = lFriH2.getText();
|
|
|
|
dessert = lFriD2.getText();
|
|
|
|
chosenMeals.add("Hauptgericht: " + mainDish + " Dessert: " + dessert);
|
|
|
|
}
|
|
|
|
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
|
|
|
alert.setContentText(chosenMeals.toString());
|
|
|
|
alert.show();
|
2023-01-31 19:51:00 +01:00
|
|
|
|
|
|
|
return chosenMeals;
|
2023-01-31 15:49:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-01-25 10:30:40 +01:00
|
|
|
}
|