fenetre de resultats
This commit is contained in:
parent
9c6ddec0ef
commit
cd99e8c121
52
src/main/java/fr/univ_amu/iut/fResultat/Controller.java
Normal file
52
src/main/java/fr/univ_amu/iut/fResultat/Controller.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package fr.univ_amu.iut.fResultat;
|
||||||
|
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.control.TableColumn;
|
||||||
|
import javafx.scene.control.TableView;
|
||||||
|
import javafx.scene.control.cell.PropertyValueFactory;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
public class Controller implements Initializable{
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableColumn<Utilisateur, String> Disciplines;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableColumn<Utilisateur, String> Niveaux;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableColumn<Utilisateur, String> Noms;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableColumn<Utilisateur, Integer> Numéro;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableView<Utilisateur> Table;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private TableColumn<Utilisateur, String> Types;
|
||||||
|
|
||||||
|
ObservableList<Utilisateur> list = FXCollections.observableArrayList(
|
||||||
|
new Utilisateur(1,"Patrik","Maht","Blog","Terminal"),
|
||||||
|
new Utilisateur(2,"Mark","Chimie","Site","Seconde")
|
||||||
|
);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
|
Noms.setCellValueFactory(new PropertyValueFactory<Utilisateur, String>("Noms"));
|
||||||
|
Numéro.setCellValueFactory(new PropertyValueFactory<Utilisateur, Integer>("Numéro"));
|
||||||
|
Disciplines.setCellValueFactory(new PropertyValueFactory<Utilisateur, String>("Disciplines"));
|
||||||
|
Types.setCellValueFactory(new PropertyValueFactory<Utilisateur, String>("Types"));
|
||||||
|
Niveaux.setCellValueFactory(new PropertyValueFactory<Utilisateur, String>("Niveaux"));
|
||||||
|
|
||||||
|
Table.setItems(list);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
19
src/main/java/fr/univ_amu/iut/fResultat/FResultat.fxml
Normal file
19
src/main/java/fr/univ_amu/iut/fResultat/FResultat.fxml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.TableColumn?>
|
||||||
|
<?import javafx.scene.control.TableView?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #1e3d59#1e3d59;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.univ_amu.iut.fResultat.Controller">
|
||||||
|
<children>
|
||||||
|
<TableView fx:id="Table" layoutX="10.0" layoutY="10.0" prefHeight="380.0" prefWidth="580.0" style="-fx-background-radius: 20; -fx-border-color: #1e3d59#1e3d59; -fx-background-color: #f5f0e1#f5f0e1;" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="10.0">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="Numéro" prefWidth="75.0" text="Numéro" />
|
||||||
|
<TableColumn fx:id="Noms" prefWidth="121.0" text="Noms" />
|
||||||
|
<TableColumn fx:id="Disciplines" prefWidth="128.0" text="Disciplines" />
|
||||||
|
<TableColumn fx:id="Types" prefWidth="124.0" text="Types" />
|
||||||
|
<TableColumn fx:id="Niveaux" minWidth="8.0" prefWidth="130.0" text="Niveaux" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
24
src/main/java/fr/univ_amu/iut/fResultat/Main.java
Normal file
24
src/main/java/fr/univ_amu/iut/fResultat/Main.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package fr.univ_amu.iut.fResultat;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Main extends Application {
|
||||||
|
|
||||||
|
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/fResultat/FResultat.fxml"));
|
||||||
|
stage.setScene(new Scene(root));
|
||||||
|
stage.show();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
src/main/java/fr/univ_amu/iut/fResultat/Utilisateur.java
Normal file
40
src/main/java/fr/univ_amu/iut/fResultat/Utilisateur.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package fr.univ_amu.iut.fResultat;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Utilisateur {
|
||||||
|
|
||||||
|
private int Numéro ;
|
||||||
|
private String Noms;
|
||||||
|
private String Disciplines;
|
||||||
|
private String Types;
|
||||||
|
private String Niveaux;
|
||||||
|
|
||||||
|
public Utilisateur(int numero, String noms, String disciplines, String types, String niveaux) {
|
||||||
|
Numéro = numero;
|
||||||
|
Noms = noms;
|
||||||
|
Disciplines = disciplines;
|
||||||
|
Types = types;
|
||||||
|
Niveaux = niveaux;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNuméro() {
|
||||||
|
return Numéro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoms() {
|
||||||
|
return Noms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisciplines() {
|
||||||
|
return Disciplines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypes() {
|
||||||
|
return Types;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNiveaux() {
|
||||||
|
return Niveaux;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user