Merge branch 'main' into app_test
This commit is contained in:
commit
55d132ae0f
@ -21,6 +21,7 @@ import javafx.fxml.Initializable;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.scene.paint.Color;
|
||||
@ -45,6 +46,9 @@ public class Controller implements Initializable {
|
||||
@FXML
|
||||
private Pane stackPaneFrance;
|
||||
|
||||
@FXML
|
||||
private TextField barreDeRecherche;
|
||||
|
||||
@FXML
|
||||
private AnchorPane discipline;
|
||||
|
||||
@ -54,6 +58,9 @@ public class Controller implements Initializable {
|
||||
@FXML
|
||||
private Button recherche;
|
||||
|
||||
@FXML
|
||||
private Button rechercheTextuelle;
|
||||
|
||||
// Style des boutons
|
||||
Background btNormalBackground = new Background(new BackgroundFill(Color.rgb(255,110,64), new CornerRadii(30), Insets.EMPTY));
|
||||
Background btNormalHover = new Background(new BackgroundFill(Color.rgb(255,152,120), new CornerRadii(30), Insets.EMPTY));
|
||||
@ -176,10 +183,9 @@ public class Controller implements Initializable {
|
||||
|
||||
placeButtonThematique();
|
||||
placeButtonDiscipline();
|
||||
EventHandler<ActionEvent> handler = event ->{
|
||||
//TODO Recherche en fonctions des objets selectionnés
|
||||
EventHandler<ActionEvent> handleRechercheTextuelle = event ->{
|
||||
|
||||
Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee()));
|
||||
Donnees.setUsagesObtenus(daoUsage.findByNamePart(barreDeRecherche.getText()));
|
||||
|
||||
Stage resultats = new Stage();
|
||||
try {
|
||||
@ -188,8 +194,21 @@ public class Controller implements Initializable {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
};
|
||||
recherche.setOnAction(handler);
|
||||
rechercheTextuelle.setOnAction(handleRechercheTextuelle);
|
||||
|
||||
|
||||
EventHandler<ActionEvent> handleRechercheCrieters = event ->{
|
||||
System.out.println("test");
|
||||
Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee()));
|
||||
Stage resultats = new Stage();
|
||||
try {
|
||||
resultats.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fResultat/FResultat.fxml"))));
|
||||
resultats.show();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
};
|
||||
recherche.setOnAction(handleRechercheCrieters);
|
||||
}
|
||||
}
|
||||
|
@ -7,17 +7,17 @@
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
|
||||
<AnchorPane id="root" prefHeight="798.0" prefWidth="1365.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fp.Controller">
|
||||
<AnchorPane id="root" prefHeight="860.0" prefWidth="1365.0" style="-fx-background-color: #f5f0e1#f5f0e1;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fp.Controller">
|
||||
<children>
|
||||
<StackPane id="stackPaneFrance" fx:id="stackPaneFrance" layoutX="43.0" layoutY="92.0" prefHeight="649.0" prefWidth="642.0" style="-fx-background-color: blue;" />
|
||||
<AnchorPane layoutX="11.0" prefHeight="80.0" prefWidth="1019.0" style="-fx-background-color: #1e3d59#1e3d59;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
|
||||
<children>
|
||||
<TextField id="barreDeRecherche " layoutX="329.0" layoutY="27.0" prefHeight="27.0" prefWidth="372.0" promptText="Entrer nom projet :" style="-fx-background-color: #CDD0D4#CDD0D4; -fx-border-radius: 5em; -fx-background-radius: 5em;" text=" " AnchorPane.leftAnchor="329.0" AnchorPane.rightAnchor="329.0">
|
||||
<TextField fx:id="barreDeRecherche" id="barreDeRecherche" layoutX="329.0" layoutY="27.0" prefHeight="27.0" prefWidth="372.0" promptText="Entrer nom projet :" style="-fx-background-color: #CDD0D4#CDD0D4; -fx-border-radius: 5em; -fx-background-radius: 5em;" text=" " AnchorPane.leftAnchor="329.0" AnchorPane.rightAnchor="329.0">
|
||||
<cursor>
|
||||
<Cursor fx:constant="TEXT" />
|
||||
</cursor>
|
||||
</TextField>
|
||||
<Button layoutX="1066.0" layoutY="27.0" mnemonicParsing="false" text="RECHERCHER VIA LE NOM" />
|
||||
<Button fx:id="rechercheTextuelle" layoutX="1066.0" layoutY="27.0" mnemonicParsing="false" text="RECHERCHER VIA LE NOM" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<StackPane layoutX="744.0" layoutY="100.0" prefHeight="181.0" prefWidth="622.0" style="-fx-background-color: none;" AnchorPane.rightAnchor="-1.0" AnchorPane.topAnchor="100.0">
|
||||
@ -26,7 +26,6 @@
|
||||
<content>
|
||||
<AnchorPane id="discipline" fx:id="discipline" minHeight="0.0" minWidth="0.0" prefHeight="442.0" prefWidth="620.0" style="-fx-background-color: #f5f0e1#f5f0e1;">
|
||||
<children>
|
||||
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
|
Loading…
Reference in New Issue
Block a user