MAJ V4.5.0

This commit is contained in:
pablo rodriguez 2024-06-21 16:50:08 +02:00
parent 3328e17d78
commit 57b0e8db6e
16 changed files with 856 additions and 6739 deletions

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -1 +1,2 @@
/analyseWriter/
/resources/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 82 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 82 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -80,7 +80,6 @@ public class commandes {
public static String contenuFichierSVG =""; // Le nouveau logo
public static String path ="";
public static String pathDestination =""; //Pour le mode console uniquement
public static String nomDeLaBranch = "Origin"; //Branche de développement
public static String Command =""; //récupère le texte de la commande dans la console
public static String os = System.getProperty("os.name");

View File

@ -16,8 +16,10 @@ import javax.swing.SwingUtilities;
import analyseWriter.MEPTL.commandes;
import analyseWriter.fenetres.baseDonneesEvaluations;
import analyseWriter.fenetres.baseDonneesListesEtudiants;
import analyseWriter.fenetres.create;
import analyseWriter.fenetres.evaluate;
import analyseWriter.fenetres.mainApp;
public class actExit extends AbstractAction {
@ -29,7 +31,6 @@ public class actExit extends AbstractAction {
putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
}
/**
* Fermeture de l'application analyseWriter.
@ -83,9 +84,11 @@ public class actExit extends AbstractAction {
// Actions des boutons
buttonYes.addActionListener((ActionEvent evt) -> {
baseDonneesListesEtudiants.ferme(false);
baseDonneesEvaluations.ferme();
create.fermeCreate();
evaluate.ferme();
mainApp.ferme();
dialog.dispose();
System.exit(0); // Fermer l'application
});
@ -141,17 +144,17 @@ public class actExit extends AbstractAction {
dialog.setSize(dialogWidth, dialogHeight);
dialog.setResizable(false);
dialog.setLocationRelativeTo(null); // Pour centrer la boîte de dialogue à l'écran
// Définir le bouton par défaut
dialog.getRootPane().setDefaultButton(buttonSave);
// Actions des boutons
buttonYes.addActionListener((ActionEvent evt) -> {
baseDonneesListesEtudiants.ferme(false);
baseDonneesEvaluations.ferme();
create.fermeCreate();
evaluate.ferme();
mainApp.ferme();
dialog.dispose();
System.exit(0); // Fermer l'application
});

View File

@ -42,7 +42,7 @@ public final class about extends JFrame {
setResizable(false);
setTitle(commandes.Titre);
setLocation(100, 100);
setSize(518,415);
setSize(530,415);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
@ -63,35 +63,35 @@ public final class about extends JFrame {
lblNewLabelTitre.setIcon(img2);
lblNewLabelTitre.setHorizontalAlignment(SwingConstants.LEFT);
lblNewLabelTitre.setFont(new Font("Pacifico", Font.PLAIN, 26));
lblNewLabelTitre.setBounds(0, 0, 502, 100);
lblNewLabelTitre.setBounds(0, 0, 514, 126);
contentPane.add(lblNewLabelTitre);
JLabel lblNewLabelVersion = new JLabel("<HTML><B><U>Version :</U></B> " + commandes.version + " "+ commandes.nomDeLaBranch + "</HTML>");
JLabel lblNewLabelVersion = new JLabel("<HTML><B><U>Version :</U></B> " + commandes.version + " "+ commandes.branch + "</HTML>");
lblNewLabelVersion.setFont(new Font("Tahoma", Font.PLAIN, 16));
lblNewLabelVersion.setBounds(20, 120, 240, 20);
lblNewLabelVersion.setBounds(20, 145, 240, 20);
contentPane.add(lblNewLabelVersion);
JLabel lblNewLabelAnnee = new JLabel("<HTML><B><U>Année :</U></B> " + commandes.Annee + "</HTML>");
lblNewLabelAnnee.setFont(new Font("Tahoma", Font.PLAIN, 16));
lblNewLabelAnnee.setBounds(20, 142, 240, 20);
lblNewLabelAnnee.setBounds(20, 163, 240, 20);
contentPane.add(lblNewLabelAnnee);
JLabel lblCredit = new JLabel("<HTML><U>Crédit</U></HTML>");
lblCredit.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
lblCredit.setBounds(20, 260, 112, 20);
lblCredit.setBounds(20, 287, 112, 20);
getContentPane().add(lblCredit);
JLabel lblNewLabelAuteur = new JLabel("Auteur développeur : Pablo Rodriguez");
JLabel lblNewLabelAuteur = new JLabel("Pablo Rodriguez");
lblNewLabelAuteur.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblNewLabelAuteur.setBounds(20, 282, 250, 20);
lblNewLabelAuteur.setBounds(20, 310, 250, 20);
contentPane.add(lblNewLabelAuteur);
JLabel lblCommentaire = new JLabel("<HTML>Outil permettant lévaluation des fichiers réalisés par des étudiants avec un traitement de texte au format ODF.</html>");
lblCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblCommentaire.setHorizontalAlignment(SwingConstants.LEFT);
lblCommentaire.setVerticalAlignment(SwingConstants.TOP);
lblCommentaire.setBounds(20, 199, 472, 72);
lblCommentaire.setBounds(20, 230, 472, 46);
getContentPane().add(lblCommentaire);
JLabel lblLicence = new JLabel("<HTML><B><U>Licence : GNU GLP 3.0</U></B> </HTML>");
@ -116,7 +116,7 @@ public final class about extends JFrame {
}
});
btnNewButton.setBounds(270, 111, 222, 72);
btnNewButton.setBounds(270, 146, 222, 72);
getContentPane().add(btnNewButton);
JLabel lblGPL3 = new JLabel("");

View File

@ -233,6 +233,19 @@ public class baseDonneesListesEtudiants extends JFrame{
}
/**
* Si ReturnEvaluate alors recharge une nouvelle fois la fenêtre evaluate.
* @param returnEvaluate
*/
public static void ferme(boolean returnEvaluate) {
if(!isDispose) {
isDispose=true;
instance.dispose();
if(returnEvaluate) evaluate.getInstance();
}
}
private void ListenerAction() {
/**
@ -252,9 +265,7 @@ public class baseDonneesListesEtudiants extends JFrame{
*/
btnFermer.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
evaluate.getInstance();
isDispose=true;
dispose();
ferme(true);
}
});

