Maj V1.0.4

This commit is contained in:
pablo rodriguez 2023-07-10 12:46:26 +02:00
parent 87a66cde63
commit 4e589bd57d
41 changed files with 75 additions and 8049 deletions

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

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 689 KiB

After

Width:  |  Height:  |  Size: 689 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

BIN
resources/Sans titre_1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
resources/Sans titre_10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
resources/Sans titre_11.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
resources/Sans titre_12.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
resources/Sans titre_13.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
resources/Sans titre_14.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
resources/Sans titre_15.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
resources/Sans titre_16.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
resources/Sans titre_17.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
resources/Sans titre_18.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
resources/Sans titre_19.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

BIN
resources/Sans titre_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
resources/Sans titre_20.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 KiB

BIN
resources/Sans titre_3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

BIN
resources/Sans titre_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

BIN
resources/Sans titre_4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

BIN
resources/Sans titre_5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
resources/Sans titre_6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

BIN
resources/Sans titre_7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
resources/Sans titre_8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
resources/Sans titre_9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
resources/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
resources/logo_maxmax.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -76,7 +76,7 @@ public class importInscriptionXLS {
if(cell.getStringCellValue().equals("Individu - Nom")) nomPresent=true;
if(cell.getStringCellValue().equals("Individu - Prénom")) prenomPresent=true;
if(cell.getStringCellValue().equals("Individu - Code Etudiant")) codePresent=true;
if(cell.getStringCellValue().equals("IAE - Etape (lib.)")) formationPresent=true;
if(cell.getStringCellValue().equals("IAE - Version d'étape (lib. web)")) formationPresent=true;
if(cell.getStringCellValue().equals("Profil étudiant (lib.)")) profilPresent=true;
if(cell.getStringCellValue().equals("Bac ou équivalence (lib.)")) bacPresent=true;
if(cell.getStringCellValue().equals("Individu - Email personnel")) mailpersoPresent=true;
@ -116,8 +116,8 @@ public class importInscriptionXLS {
// Création ou insertion des informations récupéré dans le HashMap Student;
if(Student.get("IAE - Etape (lib.)")!=null) {
String nameFormation = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(Student.get("IAE - Etape (lib.)"));
if(Student.get("IAE - Version d'étape (lib. web)")!=null) {
String nameFormation = supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(Student.get("IAE - Version d'étape (lib. web)"));
noeud nFormation = null;
// récupère le noeud formation ou bien création du noeud formation
@ -156,7 +156,7 @@ public class importInscriptionXLS {
if(entry.getKey().equals("Individu - Nom")
|| entry.getKey().equals("Individu - Prénom")
|| entry.getKey().equals("Individu - Code Etudiant")
|| entry.getKey().equals("IAE - Etape (lib.)")
|| entry.getKey().equals("IAE - Version d'étape (lib. web)")
|| entry.getKey().equals("Profil étudiant (lib.)")
|| entry.getKey().equals("Bac ou équivalence (lib.)")
|| entry.getKey().equals("Individu - Email personnel")

View File

@ -26,6 +26,8 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import org.apache.poi.sl.draw.binding.CTPresetTextShape;
import Inscriptions.importInscriptionCSV;
import Inscriptions.importInscriptionXLS;
import base.CreateUpdateZipArchive;
@ -44,7 +46,7 @@ public class Window_demarre extends JFrame {
*
*/
private static final long serialVersionUID = 1L;
private JFrame frmEvalwriter;
private static JFrame frmEvalwriter;
JButton btnExporterTouteLaBase;
JButton actImporterInscriptionDepuisCSV;
@ -55,7 +57,8 @@ public class Window_demarre extends JFrame {
JButton btnMiseAJourDepuisClasseur = new JButton("<html>Mise à jour de la base depuis<br>un classeur Ms Excel</html>");
JButton btnGestionnaire = new JButton("");
JButton btnimporterDesInscriptionsdepuisClasseur = new JButton("<html>Importer des inscriptions<br>depuis un classeur Ms Excel</html>");
static JLabel lblAuteurVersion = new JLabel("<html>Pablo Rodriguez - 2023<br>Version "+ commandes.version+"</html>");
static JLabel lblFondImage = new JLabel();
/**
* Launch the application.
@ -84,11 +87,11 @@ public class Window_demarre extends JFrame {
return;
}
Window_demarre window = new Window_demarre();
new Window_demarre();
//Affichage de la fenêtre
window.frmEvalwriter.setVisible(true);
Window_demarre.frmEvalwriter.setVisible(true);
// Créez un Timer
@ -103,11 +106,12 @@ public class Window_demarre extends JFrame {
sauvegardeXMLBase.saveSauvegarde(commandes.nBase);
CreateUpdateZipArchive.save();
}
affichageImageDeFond();
}
};
// Planification de la tâche de sauvegarde automatique à exécuter toutes les 10 minutes 5 * 60 * 1000
timer.schedule(autoSaveTask, 0, 600000);
// Planification de la tâche de sauvegarde automatique à exécuter toutes les 5 minutes 5 * 60 * 1000
timer.schedule(autoSaveTask, 0, 300000);
if(!commandes.messageAlerte.isEmpty()) {
@ -132,7 +136,7 @@ public class Window_demarre extends JFrame {
frmEvalwriter.setTitle("Gestion des inscriptions et des groupes - langues - informatique - stage - rentrée");
frmEvalwriter.setBounds(100, 100, 789, 638);
frmEvalwriter.setBounds(100, 100, 789, 636);
if(commandes.newVersion) {
frmEvalwriter.setBounds(100, 100, 789, 745);
}
@ -153,7 +157,7 @@ public class Window_demarre extends JFrame {
btnExporterTouteLaBase.setHorizontalAlignment(SwingConstants.LEFT);
btnExporterTouteLaBase.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/exportbasetoexcel.png")));
btnExporterTouteLaBase.setFont(new Font("Arial", Font.BOLD, 16));
btnExporterTouteLaBase.setBounds(10, 416, 377, 78);
btnExporterTouteLaBase.setBounds(22, 724, 377, 78);
frmEvalwriter.getContentPane().add(btnExporterTouteLaBase);
@ -161,7 +165,7 @@ public class Window_demarre extends JFrame {
actImporterInscriptionDepuisCSV.setHorizontalAlignment(SwingConstants.LEFT);
actImporterInscriptionDepuisCSV.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/importationcsv.png")));
actImporterInscriptionDepuisCSV.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
actImporterInscriptionDepuisCSV.setBounds(10, 323, 377, 60);
actImporterInscriptionDepuisCSV.setBounds(409, 721, 377, 60);
actImporterInscriptionDepuisCSV.setForeground(Color.DARK_GRAY);
frmEvalwriter.getContentPane().add(actImporterInscriptionDepuisCSV);
@ -176,19 +180,19 @@ public class Window_demarre extends JFrame {
btnMiseAJourDepuisClasseur.setHorizontalAlignment(SwingConstants.LEFT);
btnMiseAJourDepuisClasseur.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/majInscriptionToBase.png")));
btnMiseAJourDepuisClasseur.setFont(new Font("Arial", Font.BOLD, 16));
btnMiseAJourDepuisClasseur.setBounds(10, 502, 377, 60);
btnMiseAJourDepuisClasseur.setBounds(10, 428, 377, 134);
frmEvalwriter.getContentPane().add(btnMiseAJourDepuisClasseur);
btnGestionnaire.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/gestionnaire_bouton.png")));
btnGestionnaire.setFont(new Font("Arial", Font.BOLD, 16));
btnGestionnaire.setBounds(397, 416, 366, 175);
btnGestionnaire.setBounds(397, 328, 366, 263);
frmEvalwriter.getContentPane().add(btnGestionnaire);
btnimporterDesInscriptionsdepuisClasseur.setHorizontalAlignment(SwingConstants.LEFT);
btnimporterDesInscriptionsdepuisClasseur.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/bouton_inscription_excel.png")));
btnimporterDesInscriptionsdepuisClasseur.setFont(new Font("Arial", Font.BOLD, 16));
btnimporterDesInscriptionsdepuisClasseur.setBounds(397, 323, 366, 60);
btnimporterDesInscriptionsdepuisClasseur.setBounds(10, 328, 377, 60);
frmEvalwriter.getContentPane().add(btnimporterDesInscriptionsdepuisClasseur);
btnNAideMiseAJour.setForeground(Color.GRAY);
@ -196,36 +200,20 @@ public class Window_demarre extends JFrame {
btnNAideMiseAJour.setBounds(10, 561, 377, 30);
frmEvalwriter.getContentPane().add(btnNAideMiseAJour);
// Générer un nombre aléatoire entre 1 et 4 inclusivement
Random random = new Random();
int randomNumber = random.nextInt(16) + 1;
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
// imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_16.jpg"));
Image image = imageIcon.getImage();
// Détermination de la taille souhaitée pour l'image
int newWidth = frmEvalwriter.getWidth();
int newHeight = frmEvalwriter.getHeight()-260;
// Redimensionnement de l'image pour qu'elle s'adapte à la taille souhaitée
Image resizedImage = image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);
JLabel lblAuteurVersion = new JLabel("<html>Pablo Rodriguez - 2023<br>Version "+ commandes.version+"</html>");
lblAuteurVersion.setVerticalAlignment(SwingConstants.TOP);
lblAuteurVersion.setHorizontalAlignment(SwingConstants.LEFT);
lblAuteurVersion.setFont(new Font("Tahoma", Font.BOLD, 16));
lblAuteurVersion.setForeground(new Color(255, 255, 255));
lblAuteurVersion.setBounds(22, 11, 307, 55);
frmEvalwriter.getContentPane().add(lblAuteurVersion);
if(randomNumber==3 || randomNumber==4 || randomNumber==7
|| randomNumber==10 || randomNumber==11 || randomNumber==12
|| randomNumber==14 || randomNumber==15) lblAuteurVersion.setForeground(new Color(0, 0, 0));
JLabel lblFondImage= new JLabel(new ImageIcon(resizedImage));
lblFondImage.setVerticalAlignment(SwingConstants.BOTTOM);
lblFondImage.setBounds(10, 0, 753, 317);
frmEvalwriter.getContentPane().add(lblFondImage);
affichageImageDeFond();
btnNewVersion.setIcon(new ImageIcon(Window_demarre.class.getResource("/resources/newVersion.png")));
btnNewVersion.setFont(new Font("Tahoma", Font.BOLD, 16));
@ -240,13 +228,13 @@ public class Window_demarre extends JFrame {
btnAideImportationInscriptionXLSX.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
btnAideImportationInscriptionXLSX.setBounds(397, 381, 366, 30);
btnAideImportationInscriptionXLSX.setBounds(10, 387, 377, 30);
frmEvalwriter.getContentPane().add(btnAideImportationInscriptionXLSX);
btnAideImportationInscriptionXLSX.setForeground(Color.GRAY);
JButton btnAideImportationInscriptionCSV = new JButton("Aide à l'importation des inscriptions depuis fichier CSV");
btnAideImportationInscriptionCSV.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 12));
btnAideImportationInscriptionCSV.setBounds(10, 381, 377, 30);
btnAideImportationInscriptionCSV.setBounds(409, 762, 377, 30);
frmEvalwriter.getContentPane().add(btnAideImportationInscriptionCSV);
btnAideImportationInscriptionCSV.setForeground(Color.GRAY);
@ -394,4 +382,30 @@ public class Window_demarre extends JFrame {
JOptionPane.showMessageDialog(null, panel, "Erreur", JOptionPane.ERROR_MESSAGE);
}
}
private static void affichageImageDeFond() {
Random random = new Random();
int randomNumber = random.nextInt(20) + 1;
ImageIcon imageIcon = new ImageIcon(Window_demarre.class.getResource("/resources/Sans titre_"+ String.valueOf(randomNumber) +".jpg"));
Image image = imageIcon.getImage();
// Détermination de la taille souhaitée pour l'image
int newWidth = frmEvalwriter.getWidth();
int newHeight = frmEvalwriter.getHeight()-260;
// Redimensionnement de l'image pour qu'elle s'adapte à la taille souhaitée
Image resizedImage = image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);
if(randomNumber==3 || randomNumber==4 || randomNumber==7
|| randomNumber==10 || randomNumber==11 || randomNumber==12
|| randomNumber==14 || randomNumber==15 || randomNumber==18) {
lblAuteurVersion.setForeground(new Color(0, 0, 0));
}else {
lblAuteurVersion.setForeground(new Color(255, 255, 255));
}
lblFondImage.setIcon(new ImageIcon(resizedImage));
}
}

View File

@ -173,7 +173,7 @@ public class Window_gestionnaire extends JFrame {
panelFiltre.setBackground(Color.gray);
GridBagLayout gbl_panelFiltre = new GridBagLayout();
gbl_panelFiltre.columnWidths = new int[] {300, 160, 160, 160, 160, 160, 160, 160, 30, 160, 160};
gbl_panelFiltre.columnWidths = new int[] {220, 160, 160, 160, 160, 160, 160, 160, 30, 160, 160};
gbl_panelFiltre.rowHeights = new int[] {14, 32, 14, 32, 2};
gbl_panelFiltre.columnWeights = new double[]{0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
gbl_panelFiltre.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0};

View File

@ -39,8 +39,9 @@ public class exportTable extends AbstractAction{
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
instance.majTable();
// instance.majTable();
this.nTable = instance.nTable;
System.out.println(nTable.toWrite());
if(nTable!=null) {
exportBaseToExcel.exportTable(nTable, exportType.TABLE);
}else {

View File

@ -101,10 +101,11 @@ public class CreateCalcWorkbook extends JFrame{
for (int i = 0; i < rows; i++) {
publish(i);
String nameFormation = (String) data[i][0];
String nameFormation = new String((String) data[i][0]);
String[][] data1 = (String[][]) data[i][columns-1];
Sheet sheet = workbook.createSheet(nameFormation);
String nomFeuille = new String(nameFormation);
Sheet sheet = workbook.createSheet(nomFeuille);
//Entête de la première ligne
Row row1 = sheet.createRow(0);
@ -153,6 +154,7 @@ public class CreateCalcWorkbook extends JFrame{
System.out.println(e.toString());
JOptionPane.showMessageDialog(null, e.toString(), "Erreur dans la class CreateCalcWorkbook", JOptionPane.ERROR_MESSAGE);
}
return null;
}

View File

@ -35,7 +35,7 @@ public class exportBaseToExcel {
data[indexFormation][0] = formation.getName();
data[indexFormation][0] = formation.getFirstChild().getAttributes("IAE_-_Version_detape_lib._web");
data[indexFormation][1] = "Formation";
data[indexFormation][2] = "Individu_-_Code_Etudiant";
data[indexFormation][3] = "Individu_-_Prenom";
@ -69,7 +69,7 @@ public class exportBaseToExcel {
int indexStudent = 0;
for(noeud nStudent : formation.getChildren()) {
data1[indexStudent][0] = formation.getName();
data1[indexStudent][0] = nStudent.getAttributes("IAE_-_Version_detape_lib._web");;
data1[indexStudent][1] = nStudent.getAttributes("Individu_-_Code_Etudiant");
data1[indexStudent][2] = nStudent.getAttributes("Individu_-_Prenom");
data1[indexStudent][3] = nStudent.getAttributes("Individu_-_Nom");
@ -143,10 +143,10 @@ public class exportBaseToExcel {
Object[][] data = new Object[1][30];
String formation = nTable.getFirstChild().getAttributes("IAE_-_Etape_lib.");
String formation = nTable.getFirstChild().getAttributes("IAE_-_Version_detape_lib._web");
data[0][0] = nTable.getFirstChild().getAttributes("IAE_-_Etape_lib.");
data[0][0] = nTable.getFirstChild().getAttributes("IAE_-_Version_detape_lib._web");
data[0][1] = "Formation";
data[0][2] = "Individu_-_Code_Etudiant";
data[0][3] = "Individu_-_Prenom";
@ -181,7 +181,7 @@ public class exportBaseToExcel {
int indexStudent = 0;
for(noeud nStudent : nTable.getChildren()) {
data1[indexStudent][0] = nStudent.getAttributes("IAE_-_Etape_lib.");;
data1[indexStudent][0] = nStudent.getAttributes("IAE_-_Version_detape_lib._web");;
data1[indexStudent][1] = nStudent.getAttributes("Individu_-_Code_Etudiant");
data1[indexStudent][2] = nStudent.getAttributes("Individu_-_Prenom");
data1[indexStudent][3] = nStudent.getAttributes("Individu_-_Nom");

View File

@ -84,9 +84,14 @@ public class importAllBaseToExcel {
noeud nStudent = null;
// Colonne formation doit être la première colonne
if(row.getCell(indexColonneFormation).getCellType() == CellType.STRING) {
if(row.getCell(indexColonneFormation)!=null) {
if(row.getCell(indexColonneFormation).getCellType() == CellType.STRING) {
nBF = nYear.getChild(supprimeCaracatresSpeciaux.TousLesCaracatresSpeciaux(row.getCell(indexColonneFormation).getStringCellValue()));
}
}else {
continue;
}
if(nBF!=null) {
if (row.getCell(indexColonneCode).getCellType() == CellType.NUMERIC) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 KiB