some unused Methods implemented
This commit is contained in:
parent
22cc69ecf7
commit
911dd9f2d3
40
menue.txt
40
menue.txt
@ -1,20 +1,20 @@
|
||||
Montag;Pommes;mit Kroketten und Gemüse;Vegan;g,2,3
|
||||
Montag;Vegane Waffel;mit Puderzucker;DessertV;g,b,k
|
||||
Montag;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;g,c,a,2,3
|
||||
Montag;Wackelpudding;mit Vanillesoße;Dessert;c,2
|
||||
Dienstag;Rote Linsen Curry;mit Süßkartoffeln;Vegan;g,b,2,3
|
||||
Dienstag;Vegane Pancakes;mit Ahornsirup;DessertV;g,b,3
|
||||
Dienstag;Gebratene Nudeln;mit Gemüse;Vegetarisch;b,c,a,i,3
|
||||
Dienstag;Berliner;mit Erdbeerfüllung;Dessert;c,a
|
||||
Mittwoch;Bratkartoffeln;mit veganer Bratensoße;Vegan;b,2,3
|
||||
Mittwoch;Pudding;mit Schokostreuseln;DessertV;b,2
|
||||
Mittwoch;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;a,j,2,3
|
||||
Mittwoch;Pudding;mit Vanillesoße;Dessert;c,2
|
||||
Donnerstag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
Donnerstag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
Donnerstag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
Donnerstag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
Freitag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
Freitag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
Freitag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
Freitag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
06.02.2023;Montag;Pommes;mit Kroketten und Gemüse;Vegan;g,2,3
|
||||
06.02.2023;Montag;Vegane Waffel;mit Puderzucker;DessertV;g,b,k
|
||||
06.02.2023;Montag;Schnitzel;mit Kroketten, Gemüse und Soße;Fleisch;g,c,a,2,3
|
||||
06.02.2023;Montag;Wackelpudding;mit Vanillesoße;Dessert;c,2
|
||||
07.02.2023;Dienstag;Rote Linsen Curry;mit Süßkartoffeln;Vegan;g,b,2,3
|
||||
07.02.2023;Dienstag;Vegane Pancakes;mit Ahornsirup;DessertV;g,b,3
|
||||
07.02.2023;Dienstag;Gebratene Nudeln;mit Gemüse;Vegetarisch;b,c,a,i,3
|
||||
07.02.2023;Dienstag;Berliner;mit Erdbeerfüllung;Dessert;c,a
|
||||
08.02.2023;Mittwoch;Bratkartoffeln;mit veganer Bratensoße;Vegan;b,2,3
|
||||
08.02.2023;Mittwoch;Pudding;mit Schokostreuseln;DessertV;b,2
|
||||
08.02.2023;Mittwoch;Bratkartoffeln;mit Leberkäse und Ei;Fleisch;a,j,2,3
|
||||
08.02.2023;Mittwoch;Pudding;mit Vanillesoße;Dessert;c,2
|
||||
09.02.2023;Donnerstag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
09.02.2023;Donnerstag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
09.02.2023;Donnerstag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
09.02.2023;Donnerstag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
10.02.2023;Freitag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
10.02.2023;Freitag;Bananenbrot;mit Datteln;DessertV;g,c
|
||||
10.02.2023;Freitag;Bauerntopf;mit veganem Hack;Vegan;g,c,a,h,1,2,3
|
||||
10.02.2023;Freitag;Bananenbrot;mit Datteln;DessertV;g,c
|
@ -21,3 +21,5 @@ mit veganer Bratensoße
|
||||
(b,2,3) Dessert: Pudding
|
||||
mit Schokostreuseln
|
||||
(b,2)]
|
||||
[Felix Düsterhaus
|
||||
]
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.example.vpr_javafx;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
@ -19,6 +18,7 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MainController {
|
||||
@ -64,6 +64,17 @@ public class MainController {
|
||||
@FXML
|
||||
private Label lFriD2;
|
||||
|
||||
@FXML
|
||||
private Label monDat;
|
||||
@FXML
|
||||
private Label tueDat;
|
||||
@FXML
|
||||
private Label wedDat;
|
||||
@FXML
|
||||
private Label thurDat;
|
||||
@FXML
|
||||
private Label friDat;
|
||||
|
||||
@FXML
|
||||
private ImageView imgImage1;
|
||||
@FXML
|
||||
@ -158,19 +169,43 @@ public class MainController {
|
||||
@FXML
|
||||
protected void FillLabels() {
|
||||
try {
|
||||
List<String> menu = Files.readAllLines(Paths.get("menue.txt"));
|
||||
List<String> menuLines = Files.readAllLines(Paths.get("menue.txt"));
|
||||
|
||||
for (int i = 0; i < menu.size(); i++)
|
||||
for (int i = 0; i < menuLines.size(); i++)
|
||||
{
|
||||
|
||||
String[] parts = menu.get(i).split(";");
|
||||
String[] parts = menuLines.get(i).split(";");
|
||||
|
||||
String dish = parts[1];
|
||||
String sideDish = parts[2];
|
||||
String typ = parts[3];
|
||||
String allergenic = parts[4];
|
||||
String date = parts[0];
|
||||
String day = parts[1];
|
||||
String dish = parts[2];
|
||||
String sideDish = parts[3];
|
||||
String typ = parts[4];
|
||||
String allergenic = parts[5];
|
||||
|
||||
String dayMenu = dish+"\n"+sideDish+"\n"+"("+allergenic+")";
|
||||
String[] allergenics = allergenic.split(",");
|
||||
|
||||
Menu menu = new Menu(date, dish, sideDish, typ, Arrays.stream(allergenics).toList());
|
||||
|
||||
String dayMenu = dish+"\n"+sideDish+"\n"+allergenic;
|
||||
|
||||
switch (day)
|
||||
{
|
||||
case "Montag":
|
||||
monDat.setText(menu.getDate());
|
||||
break;
|
||||
case "Dienstag":
|
||||
tueDat.setText(menu.getDate());
|
||||
break;
|
||||
case "Mittwoch":
|
||||
wedDat.setText(menu.getDate());
|
||||
break;
|
||||
case "Donnerstag":
|
||||
thurDat.setText(menu.getDate());
|
||||
break;
|
||||
case "Freitag":
|
||||
friDat.setText(menu.getDate());
|
||||
}
|
||||
|
||||
if(typ.equals("Fleisch")) {
|
||||
imageUrl=meatImageUrl;
|
||||
@ -426,7 +461,7 @@ public class MainController {
|
||||
{
|
||||
if (tfPhone.getText().equals(user.getPhonenumber()) && pfPassword.getText().equals(user.getPassword()))
|
||||
{
|
||||
chosenMeals.add(user.toString());
|
||||
chosenMeals.add(user.getNameParent1()+"\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,7 @@
|
||||
<RadioButton fx:id="rbThurH2" layoutX="377.0" layoutY="565.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<RadioButton fx:id="rbFriH1" layoutX="377.0" layoutY="648.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<RadioButton fx:id="rbFriH2" layoutX="377.0" layoutY="692.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<Label layoutX="14.0" layoutY="176.0" text="30.01.2023" textFill="#6f7baf">
|
||||
<Label fx:id="monDat" layoutX="14.0" layoutY="176.0" text="30.01.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -230,7 +230,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="299.0" text="31.01.2023" textFill="#6f7baf">
|
||||
<Label fx:id="tueDat" layoutX="14.0" layoutY="299.0" text="31.01.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -238,7 +238,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="424.0" text="01.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="wedDat" layoutX="14.0" layoutY="424.0" text="01.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -246,7 +246,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="543.0" text="02.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="thurDat" layoutX="14.0" layoutY="543.0" text="02.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -254,7 +254,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="664.0" text="03.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="friDat" layoutX="14.0" layoutY="664.0" text="03.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
|
@ -222,7 +222,7 @@
|
||||
<RadioButton fx:id="rbThurH2" layoutX="377.0" layoutY="565.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<RadioButton fx:id="rbFriH1" layoutX="377.0" layoutY="648.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<RadioButton fx:id="rbFriH2" layoutX="377.0" layoutY="692.0" mnemonicParsing="false" onAction="#getLabelValueWithRadio" visible="false" />
|
||||
<Label layoutX="14.0" layoutY="176.0" text="30.01.2023" textFill="#6f7baf">
|
||||
<Label fx:id="monDat" layoutX="14.0" layoutY="176.0" text="30.01.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -230,7 +230,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="299.0" text="31.01.2023" textFill="#6f7baf">
|
||||
<Label fx:id="tueDat" layoutX="14.0" layoutY="299.0" text="31.01.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -238,7 +238,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="424.0" text="01.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="wedDat" layoutX="14.0" layoutY="424.0" text="01.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -246,7 +246,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="543.0" text="02.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="thurDat" layoutX="14.0" layoutY="543.0" text="02.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
@ -254,7 +254,7 @@
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
</Label>
|
||||
<Label layoutX="14.0" layoutY="664.0" text="03.02.2023" textFill="#6f7baf">
|
||||
<Label fx:id="friDat" layoutX="14.0" layoutY="664.0" text="03.02.2023" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
</font>
|
||||
|
Loading…
Reference in New Issue
Block a user