Merge branch 'dev' into feature_weather

This commit is contained in:
Gian-Andrea Hutter 2022-12-11 16:16:34 +01:00
commit 2864c54c72
6 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import java.io.File;
import java.io.InputStream;
/**
* Controller class for the Tutorial.fxml file
@ -46,10 +46,10 @@ public class TutorialController {
* @param fileName the file name of the source
*/
private void setImageView(ImageView imageView, String fileName) {
File file = new File(String.valueOf(PlantsController.class.getResource(fileName)));
InputStream is = PlantsController.class.getResourceAsStream("screenshots/" + fileName);
Image image;
if (file.exists()) {
image = new Image(String.valueOf(PlantsController.class.getResource(fileName)));
if (is != null) {
image = new Image(String.valueOf(PlantsController.class.getResource("screenshots/" + fileName)));
} else {
image = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB