implementation de la france
This commit is contained in:
parent
d026ecf905
commit
025aaab5be
@ -19,15 +19,15 @@ public class FranceMain extends Application {
|
|||||||
public void init() {
|
public void init() {
|
||||||
france = FranceBuilder.create()
|
france = FranceBuilder.create()
|
||||||
// .backgroundColor(Color.web("#4aa9d7"))
|
// .backgroundColor(Color.web("#4aa9d7"))
|
||||||
//.fillColor(Color.web("#dcb36c"))
|
// .fillColor(Color.web("#dcb36c"))
|
||||||
//.strokeColor(Color.web("#987028"))
|
// .strokeColor(Color.web("#987028"))
|
||||||
//.hoverColor(Color.web("#fec47e"))
|
// .hoverColor(Color.web("#fec47e"))
|
||||||
//.pressedColor(Color.web("#6cee85"))
|
// .pressedColor(Color.web("#6cee85"))
|
||||||
//.selectedColor(Color.MAGENTA)
|
// .selectedColor(Color.MAGENTA)
|
||||||
.mousePressHandler(evt -> {
|
// .mousePressHandler(evt -> {
|
||||||
AcademiePath academiePath = (AcademiePath) evt.getSource();
|
// AcademiePath academiePath = (AcademiePath) evt.getSource();
|
||||||
System.out.println("On vient de cliquer sur l'"+academiePath.getAcademie().getNom());
|
// System.out.println("On vient de cliquer sur l'"+academiePath.getAcademie().getNom());
|
||||||
})
|
// })
|
||||||
.selectionEnabled(true)
|
.selectionEnabled(true)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
package fr.univ_amu.iut.fp;
|
|
||||||
|
|
||||||
import fr.univ_amu.iut.view.map.AcademiePath;
|
|
||||||
import fr.univ_amu.iut.view.map.France;
|
|
||||||
import fr.univ_amu.iut.view.map.FranceBuilder;
|
|
||||||
import javafx.fxml.FXML;
|
|
||||||
import javafx.scene.layout.StackPane;
|
|
||||||
|
|
||||||
public class Controlle {
|
|
||||||
|
|
||||||
}
|
|
||||||
40
src/main/java/fr/univ_amu/iut/fp/Controller.java
Normal file
40
src/main/java/fr/univ_amu/iut/fp/Controller.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package fr.univ_amu.iut.fp;
|
||||||
|
|
||||||
|
import fr.univ_amu.iut.view.map.France;
|
||||||
|
import fr.univ_amu.iut.view.map.FranceBuilder;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
public class Controller implements Initializable {
|
||||||
|
France france;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Pane stackPaneFrance;
|
||||||
|
|
||||||
|
private void initFrance() {
|
||||||
|
france = FranceBuilder.create()
|
||||||
|
// .backgroundColor(Color.web("#4aa9d7"))
|
||||||
|
// .fillColor(Color.web("#dcb36c"))
|
||||||
|
// .strokeColor(Color.web("#987028"))
|
||||||
|
// .hoverColor(Color.web("#fec47e"))
|
||||||
|
// .pressedColor(Color.web("#6cee85"))
|
||||||
|
// .selectedColor(Color.MAGENTA)
|
||||||
|
// .mousePressHandler(evt -> {
|
||||||
|
// AcademiePath academiePath = (AcademiePath) evt.getSource();
|
||||||
|
// System.out.println("On vient de cliquer sur l'"+academiePath.getAcademie().getNom());
|
||||||
|
// })
|
||||||
|
.selectionEnabled(true)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
|
initFrance();
|
||||||
|
stackPaneFrance.getChildren().add(france);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@ import javafx.scene.Parent;
|
|||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
@ -18,40 +19,16 @@ import javax.xml.namespace.QName;
|
|||||||
|
|
||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
|
|
||||||
France france;
|
|
||||||
@FXML
|
|
||||||
private StackPane stackPaneFrance ;
|
|
||||||
|
|
||||||
private void initFrance(){
|
|
||||||
france = FranceBuilder.create()
|
|
||||||
// .backgroundColor(Color.web("#4aa9d7"))
|
|
||||||
//.fillColor(Color.web("#dcb36c"))
|
|
||||||
//.strokeColor(Color.web("#987028"))
|
|
||||||
//.hoverColor(Color.web("#fec47e"))
|
|
||||||
//.pressedColor(Color.web("#6cee85"))
|
|
||||||
//.selectedColor(Color.MAGENTA)
|
|
||||||
.mousePressHandler(evt -> {
|
|
||||||
AcademiePath academiePath = (AcademiePath) evt.getSource();
|
|
||||||
System.out.println("On vient de cliquer sur l'"+academiePath.getAcademie().getNom());
|
|
||||||
})
|
|
||||||
.selectionEnabled(true)
|
|
||||||
.build();
|
|
||||||
stackPaneFrance.getChildren().addAll(france);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void start(Stage primaryStage) throws Exception {
|
|
||||||
AnchorPane root = FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fp/fp.fxml"));
|
|
||||||
// initFrance();
|
|
||||||
primaryStage.setTitle("Carte des académie");
|
|
||||||
primaryStage.setScene(new Scene(root));
|
|
||||||
primaryStage.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {launch(args);}
|
public static void main(String[] args) {launch(args);}
|
||||||
|
@Override
|
||||||
|
public void start(Stage stage) throws Exception {
|
||||||
|
try {
|
||||||
|
AnchorPane root = FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fp/fp.fxml"));
|
||||||
|
stage.setScene(new Scene(root));
|
||||||
|
stage.show();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.scene.Cursor?>
|
<?import javafx.scene.*?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.layout.StackPane?>
|
|
||||||
|
|
||||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: none;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fp.Main">
|
<AnchorPane id="root" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: none;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fp.Controller">
|
||||||
<children>
|
<children>
|
||||||
<AnchorPane prefHeight="64.0" prefWidth="600.0" style="-fx-background-color: gray;">
|
<AnchorPane prefHeight="64.0" prefWidth="600.0" style="-fx-background-color: gray;">
|
||||||
<children>
|
<children>
|
||||||
<TextField id="barre de recherche " layoutX="114.0" layoutY="19.0" prefHeight="27.0" prefWidth="372.0" promptText="Search" style="-fx-border-color: blue; -fx-border-width: gray; -fx-border-radius: 5em; -fx-background-radius: 5em;" text="Search">
|
<TextField id="barreDeRecherche " layoutX="114.0" layoutY="19.0" prefHeight="27.0" prefWidth="372.0" promptText="Search" style="-fx-border-color: blue; -fx-border-width: gray; -fx-border-radius: 5em; -fx-background-radius: 5em;" text="Search">
|
||||||
<cursor>
|
<cursor>
|
||||||
<Cursor fx:constant="CROSSHAIR" />
|
<Cursor fx:constant="CROSSHAIR" />
|
||||||
</cursor>
|
</cursor>
|
||||||
</TextField>
|
</TextField>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<StackPane id="stackPaneFrance" layoutX="47.0" layoutY="125.0" prefHeight="150.0" prefWidth="200.0" style="-fx-background-color: blue;" />
|
<StackPane id="stackPaneFrance" fx:id="stackPaneFrance" layoutX="47.0" layoutY="125.0" prefHeight="150.0" prefWidth="200.0" style="-fx-background-color: blue;" />
|
||||||
<StackPane layoutX="348.0" layoutY="125.0" prefHeight="150.0" prefWidth="200.0" style="-fx-background-color: blue;" />
|
<StackPane layoutX="348.0" layoutY="125.0" prefHeight="150.0" prefWidth="200.0" style="-fx-background-color: blue;" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user