diff options
| author | polo <ordipolo@gmx.fr> | 2026-07-02 21:41:19 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-07-02 21:41:19 +0200 |
| commit | e1174a07c8e29eecb87959b97dc706f978c42e9d (patch) | |
| tree | 8e24a1ac256c52a413b8f72b5fa9d43db81e4b26 /src/main/java/vue/simulation/AfficheSimulation.java | |
| parent | 0c2c3ee5a55f36d270171f2f67938542e251fdc5 (diff) | |
| download | ppe_javafx-e1174a07c8e29eecb87959b97dc706f978c42e9d.tar.gz ppe_javafx-e1174a07c8e29eecb87959b97dc706f978c42e9d.tar.bz2 ppe_javafx-e1174a07c8e29eecb87959b97dc706f978c42e9d.zip | |
suite de la migration maven + java et javafx plus récents: images dans resources, constructeur d'Image, bonne bibli pour tailleEcran
Diffstat (limited to 'src/main/java/vue/simulation/AfficheSimulation.java')
| -rw-r--r-- | src/main/java/vue/simulation/AfficheSimulation.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/vue/simulation/AfficheSimulation.java b/src/main/java/vue/simulation/AfficheSimulation.java index bb658a3..6ceb3dd 100644 --- a/src/main/java/vue/simulation/AfficheSimulation.java +++ b/src/main/java/vue/simulation/AfficheSimulation.java | |||
| @@ -6,6 +6,7 @@ import vue.AfficheTopMenu; | |||
| 6 | import java.util.ArrayList; | 6 | import java.util.ArrayList; |
| 7 | 7 | ||
| 8 | import application.Battle; | 8 | import application.Battle; |
| 9 | import application.Main; | ||
| 9 | import controlleur.ControlleurSimu; | 10 | import controlleur.ControlleurSimu; |
| 10 | import javafx.geometry.Insets; | 11 | import javafx.geometry.Insets; |
| 11 | import javafx.geometry.Pos; | 12 | import javafx.geometry.Pos; |
| @@ -98,13 +99,15 @@ public class AfficheSimulation | |||
| 98 | Button btn_simulate = new Button("Action !!"); | 99 | Button btn_simulate = new Button("Action !!"); |
| 99 | btn_simulate.setStyle("-fx-font-size: 15;"); | 100 | btn_simulate.setStyle("-fx-font-size: 15;"); |
| 100 | 101 | ||
| 101 | Image icons_inversion = new Image("/images/inversion_icons.png"); | 102 | //Image icons_inversion = new Image("/images/inversion_icons.png"); |
| 103 | Image icons_inversion = new Image(Main.class.getResource("/images/inversion_icons.png").toExternalForm()); | ||
| 102 | ImageView icons_inversion_box = new ImageView(icons_inversion); | 104 | ImageView icons_inversion_box = new ImageView(icons_inversion); |
| 103 | Button btn_reverse_armies = new Button(); | 105 | Button btn_reverse_armies = new Button(); |
| 104 | btn_reverse_armies.setGraphic(icons_inversion_box); | 106 | btn_reverse_armies.setGraphic(icons_inversion_box); |
| 105 | 107 | ||
| 106 | // grande image | 108 | // grande image |
| 107 | Image image_col2 = new Image("/images/wip.jpg"); | 109 | //Image image_col2 = new Image("/images/wip.jpg"); |
| 110 | Image image_col2 = new Image(Main.class.getResource("/images/wip.jpg").toExternalForm()); | ||
| 108 | ImageView image_box = new ImageView(); | 111 | ImageView image_box = new ImageView(); |
| 109 | image_box.setPreserveRatio(true); | 112 | image_box.setPreserveRatio(true); |
| 110 | image_box.fitWidthProperty().bind(column2.widthProperty()); | 113 | image_box.fitWidthProperty().bind(column2.widthProperty()); |