View File

@ -19,32 +19,41 @@ import javax.swing.UIManager;
import analyseWriter.MEPTL.commandes;
import analyseWriter.OnLineVersions.verificationNewVersion;
import analyseWriter.action.actAbout;
import analyseWriter.action.actExit;
import analyseWriter.baseEvaluations.CreerBaseParDefautEvaluation;
import analyseWriter.baseEvaluations.recupeNodeBaseEvaluations;
import analyseWriter.baseEvaluations.validatorBaseEvaluation;
import analyseWriter.baseListesEtudiants.CreerBaseParDefautListesEtudiants;
public class mainApp extends JFrame implements ActionListener{
public final class mainApp extends JFrame {
private static final long serialVersionUID = 1L;
private JFrame frmEvalwriter;
JButton btnCreate;
JButton actCharge;
private static JButton btnCreate;
private static JButton actCharge;
public static boolean isDispose = true;
private static mainApp instance;
/**
* Launch the application.
*/
public static void main(String[] args) {
try {
mainApp window = new mainApp();
System.out.println("Système = " + commandes.os);
window.frmEvalwriter.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
getInstance();
// try {
//
// if (isDispose) {
// mainApp window = new mainApp();
// System.out.println("Système = " + commandes.os);
// window.setVisible(true);
// isDispose=false;
// }
//
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
/**
@ -54,6 +63,23 @@ public class mainApp extends JFrame implements ActionListener{
public mainApp() {
initialize();
}
public static mainApp getInstance() {
if (isDispose) {
instance = new mainApp();
}
instance.setVisible(true);
isDispose=false;
return instance;
}
public static void ferme() {
if(!isDispose) {
isDispose=true;
instance.dispose();
}
}
/**
* Initialize the contents of the frame.
@ -95,28 +121,28 @@ public class mainApp extends JFrame implements ActionListener{
frmEvalwriter = new JFrame();
frmEvalwriter.setResizable(false);
frmEvalwriter.setBounds(100, 100, 530, 391);
// frmEvalwriter = new JFrame();
setResizable(false);
setBounds(100, 100, 530, 420);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
frmEvalwriter.setLocation(( (screenWidth) - frmEvalwriter.getWidth()) / 2, (screenHeight - frmEvalwriter.getHeight()) / 2);
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frmEvalwriter.getContentPane().setLayout(null);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
getContentPane().setLayout(null);
ImageIcon img = new ImageIcon(getClass().getResource("/resources/evalwriter.png") );
frmEvalwriter.setIconImage(img.getImage());
setIconImage(img.getImage());
btnCreate = new JButton("Créer ou modifier un fichier d'analyse");
btnCreate.setToolTipText("<html>Création et/ou modification d'un fichier d'analyse d'une évaluation.</html>");
btnCreate.setHorizontalAlignment(SwingConstants.LEFT);
btnCreate.setIcon(new ImageIcon(mainApp.class.getResource("/resources/fichierAnalyseModif.png")));
btnCreate.setFont(new Font("Arial", Font.BOLD, 16));
btnCreate.addActionListener(this);
// btnCreate.addActionListener(this);
btnCreate.setBounds(10, 191, 494, 60);
frmEvalwriter.getContentPane().add(btnCreate);
btnCreate.setBounds(10, 208, 494, 60);
getContentPane().add(btnCreate);
actCharge = new JButton("Evaluer les fichiers des étudiants");
actCharge.setToolTipText("<html>Chargement d'une évaluation présente dans la base<br>pour réaliser l'évaluation des fichiers des étudiants.</html>");
@ -125,8 +151,8 @@ public class mainApp extends JFrame implements ActionListener{
actCharge.setIcon(new ImageIcon(mainApp.class.getResource("/resources/evaluate.png")));
actCharge.setBackground(SystemColor.inactiveCaption);
actCharge.setFont(new Font("Arial", Font.BOLD, 16));
actCharge.setBounds(10, 120, 494, 60);
frmEvalwriter.getContentPane().add(actCharge);
actCharge.setBounds(10, 137, 494, 60);
getContentPane().add(actCharge);
if(LaBaseEvaluationsExiste) {
actCharge.setEnabled(!validatorBaseEvaluation.isVide());
}else {
@ -142,8 +168,8 @@ public class mainApp extends JFrame implements ActionListener{
lblNewLabel.setIcon(img2);
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
lblNewLabel.setBounds(0, 0, 514, 111);
frmEvalwriter.getContentPane().add(lblNewLabel);
lblNewLabel.setBounds(0, 0, 514, 126);
getContentPane().add(lblNewLabel);
JButton btnNewButton = new JButton(new actAbout());
btnNewButton.setText("Verif. version");
@ -151,8 +177,8 @@ public class mainApp extends JFrame implements ActionListener{
btnNewButton.setHorizontalAlignment(SwingConstants.LEFT);
btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14));
btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
btnNewButton.setBounds(10, 262, 240, 60);
frmEvalwriter.getContentPane().add(btnNewButton);
btnNewButton.setBounds(10, 279, 242, 60);
getContentPane().add(btnNewButton);
JButton btnTutoriels = new JButton();
btnTutoriels.setText("Documentation");
@ -172,35 +198,44 @@ public class mainApp extends JFrame implements ActionListener{
btnTutoriels.setIcon(new ImageIcon(mainApp.class.getResource("/resources/documentation.png")));
btnTutoriels.setHorizontalAlignment(SwingConstants.LEFT);
btnTutoriels.setFont(new Font("Arial", Font.PLAIN, 14));
btnTutoriels.setBounds(260, 262, 240, 60);
frmEvalwriter.getContentPane().add(btnTutoriels);
btnTutoriels.setBounds(262, 279, 242, 60);
getContentPane().add(btnTutoriels);
JLabel lblpath = new JLabel(Paths.get("").toAbsolutePath().toString());
lblpath.setFont(new Font("Tahoma", Font.PLAIN, 9));
lblpath.setBounds(10, 322, 494, 30);
frmEvalwriter.getContentPane().add(lblpath);
lblpath.setBounds(10, 340, 494, 30);
getContentPane().add(lblpath);
actCharge.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new recupeNodeBaseEvaluations();
if(commandes.evaluationsBase!=null) {
new chargeBaseAuDemarrage();
frmEvalwriter.dispose();
dispose();
}else {
evaluate.getInstance();
frmEvalwriter.dispose();
dispose();
}
}
});
frmEvalwriter.setTitle(commandes.Titre + " " + commandes.version + " " + commandes.branch);
btnCreate.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
create.getInstance();
dispose();
}
});
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
new actExit().actionPerformed(null);
}
});
setTitle(commandes.Titre + " " + commandes.version + " " + commandes.branch);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btnCreate) {
create.getInstance();
frmEvalwriter.dispose();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 82 KiB