diff options
Diffstat (limited to 'src/main/java/vue/AfficheAccueil.java')
| -rw-r--r-- | src/main/java/vue/AfficheAccueil.java | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/src/main/java/vue/AfficheAccueil.java b/src/main/java/vue/AfficheAccueil.java new file mode 100644 index 0000000..957a249 --- /dev/null +++ b/src/main/java/vue/AfficheAccueil.java | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | package vue; | ||
| 2 | |||
| 3 | import java.util.ArrayList; | ||
| 4 | |||
| 5 | import controlleur.Connexion; | ||
| 6 | import controlleur.EvenementController; | ||
| 7 | import javafx.geometry.Pos; | ||
| 8 | import javafx.scene.Scene; | ||
| 9 | import javafx.scene.control.Button; | ||
| 10 | import javafx.scene.control.Label; | ||
| 11 | import javafx.scene.image.Image; | ||
| 12 | import javafx.scene.image.ImageView; | ||
| 13 | import javafx.scene.layout.HBox; | ||
| 14 | import javafx.scene.layout.Priority; | ||
| 15 | import javafx.scene.layout.VBox; | ||
| 16 | import javafx.scene.text.Font; | ||
| 17 | import javafx.stage.Stage; | ||
| 18 | import modele.Evenement; | ||
| 19 | import modele.User; | ||
| 20 | |||
| 21 | public class AfficheAccueil { | ||
| 22 | |||
| 23 | private static VBox vEvt; | ||
| 24 | |||
| 25 | public static void affiche(Stage primaryStage,User session) { | ||
| 26 | |||
| 27 | |||
| 28 | VBox root = new VBox(); | ||
| 29 | Scene scene = new Scene(root,800,600); | ||
| 30 | |||
| 31 | AfficheTopMenu menu = new AfficheTopMenu(primaryStage,session); | ||
| 32 | //AfficheTopMenu.setHgrow(root, Priority.ALWAYS); | ||
| 33 | |||
| 34 | |||
| 35 | vEvt = AfficheEvenement.NewAfficheEvenement(primaryStage, session); | ||
| 36 | |||
| 37 | root.getChildren().add(menu); | ||
| 38 | |||
| 39 | |||
| 40 | |||
| 41 | Label titre = new Label("StatHammer"); | ||
| 42 | VBox cadre = new VBox(); | ||
| 43 | VBox cadreImage = new VBox(); | ||
| 44 | HBox capsule = new HBox(); | ||
| 45 | |||
| 46 | Button simulation = new Button("SIMULATION"); | ||
| 47 | Button creeListe = new Button("CREER LISTE"); | ||
| 48 | Button gererListe = new Button("GERER LISTE"); | ||
| 49 | /* | ||
| 50 | Image accueil = new Image("images/accueil.jpg"); | ||
| 51 | ImageView iv1 = new ImageView(); | ||
| 52 | iv1.setImage(accueil); | ||
| 53 | iv1.setFitWidth(700); | ||
| 54 | iv1.setPreserveRatio(true); | ||
| 55 | iv1.setSmooth(true); | ||
| 56 | iv1.setCache(true); | ||
| 57 | */ | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | titre.setFont(Font.font(32)); | ||
| 62 | titre.setPrefHeight(150); | ||
| 63 | |||
| 64 | creeListe.setPrefWidth(200); | ||
| 65 | creeListe.setPrefHeight(50); | ||
| 66 | |||
| 67 | simulation.setPrefWidth(200); | ||
| 68 | simulation.setPrefHeight(50); | ||
| 69 | |||
| 70 | gererListe.setPrefWidth(200); | ||
| 71 | gererListe.setPrefHeight(50); | ||
| 72 | |||
| 73 | root.getChildren().add(titre); | ||
| 74 | root.getChildren().add(vEvt); | ||
| 75 | root.getChildren().add(capsule); | ||
| 76 | |||
| 77 | |||
| 78 | capsule.getChildren().add(cadreImage); | ||
| 79 | capsule.getChildren().add(cadre); | ||
| 80 | |||
| 81 | |||
| 82 | cadre.setPrefSize(300, 800); | ||
| 83 | cadre.setAlignment(Pos.CENTER); | ||
| 84 | |||
| 85 | /* | ||
| 86 | cadreImage.setPrefSize(900, 800); | ||
| 87 | cadreImage.setAlignment(Pos.CENTER); | ||
| 88 | |||
| 89 | cadreImage.getChildren().add(iv1);*/ | ||
| 90 | /*cadre.getChildren().add(simulation); | ||
| 91 | cadre.getChildren().add(creeListe); | ||
| 92 | cadre.getChildren().add(gererListe); | ||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | simulation.setOnAction(e -> { | ||
| 99 | primaryStage.close(); | ||
| 100 | AfficheSimulation.affiche(primaryStage); | ||
| 101 | |||
| 102 | }); | ||
| 103 | */ | ||
| 104 | root.setAlignment(Pos.TOP_CENTER); | ||
| 105 | primaryStage.setScene(scene); | ||
| 106 | primaryStage.show(); | ||
| 107 | } | ||
| 108 | } \ No newline at end of file | ||
