Merge pull request #25 from IUTInfoAix-R202-2022/finitions
Quelques finitions : plus sont à venir
This commit is contained in:
commit
9ce5b6d529
@ -22,19 +22,19 @@ public class AppMain extends Application {
|
||||
testMode = res!=null&&res.equals("true");
|
||||
|
||||
|
||||
ScreenController.addScreen("Acceuil",FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fp/fp.fxml")));
|
||||
ScreenController.addScreen("Accueil",FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/fp/fp.fxml")));
|
||||
|
||||
//TODO Ajouter les pages d'admin pour l'ajout des usages
|
||||
//ScreenController.addScreen("admin1",pane);
|
||||
//ScreenController.addScreen("admin2",pane);
|
||||
|
||||
ScreenController.activate("Acceuil");
|
||||
ScreenController.activate("Accueil");
|
||||
stage.setTitle("Carte des académie");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
}
|
||||
|
@ -101,8 +101,8 @@ public class Controller implements Initializable {
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
addActeurs.setOnAction(actionEvent -> addActeur());
|
||||
addRessources.setOnAction(actionEvent -> addRessource());
|
||||
id1.setOnAction(actionEvent -> textMenuButton.setPromptText("Degrès 1"));
|
||||
id2.setOnAction(actionEvent -> textMenuButton.setPromptText("Degrès 2"));
|
||||
id3.setOnAction(actionEvent -> textMenuButton.setPromptText("Degrès +"));
|
||||
id1.setOnAction(actionEvent -> textMenuButton.setPromptText("Degré 1"));
|
||||
id2.setOnAction(actionEvent -> textMenuButton.setPromptText("Degré 2"));
|
||||
id3.setOnAction(actionEvent -> textMenuButton.setPromptText("Degré +"));
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Button>
|
||||
<MenuButton fx:id="menuButton" layoutX="183.0" layoutY="432.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="145.0" style="-fx-background-radius: 10;" text="Degrès">
|
||||
<MenuButton fx:id="menuButton" layoutX="183.0" layoutY="432.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="145.0" style="-fx-background-radius: 10;" text="Degré">
|
||||
<items>
|
||||
<MenuItem fx:id="id1" mnemonicParsing="false" text="1" />
|
||||
<MenuItem fx:id="id2" mnemonicParsing="false" text="2" />
|
||||
|
@ -24,8 +24,6 @@ public class DAOFactoryJPA implements DAOFactory {
|
||||
private <T> void insertAllHelper(DAO<T> dao, Collection<T> list){
|
||||
if(dao.findAll().size()==0){
|
||||
entityManager.getTransaction().begin();
|
||||
System.out.println("LOOP");
|
||||
System.out.flush();
|
||||
for(var a : list){
|
||||
entityManager.persist(a);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ public class TableEntry {
|
||||
nom = usage.getNom();
|
||||
thematique = usage.getThematique().getNom();
|
||||
discipline = usage.getDiscipline().getNom();
|
||||
System.out.println("DESC="+usage.getDescription());
|
||||
description = usage.getDescription();
|
||||
niveau = usage.getNiveau().getNom();
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package fr.univ_amu.iut.fp;
|
||||
|
||||
import fr.univ_amu.iut.AppMain;
|
||||
import fr.univ_amu.iut.Donnees;
|
||||
import fr.univ_amu.iut.dao.DAO;
|
||||
import fr.univ_amu.iut.dao.DAODiscipline;
|
||||
import fr.univ_amu.iut.dao.DAOThematique;
|
||||
import fr.univ_amu.iut.dao.DAOUsage;
|
||||
@ -80,7 +81,7 @@ public class Controller implements Initializable {
|
||||
}
|
||||
|
||||
private Button initButton(Object obj,int x,int y){
|
||||
String nom = "";
|
||||
String nom;
|
||||
|
||||
EventHandler<ActionEvent> actionHandler;
|
||||
EventHandler<MouseEvent> onPressHandler;
|
||||
@ -99,15 +100,11 @@ public class Controller implements Initializable {
|
||||
if (obj instanceof Discipline) {
|
||||
Discipline disciplineActuelle = (Discipline) obj;
|
||||
nom = disciplineActuelle.getNom();
|
||||
actionHandler = event -> {
|
||||
Donnees.setDisciplineSelectionee(disciplineActuelle);
|
||||
};
|
||||
actionHandler = event -> Donnees.setDisciplineSelectionee(disciplineActuelle);
|
||||
} else {
|
||||
Thematique thematiqueActuelle = (Thematique) obj;
|
||||
nom = thematiqueActuelle.getNom();
|
||||
actionHandler = event -> {
|
||||
Donnees.setThematiqueSelectionee(thematiqueActuelle);
|
||||
};
|
||||
actionHandler = event -> Donnees.setThematiqueSelectionee(thematiqueActuelle);
|
||||
}
|
||||
|
||||
|
||||
@ -157,31 +154,15 @@ public class Controller implements Initializable {
|
||||
return bt;
|
||||
}
|
||||
|
||||
private Void placeButtonDiscipline() {
|
||||
List<Discipline> disciplines = daoDiscipline.findAll();
|
||||
discipline.setMinHeight(disciplines.size() * 65);
|
||||
for (int i = 0; i < disciplines.size(); ++i) {
|
||||
private void placeButtons(List<?> list, AnchorPane anchorPane) {
|
||||
anchorPane.setMinHeight(list.size() * 65);
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
if (i % 2 == 0) {
|
||||
discipline.getChildren().add(initButton(disciplines.get(i), 38, i / 2 * 130));
|
||||
anchorPane.getChildren().add(initButton(list.get(i), 38, i / 2 * 130));
|
||||
} else {
|
||||
discipline.getChildren().add(initButton(disciplines.get(i), 332, i / 2 * 130));
|
||||
anchorPane.getChildren().add(initButton(list.get(i), 332, i / 2 * 130));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Void placeButtonThematique() {
|
||||
List<Thematique> thematiques = daoThematique.findAll();
|
||||
thematique.setMinHeight(thematiques.size() * 65);
|
||||
for (int i = 0; i < thematiques.size(); ++i) {
|
||||
if (i % 2 == 0) {
|
||||
thematique.getChildren().add(initButton(thematiques.get(i), 38, i / 2 * 130));
|
||||
} else {
|
||||
thematique.getChildren().add(initButton(thematiques.get(i), 332, i / 2 * 130));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -195,13 +176,9 @@ public class Controller implements Initializable {
|
||||
daoThematique = daoFactory.createDAOThematique();
|
||||
daoUsage = daoFactory.createDAOUsage();
|
||||
|
||||
// a chaque fois
|
||||
placeButtons(daoThematique.findAll(), thematique);
|
||||
placeButtons(daoDiscipline.findAll(), discipline);
|
||||
|
||||
List<Discipline> d = daoDiscipline.findAll();
|
||||
List<Thematique> t = daoThematique.findAll();
|
||||
|
||||
placeButtonThematique();
|
||||
placeButtonDiscipline();
|
||||
EventHandler<ActionEvent> handleRechercheTextuelle = event ->{
|
||||
|
||||
Donnees.setUsagesObtenus(daoUsage.findByNamePart(barreDeRecherche.getText()));
|
||||
@ -217,7 +194,7 @@ public class Controller implements Initializable {
|
||||
rechercheTextuelle.setOnAction(handleRechercheTextuelle);
|
||||
|
||||
|
||||
EventHandler<ActionEvent> handleRechercheCrieters = event ->{
|
||||
EventHandler<ActionEvent> handleRechercheCriterias = event ->{
|
||||
Donnees.setUsagesObtenus(daoUsage.findByCriterias(Donnees.getThematiqueSelectionee(),Donnees.getDisciplineSelectionee(),Donnees.getAcademieSelectionee()));
|
||||
Stage resultats = new Stage();
|
||||
try {
|
||||
@ -227,13 +204,12 @@ public class Controller implements Initializable {
|
||||
e.printStackTrace();
|
||||
}
|
||||
};
|
||||
recherche.setOnAction(handleRechercheCrieters);
|
||||
recherche.setOnAction(handleRechercheCriterias);
|
||||
|
||||
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.setScene(new Scene(FXMLLoader.load(getClass().getResource("/fr/univ_amu/iut/loginPrompt/Code_accessa.fxml"))));
|
||||
loginWindow.show();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -24,6 +24,7 @@ public class Controller implements Initializable{
|
||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
|
||||
EventHandler<ActionEvent> handleLogin = event ->{
|
||||
// TODO Use SecretProvider
|
||||
System.out.println(password.getText());
|
||||
};
|
||||
log.setOnAction(handleLogin);
|
||||
|
@ -15,25 +15,24 @@ public class Discipline implements Serializable {
|
||||
|
||||
private static final List<Discipline> INSTANCES = new ArrayList<>();
|
||||
|
||||
|
||||
@Transient
|
||||
public static Discipline HistoireGeographie = new Discipline("Histoire-géographie");
|
||||
|
||||
@Transient
|
||||
public static Discipline PhysiqueChimie = new Discipline("Physique-chimie");
|
||||
|
||||
@Transient
|
||||
public static Discipline ScienceEtVieDeLaTerre = new Discipline("SVT");
|
||||
|
||||
@Transient
|
||||
public static Discipline Technologie = new Discipline("Technologie");
|
||||
|
||||
@Transient
|
||||
public static Discipline Francais = new Discipline("Français");
|
||||
|
||||
@Transient
|
||||
public static Discipline EconomieGestion = new Discipline("Économie Gestion");
|
||||
|
||||
@Transient
|
||||
public static Discipline LangueVivante = new Discipline("Langue Vivante");
|
||||
|
||||
@Transient
|
||||
public static Discipline Mathematiques = new Discipline("Mathématiques");
|
||||
|
||||
@Transient
|
||||
public static Discipline Philosophie = new Discipline("Philosophie");
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
int id;
|
||||
|
@ -14,44 +14,43 @@ import java.util.List;
|
||||
public class RegionAcademique implements Serializable {
|
||||
|
||||
private static List<RegionAcademique> INSTANCES = new ArrayList<>();
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique AuvergneRhoneAlpes = new RegionAcademique("Région académique Auvergne-Rhône-Alpes");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique BourgogneFrancheComte = new RegionAcademique("Région académique Bourgogne-Franche-Comté");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Bretagne = new RegionAcademique("Région académique Bretagne");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique CentreValDeLoire = new RegionAcademique("Région académique Centre-Val de Loire");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Corse = new RegionAcademique("Région académique Corse");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique GrandEst = new RegionAcademique("Région académique Grand Est");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Guadeloupe = new RegionAcademique("Région académique Guadeloupe");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Guyane = new RegionAcademique("Région académique Guyane");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique HautsDeFrance = new RegionAcademique("Région académique Hauts-de-France");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique IleDeFrance = new RegionAcademique("Région académique Île-de-France");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Martinique = new RegionAcademique("Région académique Martinique");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Normandie = new RegionAcademique("Région académique Normandie");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique NouvelleAquitaine = new RegionAcademique("Région académique Nouvelle-Aquitaine");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Occitanie = new RegionAcademique("Région académique Occitanie");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique PaysDeLaLoire = new RegionAcademique("Région académique Pays de la Loire");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique ProvenceAlpesCoteDAzur = new RegionAcademique("Région académique Provence-Alpes-Côte d'Azur");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Reunion = new RegionAcademique("Région académique La Réunion");
|
||||
|
||||
@Transient
|
||||
public static RegionAcademique Mayotte = new RegionAcademique("Région académique Mayotte");
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
int id;
|
||||
|
@ -5,8 +5,8 @@ import de.mkammerer.argon2.Argon2Factory;
|
||||
|
||||
public class LocalSecretProvider implements SecretProvider {
|
||||
|
||||
private static String ARGON_HASH = "$argon2id$v=19$m=16,t=2,p=1$Tms1dkJYWEZ5OTdJTndVTg$+iBsHiILEshy1JLZsTfZFQ";
|
||||
private static Argon2 argon2 = Argon2Factory.create(Argon2Factory.Argon2Types.ARGON2id);
|
||||
private final static String ARGON_HASH = "$argon2id$v=19$m=16,t=2,p=1$Tms1dkJYWEZ5OTdJTndVTg$+iBsHiILEshy1JLZsTfZFQ";
|
||||
private final static Argon2 argon2 = Argon2Factory.create(Argon2Factory.Argon2Types.ARGON2id);
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -36,8 +36,8 @@ public class AcademiePath extends SVGPath {
|
||||
final Properties PROPERTIES = new Properties();
|
||||
try (InputStream resourceStream = LOADER.getResourceAsStream(fileName)) {
|
||||
PROPERTIES.load(resourceStream);
|
||||
} catch (IOException exception) {
|
||||
System.out.println(Arrays.toString(exception.getStackTrace()));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return PROPERTIES;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user