Maj V1.0.5
This commit is contained in:
parent
a382e0866f
commit
46e758ede3
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
364
resources/beaucoup icones.svg
Normal file
364
resources/beaucoup icones.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 73 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 73 KiB |
BIN
resources/saveBase.png
Normal file
BIN
resources/saveBase.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -213,8 +213,13 @@ public class importInscriptionXLS {
|
||||
JOptionPane.showInternalMessageDialog(null, e.toString());
|
||||
}
|
||||
|
||||
// trie les noeuds enfant (les formations) par ordre alphabétique de le nom.
|
||||
for(noeud nfirst : commandes.nBase.getChildren()) {
|
||||
nfirst.triAlphabetiqueDesEnfants();
|
||||
}
|
||||
|
||||
//trie les noeuds enfants des formation par ordre alphabétique des noms des étudiants.
|
||||
|
||||
//trie les noeuds enfants des formations par ordre alphabétique des noms des étudiants.
|
||||
for(noeud nFormation : commandes.nBase.getFirstChild().getChildren()) {
|
||||
nFormation.triAlphabetiqueDesEnfants(commandes.nomColonneNomEtudiant);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ public class Window_demarre extends JFrame {
|
||||
frmEvalwriter.setBounds(100, 100, 765, 641);
|
||||
|
||||
//Affiche le bouton "Nouvelle version dispoinible".
|
||||
if(commandes.newVersion) frmEvalwriter.setBounds(100, 100, 789, 745);
|
||||
if(commandes.newVersion) frmEvalwriter.setBounds(100, 100, 765, 745);
|
||||
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
@ -218,13 +218,13 @@ public class Window_demarre extends JFrame {
|
||||
|
||||
btnNewVersion.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/newVersion.png")));
|
||||
btnNewVersion.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
btnNewVersion.setBounds(10, 602, 753, 63);
|
||||
btnNewVersion.setBounds(10, 602, 729, 63);
|
||||
frmEvalwriter.getContentPane().add(btnNewVersion);
|
||||
btnNewVersion.setVisible(commandes.newVersion);
|
||||
|
||||
btnHelpDownload.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
|
||||
btnHelpDownload.setForeground(Color.GRAY);
|
||||
btnHelpDownload.setBounds(10, 665, 753, 30);
|
||||
btnHelpDownload.setBounds(10, 665, 729, 30);
|
||||
frmEvalwriter.getContentPane().add(btnHelpDownload);
|
||||
|
||||
btnAideImportationInscriptionXLSX.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
|
||||
|
@ -700,6 +700,7 @@ public class Window_gestionnaire extends JFrame {
|
||||
menuBar.add(mnNewMenu);
|
||||
|
||||
JMenuItem menueSauvegardeBase = new JMenuItem("Créer une sauvegarde de la base");
|
||||
menueSauvegardeBase.setIcon(new ImageIcon(Window_gestionnaire.class.getResource("/resources/saveBase.png")));
|
||||
menueSauvegardeBase.setFont(new Font("Arial", Font.BOLD, 14));
|
||||
mnNewMenu.add(menueSauvegardeBase);
|
||||
menueSauvegardeBase.addActionListener(new ActionListener() {
|
||||
@ -1563,7 +1564,7 @@ public class Window_gestionnaire extends JFrame {
|
||||
System.out.println("Vous avez choisi Oui.");
|
||||
commandes.nBase.getChild(nomFormation).removeChild(nStudent);
|
||||
sauvegardeXMLBase.save(commandes.nBase,saveType.SANS_MESSAGE,"");
|
||||
majTable();
|
||||
majFiltres();
|
||||
} else if (userChoice == JOptionPane.NO_OPTION) {
|
||||
System.out.println("Vous avez choisi Non.");
|
||||
} else if (userChoice == JOptionPane.CANCEL_OPTION) {
|
||||
|
@ -35,7 +35,7 @@ public class CreateUpdateZipArchive {
|
||||
int numFilesInArchive = countFilesInArchive(archiveFilePath);
|
||||
|
||||
// Si l'archive contient déjà 5 fichiers, supprimer le plus ancien
|
||||
if (numFilesInArchive >= 300) {
|
||||
if (numFilesInArchive >= commandes.nombreMaxSauvegardeArchive) {
|
||||
removeOldestFileFromArchive(archiveFilePath);
|
||||
}
|
||||
|
||||
|
@ -69,4 +69,8 @@ public class commandes {
|
||||
|
||||
// nombre d'image d'acceuil
|
||||
public static int nombreImage = 34;
|
||||
|
||||
// nombre maximal de fichier dans l'archive
|
||||
public static int nombreMaxSauvegardeArchive = 300;
|
||||
|
||||
}
|
||||
|
@ -1097,7 +1097,10 @@ public class noeud implements Cloneable{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Trie par ordre alphabétique les noeuds en indiquant le nom de l'attribut qu'il doit trier.
|
||||
* @param nameAttribut
|
||||
*/
|
||||
public void triAlphabetiqueDesEnfants(String nameAttribut) {
|
||||
Map<noeud, String> listeChild = new HashMap<noeud, String>();
|
||||
for(noeud child : children) {
|
||||
@ -1117,10 +1120,33 @@ public class noeud implements Cloneable{
|
||||
for(Entry<noeud,String> child : entryList) {
|
||||
this.children.add(child.getKey());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Trie par ordre alphabétique les noeuds par le nom du noeud.
|
||||
*/
|
||||
public void triAlphabetiqueDesEnfants() {
|
||||
Map<noeud, String> listeChild = new HashMap<noeud, String>();
|
||||
for(noeud child : children) {
|
||||
if(child!=null) {
|
||||
listeChild.put(child, child.getName());
|
||||
}
|
||||
}
|
||||
// Obtenir les entrées du dictionnaire sous forme de liste
|
||||
List<Map.Entry<noeud, String>> entryList = new ArrayList<>(listeChild.entrySet());
|
||||
|
||||
// Trier la liste d'entrées par ordre croissant des valeurs
|
||||
Collections.sort(entryList, Comparator.comparing(Map.Entry::getValue));
|
||||
|
||||
//supprime tous les enfants du noeud
|
||||
this.children.clear();
|
||||
|
||||
for(Entry<noeud,String> child : entryList) {
|
||||
this.children.add(child.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Mise à toujours de tous les styles des cellules en compétant par le style par défaut;<br>
|
||||
|
BIN
src/resources/saveBase.png
Normal file
BIN
src/resources/saveBase.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Loading…
Reference in New Issue
Block a user