From f7f194e067c07ac41c41b0d7bd22d2ca3cecbe5e Mon Sep 17 00:00:00 2001 From: pbd2h21avi Date: Sat, 28 Jan 2023 21:40:00 +0100 Subject: [PATCH] =?UTF-8?q?Men=C3=BCView=20=C3=BCberarbeitet=20-=20Legende?= =?UTF-8?q?=20Hinzugef=C3=BCgt=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/vpr_javafx/HelloApplication.java | 5 +- .../example/vpr_javafx/HelloController.java | 26 ++ .../com/example/vpr_javafx/hello-view.fxml | 223 +++++++++++++----- .../com/example/vpr_javafx/pics/fleisch.png | Bin 0 -> 12285 bytes .../com/example/vpr_javafx/pics/fleischer.JPG | Bin 0 -> 23141 bytes .../com/example/vpr_javafx/pics/logo.png | Bin 0 -> 12951 bytes .../com/example/vpr_javafx/pics/vegan.png | Bin 0 -> 12889 bytes .../example/vpr_javafx/pics/vegetarisch.png | Bin 0 -> 12112 bytes .../example/vpr_javafx/HelloApplication.class | Bin 1452 -> 1514 bytes .../example/vpr_javafx/HelloController.class | Bin 4517 -> 4992 bytes .../com/example/vpr_javafx/hello-view.fxml | 223 +++++++++++++----- 11 files changed, 365 insertions(+), 112 deletions(-) create mode 100644 src/main/resources/com/example/vpr_javafx/pics/fleisch.png create mode 100644 src/main/resources/com/example/vpr_javafx/pics/fleischer.JPG create mode 100644 src/main/resources/com/example/vpr_javafx/pics/logo.png create mode 100644 src/main/resources/com/example/vpr_javafx/pics/vegan.png create mode 100644 src/main/resources/com/example/vpr_javafx/pics/vegetarisch.png diff --git a/src/main/java/com/example/vpr_javafx/HelloApplication.java b/src/main/java/com/example/vpr_javafx/HelloApplication.java index 983780a..48e99d6 100644 --- a/src/main/java/com/example/vpr_javafx/HelloApplication.java +++ b/src/main/java/com/example/vpr_javafx/HelloApplication.java @@ -11,12 +11,13 @@ public class HelloApplication extends Application { @Override public void start(Stage stage) throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml")); - Scene scene = new Scene(fxmlLoader.load()); - stage.setTitle("Hello!"); + Scene scene = new Scene(fxmlLoader.load(),1000, 750); + stage.setTitle("Mittagsbestellung"); stage.setScene(scene); stage.show(); HelloController controller = fxmlLoader.getController(); controller.FillLabels(); + controller.writeAllergene(); } public static void main(String[] args) { diff --git a/src/main/java/com/example/vpr_javafx/HelloController.java b/src/main/java/com/example/vpr_javafx/HelloController.java index 104975b..4b6760f 100644 --- a/src/main/java/com/example/vpr_javafx/HelloController.java +++ b/src/main/java/com/example/vpr_javafx/HelloController.java @@ -59,6 +59,9 @@ public class HelloController { @FXML private PasswordField pfPassword; + @FXML + private Label allergene; + @FXML protected void OnSignInButton() { @@ -189,4 +192,27 @@ public class HelloController { } } + /** + * 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" + + "2:Phosphat\n" + + "3: Nitrat\n" + + "4: Antioxidationsmittel\n" + + "5: Farbstoff\n" + + "6: Geschmacksverstärker;\n" + + "7: Süßungsmittel;\n" + + "8: Konservierungsstoff"); + } + } \ No newline at end of file diff --git a/src/main/resources/com/example/vpr_javafx/hello-view.fxml b/src/main/resources/com/example/vpr_javafx/hello-view.fxml index 67963be..9b6e622 100644 --- a/src/main/resources/com/example/vpr_javafx/hello-view.fxml +++ b/src/main/resources/com/example/vpr_javafx/hello-view.fxml @@ -1,94 +1,207 @@ - - - - - + + + + + + + + + + + - -