Compare commits

..

No commits in common. "ee67c83b2246419c148a97e0cd12339b055ca8aa" and "e96280cd0c3b0d722abaa52ca9a08e8fc5019a78" have entirely different histories.

11 changed files with 67 additions and 403 deletions

View File

@ -81,37 +81,22 @@ public class CropDetailController {
} }
/**
* close Window
*/
@FXML @FXML
void goBack() { void goBack() {
Stage stage = (Stage) imageView.getScene().getWindow(); Stage stage = (Stage) imageView.getScene().getWindow();
stage.close(); stage.close();
} }
/**
* open dialog to set area
*/
@FXML @FXML
void setArea() { void setArea() {
} }
/**
* open dialog to set location
*/
@FXML @FXML
void setLocation() { void setLocation() {
} }
/**
* set labels and image from selected {@link Crop}
* set icons for buttons
* @param crop {@link Crop} which will be displayed
* @throws PlantNotFoundException exception
*/
public void setPlantFromCrop(Crop crop) throws PlantNotFoundException { public void setPlantFromCrop(Crop crop) throws PlantNotFoundException {
this.crop = crop; this.crop = crop;
try { try {

View File

@ -1,47 +1,5 @@
package ch.zhaw.gartenverwaltung; package ch.zhaw.gartenverwaltung;
import javafx.fxml.FXML; public class HomeController
import javafx.fxml.Initializable; {
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import java.net.URL;
import java.util.ResourceBundle;
public class HomeController implements Initializable {
@FXML
private ImageView imageViewDavid;
@FXML
private ImageView imageViewElias;
@FXML
private ImageView imageViewGian;
@FXML
private ImageView imageViewPhilippe;
@FXML
private ImageView imageViewRoman;
@Override
public void initialize(URL location, ResourceBundle resources) {
setImages(imageViewDavid, "");
setImages(imageViewElias, "");
setImages(imageViewGian, "");
setImages(imageViewRoman, "");
setImages(imageViewPhilippe, "");
}
private void setImages(ImageView imageView, String photoName) {
Image img;
if (photoName.equals("")) {
img = new Image(String.valueOf(getClass().getResource("icons/userIcon.png")));
} else {
img = new Image(String.valueOf(getClass().getResource("icons/" + photoName)));
}
imageView.setImage(img);
}
} }

View File

@ -4,6 +4,7 @@ import ch.zhaw.gartenverwaltung.bootstrap.AfterInject;
import ch.zhaw.gartenverwaltung.bootstrap.AppLoader; import ch.zhaw.gartenverwaltung.bootstrap.AppLoader;
import ch.zhaw.gartenverwaltung.bootstrap.ChangeViewEvent; import ch.zhaw.gartenverwaltung.bootstrap.ChangeViewEvent;
import ch.zhaw.gartenverwaltung.bootstrap.Inject; import ch.zhaw.gartenverwaltung.bootstrap.Inject;
import javafx.event.ActionEvent;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.*; import javafx.scene.control.*;
@ -40,39 +41,26 @@ public class MainFXMLController {
@FXML @FXML
private Button tutorial_button; private Button tutorial_button;
/**
* go to home pane
*/
@FXML @FXML
void goToHome() { void goToHome() {
showPaneAsMainView("Home.fxml"); showPaneAsMainView("Home.fxml");
styleChangeButton(home_button); styleChangeButton(home_button);
} }
/**
* go to my garden pane
*/
@FXML @FXML
void goToMyPlants() { void goToMyPlants() {
showPaneAsMainView("MyGarden.fxml"); showPaneAsMainView("MyGarden.fxml");
styleChangeButton(myGarden_button); styleChangeButton(myGarden_button);
} }
/**
* go to the schedule pane
*/
@FXML @FXML
void goToMySchedule() { void goToMySchedule() {
showPaneAsMainView("MySchedule.fxml"); showPaneAsMainView("MySchedule.fxml");
styleChangeButton(mySchedule_button); styleChangeButton(mySchedule_button);
} }
/**
* open dialog of the settings
* @throws IOException exception
*/
@FXML @FXML
public void openSettings() throws IOException { public void openSettings(ActionEvent actionEvent) throws IOException {
Dialog<ButtonType> dialog = new Dialog<>(); Dialog<ButtonType> dialog = new Dialog<>();
dialog.setTitle("Settings"); dialog.setTitle("Settings");
dialog.setHeaderText("Settings"); dialog.setHeaderText("Settings");
@ -94,11 +82,8 @@ public class MainFXMLController {
} }
} }
/** public void goToTutorial(ActionEvent actionEvent) {
* go to Tutorial pane //showPaneAsMainView("Tutorial.fxml");
*/
public void goToTutorial() {
showPaneAsMainView("Tutorial.fxml");
styleChangeButton(tutorial_button); styleChangeButton(tutorial_button);
} }
@ -124,15 +109,10 @@ public class MainFXMLController {
private final EventHandler<ChangeViewEvent> changeMainViewHandler = (ChangeViewEvent event) -> showPaneAsMainView(event.view()); private final EventHandler<ChangeViewEvent> changeMainViewHandler = (ChangeViewEvent event) -> showPaneAsMainView(event.view());
/**
* preload all menu bar panes
* @throws IOException exception
*/
private void preloadPanes() throws IOException { private void preloadPanes() throws IOException {
appLoader.loadAndCacheFxml("MyGarden.fxml"); appLoader.loadAndCacheFxml("MyGarden.fxml");
appLoader.loadAndCacheFxml("MySchedule.fxml"); appLoader.loadAndCacheFxml("MySchedule.fxml");
appLoader.loadAndCacheFxml("Plants.fxml"); appLoader.loadAndCacheFxml("Plants.fxml");
appLoader.loadAndCacheFxml("Tutorial.fxml");
} }
private void styleChangeButton(Button button) { private void styleChangeButton(Button button) {
@ -162,7 +142,7 @@ public class MainFXMLController {
} }
/** /**
* adds icon to given button * adds icon to button
* @param button the button which get the icon * @param button the button which get the icon
* @param iconFileName file name of icon * @param iconFileName file name of icon
*/ */

View File

@ -13,12 +13,16 @@ import ch.zhaw.gartenverwaltung.types.Plant;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.*; import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Label;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority; import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.stage.Modality; import javafx.stage.Modality;
import javafx.stage.Stage; import javafx.stage.Stage;
@ -39,64 +43,42 @@ public class MyGardenController {
@FXML @FXML
public AnchorPane myGardenRoot; public AnchorPane myGardenRoot;
@FXML @FXML
private Button addPlant_button; private VBox myPlants_vbox;
@FXML @FXML
private ListView<Crop> myGarden_listView; private Button addPlant_button;
/**
* initialize crop list
* add listener for crop list
* set icon for button
*/
@AfterInject @AfterInject
@SuppressWarnings("unused") @SuppressWarnings("unused")
public void init() { public void init() {
System.out.println("once"); garden.getPlantedCrops().addListener((observable, oldValue, newValue) -> {
try {
createPlantView(newValue);
} catch (HardinessZoneNotSetException | IOException e) {
LOG.log(Level.SEVERE, "Could not update view of croplist!", e);
}
});
try {
createPlantView(garden.getPlantedCrops());
} catch (HardinessZoneNotSetException | IOException e) {
LOG.log(Level.SEVERE, "Could not update view of croplist!", e);
}
setIconToButton(addPlant_button, "addIcon.png"); setIconToButton(addPlant_button, "addIcon.png");
myGarden_listView.itemsProperty().bind(garden.getPlantedCrops());
setCellFactory();
} }
/**
* redirect to plant fxml file
*/
@FXML @FXML
void addPlant() { void addPlant() {
myGardenRoot.fireEvent(new ChangeViewEvent(ChangeViewEvent.CHANGE_MAIN_VIEW, "Plants.fxml")); myGardenRoot.fireEvent(new ChangeViewEvent(ChangeViewEvent.CHANGE_MAIN_VIEW, "Plants.fxml"));
} }
/** private void createPlantView(List<Crop> crops) throws HardinessZoneNotSetException, IOException {
* set cell factory to load {@link HBox} as list view content myPlants_vbox.getChildren().clear();
*/ for (Crop crop : crops) {
private void setCellFactory() { HBox hBox = createPlantView(crop);
myGarden_listView.setCellFactory(param -> new ListCell<>() { myPlants_vbox.getChildren().add(hBox);
@Override
protected void updateItem(Crop crop, boolean empty) {
super.updateItem(crop, empty);
if (empty || crop == null) {
setText(null);
setGraphic(null);
} else {
try {
setText("");
setGraphic(createHBoxForListView(crop));
} catch (HardinessZoneNotSetException | IOException e) {
LOG.log(Level.WARNING, "Could not get plant for Cell", e);
} }
} }
}
});
}
/** private HBox createPlantView(Crop crop) throws HardinessZoneNotSetException, IOException {
* Creates and returns HBox of the crop
* @param crop {@link Crop} which is selected
* @return {@link HBox} of the {@link Crop}
* @throws HardinessZoneNotSetException exception
* @throws IOException exception
*/
private HBox createHBoxForListView(Crop crop) throws HardinessZoneNotSetException, IOException {
//ToDo add better design //ToDo add better design
Plant plant = plantList.getPlantById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).get(); Plant plant = plantList.getPlantById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).get();
HBox hBox = new HBox(10); HBox hBox = new HBox(10);
@ -113,8 +95,8 @@ public class MyGardenController {
label.setMaxWidth(2000); label.setMaxWidth(2000);
HBox.setHgrow(label, Priority.ALWAYS); HBox.setHgrow(label, Priority.ALWAYS);
Button details = new Button(); Button details = new Button("");
Button delete = new Button(); Button delete = new Button("");
setIconToButton(details, "detailsIcon.png"); setIconToButton(details, "detailsIcon.png");
setIconToButton(delete, "deleteIcon.png"); setIconToButton(delete, "deleteIcon.png");
details.setOnAction(getGoToCropDetailEvent(crop)); details.setOnAction(getGoToCropDetailEvent(crop));
@ -137,11 +119,6 @@ public class MyGardenController {
button.setGraphic(imageView); button.setGraphic(imageView);
} }
/**
* open detail window of the selected {@link Crop}
* @param crop {@link Crop} which is selected
* @return {@link EventHandler} for button
*/
private EventHandler<ActionEvent> getGoToCropDetailEvent(Crop crop) { private EventHandler<ActionEvent> getGoToCropDetailEvent(Crop crop) {
return (event) -> { return (event) -> {
try { try {
@ -159,11 +136,6 @@ public class MyGardenController {
}; };
} }
/**
* open alert for deleting the selected {@link Crop}
* @param crop {@link Crop} which is selected
* @return {@link EventHandler} for button
*/
private EventHandler<ActionEvent> getDeleteCropEvent(Crop crop) { private EventHandler<ActionEvent> getDeleteCropEvent(Crop crop) {
return (event) -> { return (event) -> {
try { try {
@ -174,16 +146,9 @@ public class MyGardenController {
}; };
} }
/**
* Alert to confirm that the crop can be deleted.
* @param crop {@link Crop} which is selected
* @throws IOException exception
* @throws HardinessZoneNotSetException exception
*/
private void showConfirmation(Crop crop) throws IOException, HardinessZoneNotSetException { private void showConfirmation(Crop crop) throws IOException, HardinessZoneNotSetException {
Plant plant = plantList.getPlantById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).get();
Alert alert = new Alert(Alert.AlertType.CONFIRMATION); Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setTitle("Delete " + plant.name()); alert.setTitle("Delete Crop");
alert.setHeaderText("Are you sure want to delete this Crop?"); alert.setHeaderText("Are you sure want to delete this Crop?");
alert.setContentText("Deleting this crop will remove all associated tasks from your schedule."); alert.setContentText("Deleting this crop will remove all associated tasks from your schedule.");

View File

@ -41,6 +41,7 @@ public class PlantsController {
private Plant selectedPlant = null; private Plant selectedPlant = null;
private final HardinessZone DEFAULT_HARDINESS_ZONE = HardinessZone.ZONE_8A; private final HardinessZone DEFAULT_HARDINESS_ZONE = HardinessZone.ZONE_8A;
// TODO: move to model
private final ListProperty<Plant> plantListProperty = new SimpleListProperty<>(FXCollections.observableArrayList()); private final ListProperty<Plant> plantListProperty = new SimpleListProperty<>(FXCollections.observableArrayList());
@FXML @FXML
@ -268,7 +269,7 @@ public class PlantsController {
list_plants.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { list_plants.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if (newValue != null) { if (newValue != null) {
selectedPlant = newValue; selectedPlant = newValue;
description_plant.setText(getPlantDescription()); description_plant.setText(selectedPlant.description());
selectSowDay_button.setDisable(false); selectSowDay_button.setDisable(false);
Image img1; Image img1;
if (selectedPlant.image() != null) { if (selectedPlant.image() != null) {
@ -287,20 +288,6 @@ public class PlantsController {
}); });
} }
/**
* creates {@link String} of the plant information.
* @return return {@link Plant} description
*/
private String getPlantDescription() {
StringBuilder sb = new StringBuilder();
sb.append("Name: ").append(selectedPlant.name())
.append("\nDescription:\n").append(selectedPlant.description())
.append("\nLight Level: ").append(selectedPlant.light())
.append("\nSoil: ").append(selectedPlant.soil())
.append("\nSpacing: ").append(selectedPlant.spacing());
return sb.toString();
}
/** /**
* clears the ListView of entries * clears the ListView of entries

View File

@ -21,11 +21,6 @@ public class SelectSowDayController {
@FXML @FXML
public ToggleGroup phase_group; public ToggleGroup phase_group;
/**
* if sow date radio button was selected return sow date
* if sow date was not selected get sow from harvest day and return sow date
* @return {@link LocalDate} of the sow date
*/
public LocalDate retrieveResult() { public LocalDate retrieveResult() {
LocalDate sowDate = datepicker.getValue(); LocalDate sowDate = datepicker.getValue();
if (harvest_radio.isSelected()) { if (harvest_radio.isSelected()) {
@ -58,10 +53,6 @@ public class SelectSowDayController {
harvest_radio.setUserData(GrowthPhaseType.HARVEST); harvest_radio.setUserData(GrowthPhaseType.HARVEST);
} }
/**
* Disable save button when date picker is empty
* @param saveButton {@link Button} to be disabled
*/
public void initSaveButton(Button saveButton) { public void initSaveButton(Button saveButton) {
saveButton.disableProperty().bind(datepicker.valueProperty().isNull()); saveButton.disableProperty().bind(datepicker.valueProperty().isNull());
} }

View File

@ -1,6 +0,0 @@
package ch.zhaw.gartenverwaltung;
public class TutorialController {
}

View File

@ -2,210 +2,42 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1091.0" prefWidth="1060.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.HomeController">
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="729.0" prefWidth="1060.0"
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.HomeController">
<children> <children>
<ScrollPane fitToWidth="true" prefHeight="1157.0" prefWidth="1060.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <VBox layoutX="75.0" layoutY="73.0" prefHeight="729.0" prefWidth="1060.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<VBox prefHeight="1091.0" prefWidth="1058.0">
<children>
<Pane prefHeight="1085.0" prefWidth="1018.0">
<children>
<VBox prefHeight="1047.0" prefWidth="1019.0">
<children> <children>
<Label text="Garden Management"> <Label text="Garden Management">
<font> <font>
<Font size="34.0" /> <Font size="34.0" />
</font> </font>
<VBox.margin>
<Insets bottom="30.0" />
</VBox.margin>
</Label> </Label>
<Label alignment="TOP_LEFT" prefHeight="22.0" prefWidth="1039.0" text="This Application was created to help the user manage his or her garden. For this the Application has many functionalities:" wrapText="true"> <Label prefHeight="106.0" prefWidth="1040.0" text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." wrapText="true" />
<Label text="Tutorial">
<font> <font>
<Font size="14.0" /> <Font name="System Bold" size="18.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Label text="Base Functionalities:">
<font>
<Font name="System Bold" size="14.0" />
</font> </font>
</Label> </Label>
<Label text="- The user can select a plant he wants to cultivate."> <Pane prefHeight="200.0" prefWidth="200.0">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="62.0" text="- The user can filter the plants according to seasons, hardiness zone and search query">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="62.0" text="- The user can select the harverst or sow date. ">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="102.0" text="- The user can get a detailed information of the plant he wants to harvest.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="122.0" text="- The user can get view the task list of the given plant.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="142.0" text="- The user can get the tasks of the next seven days in the scheduler.">
<font>
<Font size="14.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Label layoutX="10.0" layoutY="42.0" text="Advanced Functionalities:">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="62.0" text="- The user can edit the task list and add custom tasks.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="212.0" text="- The user can set the area (sqare meter) for the plants.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="232.0" text="- The user can set the location (PLZ) for the plants.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="162.0" text="- The user can set the pesticide which will be used, which will create additonal tasks.">
<font>
<Font size="14.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Label layoutX="10.0" layoutY="192.0" text="Weather Forcast:">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="212.0" text="- According to the location the weather forcast will crate or delete tasks.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="10.0" layoutY="272.0" text="- The user receives notifications that aditional tasks werde created or some tasks were deleted.">
<font>
<Font size="14.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<Label text="Created by:">
<font>
<Font name="System Bold" size="14.0" />
</font>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</Label>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0">
<children> <children>
<ImageView fx:id="imageViewElias" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER"> <VBox prefHeight="200.0" prefWidth="1040.0">
<HBox.margin>
<Insets right="30.0" />
</HBox.margin>
</ImageView>
<Label text="Elias Csomor" />
</children>
<VBox.margin>
<Insets bottom="15.0" />
</VBox.margin>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0">
<children> <children>
<ImageView fx:id="imageViewPhilippe" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER"> <Label text="Task 1" wrapText="true" />
<HBox.margin> <Label text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." wrapText="true" />
<Insets right="30.0" />
</HBox.margin>
</ImageView>
<Label text="Philippe Giavarini" />
</children>
<VBox.margin>
<Insets bottom="15.0" />
</VBox.margin>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fx:id="imageViewDavid" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER">
<HBox.margin>
<Insets right="30.0" />
</HBox.margin>
</ImageView>
<Label text="David Guler" />
</children>
<VBox.margin>
<Insets bottom="15.0" />
</VBox.margin>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fx:id="imageViewGian" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER">
<HBox.margin>
<Insets right="30.0" />
</HBox.margin>
</ImageView>
<Label text="Gian-Andrea Hutter" />
</children>
<VBox.margin>
<Insets bottom="15.0" />
</VBox.margin>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fx:id="imageViewRoman" fitHeight="100.0" fitWidth="100.0" pickOnBounds="true" preserveRatio="true" HBox.hgrow="NEVER">
<HBox.margin>
<Insets right="30.0" />
</HBox.margin>
</ImageView>
<Label text="Roman Schenk" />
</children>
<VBox.margin>
<Insets bottom="15.0" />
</VBox.margin>
</HBox>
</children> </children>
</VBox> </VBox>
</children> </children>
<VBox.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</VBox.margin>
</Pane> </Pane>
</children> </children>
<padding> <padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding> </padding>
</VBox> </VBox>
</content>
</ScrollPane>
</children> </children>
</AnchorPane> </AnchorPane>

View File

@ -3,12 +3,11 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="myGardenRoot" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="655.0" prefWidth="1175.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.MyGardenController"> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="655.0" prefWidth="1175.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.MyGardenController" fx:id="myGardenRoot">
<children> <children>
<VBox layoutY="49.0" prefHeight="655.0" prefWidth="1175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <VBox layoutY="49.0" prefHeight="655.0" prefWidth="1175.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
@ -20,7 +19,7 @@
<Insets bottom="10.0" /> <Insets bottom="10.0" />
</VBox.margin> </VBox.margin>
</Label> </Label>
<ListView fx:id="myGarden_listView" maxHeight="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" /> <VBox fx:id="myPlants_vbox" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="100.0" VBox.vgrow="ALWAYS" />
<Button fx:id="addPlant_button" mnemonicParsing="false" onAction="#addPlant" prefHeight="45.0" prefWidth="155.0" text="Add new Plant"> <Button fx:id="addPlant_button" mnemonicParsing="false" onAction="#addPlant" prefHeight="45.0" prefWidth="155.0" text="Add new Plant">
<VBox.margin> <VBox.margin>
<Insets top="10.0" /> <Insets top="10.0" />

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.gartenverwaltung.TutorialController">
<children>
<VBox layoutX="7.0" layoutY="8.0" prefHeight="200.0" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label text="Tutorial">
<font>
<Font size="18.0" />
</font>
</Label>
<Label text="To be added" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>
</children>
</AnchorPane>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB