Merge pull request #21 from IUTInfoAix-R202-2022/buttonLogin
Button de login admin
This commit is contained in:
		
						commit
						f325593a94
					
				| @ -58,6 +58,9 @@ public class Controller implements Initializable { | ||||
| 
 | ||||
|     @FXML | ||||
|     private Button rechercheTextuelle; | ||||
|      | ||||
|     @FXML | ||||
|     private Button login; | ||||
| 
 | ||||
|     // Style des boutons | ||||
|     Background btNormalBackground = new Background(new BackgroundFill(Color.rgb(255,110,64), new CornerRadii(30), Insets.EMPTY)); | ||||
| @ -215,7 +218,6 @@ public class Controller implements Initializable { | ||||
| 
 | ||||
| 
 | ||||
|         EventHandler<ActionEvent> handleRechercheCrieters = event ->{ | ||||
|             System.out.println("test"); | ||||
|             Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee())); | ||||
|             Stage resultats = new Stage(); | ||||
|             try { | ||||
| @ -226,5 +228,20 @@ public class Controller implements Initializable { | ||||
|             } | ||||
|         }; | ||||
|         recherche.setOnAction(handleRechercheCrieters); | ||||
| 
 | ||||
|         EventHandler<ActionEvent> loginPrompt = event ->{ | ||||
|             System.out.println("test"); | ||||
|             Stage loginWindow = new Stage(); | ||||
|             try { | ||||
|                 loginWindow.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/loginPrompt/Code_acces.fxml")))); | ||||
|                 loginWindow.show(); | ||||
|             } catch (IOException e) { | ||||
|                 e.printStackTrace(); | ||||
|             } | ||||
|         }; | ||||
| 
 | ||||
|         login.setOnAction(loginPrompt); | ||||
| 
 | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -1,11 +1,8 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| 
 | ||||
| <?import javafx.scene.Cursor?> | ||||
| <?import javafx.scene.control.Button?> | ||||
| <?import javafx.scene.control.ScrollPane?> | ||||
| <?import javafx.scene.control.TextField?> | ||||
| <?import javafx.scene.layout.AnchorPane?> | ||||
| <?import javafx.scene.layout.StackPane?> | ||||
| <?import javafx.scene.*?> | ||||
| <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.layout.*?> | ||||
| 
 | ||||
| <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> | ||||
| @ -17,12 +14,13 @@ | ||||
|                   <Cursor fx:constant="TEXT" /> | ||||
|                </cursor> | ||||
|             </TextField> | ||||
|             <Button fx:id="rechercheTextuelle" 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" AnchorPane.rightAnchor="110.0" /> | ||||
|             <Button fx:id="login" layoutX="41.0" layoutY="29.0" mnemonicParsing="false" style="-fx-background-radius: 30;" text="interface admin" /> | ||||
|          </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"> | ||||
|       <StackPane layoutX="744.0" layoutY="100.0" prefHeight="254.0" prefWidth="622.0" style="-fx-background-color: none;" AnchorPane.rightAnchor="-1.0" AnchorPane.topAnchor="100.0"> | ||||
|          <children> | ||||
|             <ScrollPane hbarPolicy="NEVER" prefHeight="471.0" prefWidth="347.0" style="-fx-background-color: #f5f0e1;"> | ||||
|             <ScrollPane hbarPolicy="NEVER" prefHeight="170.0" prefWidth="622.0" style="-fx-background-color: #f5f0e1;"> | ||||
|               <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> | ||||
| @ -31,11 +29,11 @@ | ||||
|               </content> | ||||
|             </ScrollPane> | ||||
|          </children></StackPane> | ||||
|       <StackPane layoutX="771.0" layoutY="370.0" prefHeight="181.0" prefWidth="622.0" style="-fx-background-color: none;" AnchorPane.rightAnchor="0.0"> | ||||
|       <StackPane layoutX="771.0" layoutY="380.0" prefHeight="254.0" prefWidth="622.0" style="-fx-background-color: none;" AnchorPane.rightAnchor="0.0"> | ||||
|          <children> | ||||
|             <ScrollPane hbarPolicy="NEVER" prefHeight="471.0" prefWidth="347.0" style="-fx-background-color: #f5f0e1;"> | ||||
|             <ScrollPane hbarPolicy="NEVER" prefHeight="193.0" prefWidth="622.0" style="-fx-background-color: #f5f0e1;"> | ||||
|                <content> | ||||
|                   <AnchorPane id="thematique" fx:id="thematique" minHeight="0.0" minWidth="0.0" prefHeight="699.0" prefWidth="620.0" style="-fx-background-color: #f5f0e1#f5f0e1;"> | ||||
|                   <AnchorPane id="thematique" fx:id="thematique" minHeight="0.0" minWidth="0.0" prefHeight="596.0" prefWidth="620.0" style="-fx-background-color: #f5f0e1#f5f0e1;"> | ||||
|                      <children> | ||||
| 
 | ||||
|                      </children> | ||||
| @ -44,6 +42,6 @@ | ||||
|             </ScrollPane> | ||||
|          </children> | ||||
|       </StackPane> | ||||
|       <Button id="recherche" fx:id="recherche" layoutX="875.0" layoutY="606.0" mnemonicParsing="false" prefHeight="120.0" prefWidth="337.0" style="-fx-background-radius: 50; -fx-background-color: #ffc13b#ffc13b;" text="RECHERCHER VIA LES FILTRES" AnchorPane.bottomAnchor="72.0" AnchorPane.rightAnchor="153.0" /> | ||||
|       <Button id="recherche" fx:id="recherche" layoutX="875.0" layoutY="630.0" mnemonicParsing="false" prefHeight="120.0" prefWidth="337.0" style="-fx-background-radius: 50; -fx-background-color: #ffc13b#ffc13b;" text="RECHERCHER VIA LES FILTRES" AnchorPane.bottomAnchor="48.0" AnchorPane.rightAnchor="153.0" /> | ||||
|    </children> | ||||
| </AnchorPane> | ||||
|  | ||||
							
								
								
									
										19
									
								
								src/main/java/fr/univ_amu/iut/loginPrompt/Code_acces.fxml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/main/java/fr/univ_amu/iut/loginPrompt/Code_acces.fxml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| 
 | ||||
| <?import javafx.scene.control.Button?> | ||||
| <?import javafx.scene.control.PasswordField?> | ||||
| <?import javafx.scene.layout.AnchorPane?> | ||||
| <?import javafx.scene.text.Font?> | ||||
| <?import javafx.scene.text.Text?> | ||||
| 
 | ||||
| <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="321.0" prefWidth="504.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.loginPrompt.Controller"> | ||||
|    <children> | ||||
|       <Text layoutX="171.0" layoutY="125.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Code d'accès" textAlignment="CENTER" wrappingWidth="171.82891845703125"> | ||||
|          <font> | ||||
|             <Font size="26.0" /> | ||||
|          </font> | ||||
|       </Text> | ||||
|       <PasswordField fx:id="password" layoutX="175.0" layoutY="148.0" prefHeight="26.0" prefWidth="167.0" style="-fx-background-radius: 10;" /> | ||||
|       <Button fx:id="log" layoutX="208.0" layoutY="208.0" mnemonicParsing="false" text="Se connecter" /> | ||||
|    </children> | ||||
| </AnchorPane> | ||||
							
								
								
									
										33
									
								
								src/main/java/fr/univ_amu/iut/loginPrompt/Controller.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								src/main/java/fr/univ_amu/iut/loginPrompt/Controller.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | ||||
| 
 | ||||
| package fr.univ_amu.iut.loginPrompt; | ||||
| 
 | ||||
| import javafx.event.ActionEvent; | ||||
| import javafx.event.EventHandler; | ||||
| import javafx.fxml.FXML; | ||||
| import javafx.fxml.Initializable; | ||||
| import javafx.scene.control.Button; | ||||
| import javafx.scene.control.PasswordField; | ||||
| 
 | ||||
| 
 | ||||
| import java.net.URL; | ||||
| import java.util.ResourceBundle; | ||||
| 
 | ||||
| public class Controller implements Initializable{ | ||||
| 
 | ||||
|     @FXML | ||||
|     private PasswordField password; | ||||
| 
 | ||||
|     @FXML | ||||
|     private Button log; | ||||
| 
 | ||||
|     @Override | ||||
|     public void initialize(URL url, ResourceBundle resourceBundle) { | ||||
|          | ||||
|         EventHandler<ActionEvent> handleLogin = event ->{ | ||||
|             System.out.println(password.getText()); | ||||
|         }; | ||||
|         log.setOnAction(handleLogin); | ||||
|          | ||||
|     } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user