From ea4a1ecc6a893c0322b8b7c2f43aa8f092eb3699 Mon Sep 17 00:00:00 2001 From: giavaphi Date: Sun, 6 Nov 2022 17:46:35 +0100 Subject: [PATCH] gui details of crop basics --- .../CropDetailController.java | 64 ++++++++ .../gartenverwaltung/MyPlantsController.java | 10 +- .../ch/zhaw/gartenverwaltung/CropDetail.fxml | 142 ++++++++++++++++++ 3 files changed, 209 insertions(+), 7 deletions(-) create mode 100644 src/main/java/ch/zhaw/gartenverwaltung/CropDetailController.java create mode 100644 src/main/resources/ch/zhaw/gartenverwaltung/CropDetail.fxml diff --git a/src/main/java/ch/zhaw/gartenverwaltung/CropDetailController.java b/src/main/java/ch/zhaw/gartenverwaltung/CropDetailController.java new file mode 100644 index 0000000..e34f743 --- /dev/null +++ b/src/main/java/ch/zhaw/gartenverwaltung/CropDetailController.java @@ -0,0 +1,64 @@ +package ch.zhaw.gartenverwaltung; + +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.layout.VBox; + +public class CropDetailController { + + @FXML + private Button area_button; + + @FXML + private Label area_label; + + @FXML + private Label cropName_label; + + @FXML + private Label description_label; + + @FXML + private VBox growthPahses_vbox; + + @FXML + private Label lacation_label; + + @FXML + private Label light_label; + + @FXML + private Button location_button; + + @FXML + private VBox pests_vbox; + + @FXML + private Label soil_label; + + @FXML + private Label spacing_label; + + @FXML + void editTaskList(ActionEvent event) { + + } + + @FXML + void goBack(ActionEvent event) { + + } + + @FXML + void setArea(ActionEvent event) { + + } + + @FXML + void setLocation(ActionEvent event) { + + } + +} diff --git a/src/main/java/ch/zhaw/gartenverwaltung/MyPlantsController.java b/src/main/java/ch/zhaw/gartenverwaltung/MyPlantsController.java index 2fe9139..9bbd3a8 100644 --- a/src/main/java/ch/zhaw/gartenverwaltung/MyPlantsController.java +++ b/src/main/java/ch/zhaw/gartenverwaltung/MyPlantsController.java @@ -1,7 +1,6 @@ package ch.zhaw.gartenverwaltung; import ch.zhaw.gartenverwaltung.types.Crop; -import ch.zhaw.gartenverwaltung.types.Plant; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; @@ -23,9 +22,6 @@ import java.util.ResourceBundle; public class MyPlantsController implements Initializable { MainFXMLController mainController; - @FXML - private Button addPlant_button; - @FXML private VBox myPlants_vbox; @@ -76,11 +72,11 @@ public class MyPlantsController implements Initializable { @Override public void handle(ActionEvent event) { //ToDo uncomment when new FXML exists - /*try { - mainController.loadPane(""); + try { + mainController.loadPane("CropDetail.fxml"); } catch (IOException e) { e.printStackTrace(); - }*/ + } } }; return event; diff --git a/src/main/resources/ch/zhaw/gartenverwaltung/CropDetail.fxml b/src/main/resources/ch/zhaw/gartenverwaltung/CropDetail.fxml new file mode 100644 index 0000000..c0cd65a --- /dev/null +++ b/src/main/resources/ch/zhaw/gartenverwaltung/CropDetail.fxml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +