refactor: renamed everything

This commit is contained in:
David Guler
2022-11-14 13:47:22 +01:00
parent a5e1acc7c3
commit 4f80a0a3e0
24 changed files with 193 additions and 211 deletions
@@ -1,9 +1,9 @@
package ch.zhaw.gartenverwaltung;
import ch.zhaw.gartenverwaltung.gardenplan.Gardenplanmodel;
import ch.zhaw.gartenverwaltung.models.Garden;
import ch.zhaw.gartenverwaltung.io.HardinessZoneNotSetException;
import ch.zhaw.gartenverwaltung.plantList.PlantListModel;
import ch.zhaw.gartenverwaltung.taskList.TaskListModel;
import ch.zhaw.gartenverwaltung.models.PlantListModel;
import ch.zhaw.gartenverwaltung.models.GardenSchedule;
import ch.zhaw.gartenverwaltung.types.Crop;
import ch.zhaw.gartenverwaltung.types.Pest;
import ch.zhaw.gartenverwaltung.types.Plant;
@@ -24,8 +24,8 @@ import java.util.List;
public class CropDetailController {
private Crop crop = null;
private final PlantListModel plantListModel = new PlantListModel();
private final TaskListModel taskListModel = new TaskListModel();
private final Gardenplanmodel gardenplanmodel = new Gardenplanmodel(taskListModel);
private final GardenSchedule gardenSchedule = new GardenSchedule();
private final Garden garden = new Garden(gardenSchedule);
@FXML
private ImageView imageView;
@@ -89,7 +89,7 @@ public class CropDetailController {
public void setPlantFromCrop(Crop crop) throws HardinessZoneNotSetException, IOException {
this.crop = crop;
Plant plant = plantListModel.getFilteredPlantListById(Config.getCurrentHardinessZone(), crop.getPlantId()).get(0);
Plant plant = plantListModel.getFilteredPlantListById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).get(0);
cropName_label.setText(plant.name());
description_label.setText(plant.description());
light_label.setText(String.valueOf(plant.light()));
@@ -105,7 +105,7 @@ public class CropDetailController {
}
private void createTaskLists(Crop crop) throws IOException {
List<Task> taskList = taskListModel.getTaskListForCrop(crop.getCropId().get());
List<Task> taskList = gardenSchedule.getTaskListForCrop(crop.getCropId().get());
for (Task task : taskList) {
Label label = new Label(task.getDescription());
growthPhases_vbox.getChildren().add(label);