Merge branch 'dev' into feature_weather
This commit is contained in:
commit
2864c54c72
|
@ -7,7 +7,7 @@ import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import java.io.File;
|
import java.io.InputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller class for the Tutorial.fxml file
|
* Controller class for the Tutorial.fxml file
|
||||||
|
@ -46,10 +46,10 @@ public class TutorialController {
|
||||||
* @param fileName the file name of the source
|
* @param fileName the file name of the source
|
||||||
*/
|
*/
|
||||||
private void setImageView(ImageView imageView, String fileName) {
|
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;
|
Image image;
|
||||||
if (file.exists()) {
|
if (is != null) {
|
||||||
image = new Image(String.valueOf(PlantsController.class.getResource(fileName)));
|
image = new Image(String.valueOf(PlantsController.class.getResource("screenshots/" + fileName)));
|
||||||
} else {
|
} else {
|
||||||
image = new Image(String.valueOf(PlantsController.class.getResource("placeholder.png")));
|
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 |
Loading…
Reference in New Issue