liste) {
- StringBuilder text = new StringBuilder();
- NumberFormat f = new DecimalFormat("##.00");
- text.append(baliseStyle.balise());
- text.append("INFORMATIONS ");
- Double NbrPointDansExercice = 0.0;
-
- for(int i = 0 ; i < liste.size(); i++) {
- String[] A = liste.get(i).split(" ");
-
- double NbrPointApresPonderation = 0.0;
- int NbrPointBrut = 0;
- NbrPointBrut = Integer.valueOf(A[1]);
- NbrPointApresPonderation = NbrPointBrut*Double.valueOf(A[2]);
-
- NbrPointDansExercice = NbrPointDansExercice + NbrPointApresPonderation;
-
- if(NbrPointBrut>0) {
- text.append("Dans le nodeAC "+ A[0] + " . "
- + "Le nombre de point brut est de " + A[1] + " "
- + "Le poids est de " + A[2]+ " soit un total de " + f.format(NbrPointApresPonderation) + "
");
- }
-
- }
- text.append(" ");
- text.append("Le nombre de point total dans l'exercice est de : " + f.format(NbrPointDansExercice) + " ");
- setContentType("text/html");
- setText(""+text.toString()+"");
-
- }
-
- /**
- * Affiche le chargement du fichier d'analyse
- */
- public void afficheChargementFichierAnalyse(){
-
-
- StringBuilder text = new StringBuilder();
- text.append(baliseStyle.balise());
- text.append("INFORMATIONS ");
- text.append("Le titre de l'exercice est : " + calc.commandes.analyse_titre+" ");
- text.append("Le sujet (metaSujet) est : " + calc.commandes.analyse_metaSujet+"
");
- text.append("L'auteur de l'exercice est : " + calc.commandes.analyse_auteur+"
");
- if(calc.commandes.analyse_baremeABC==true) {
- text.append("La notation est sous la forme d'une note alphabétique ABCDE .
");
- text.append("La progression est de " + String.valueOf(calc.commandes.analyse_progression)+ "
");
- calcul.calculIntervalleBaremeABCDE C = new calculIntervalleBaremeABCDE(calc.commandes.analyse_progression);
- text.append("" + C.getMessageLigne() + "
");
- }else {
- text.append("La notation est sous la forme d'une note numérique .
");
- text.append("Le barème est sur " + String.valueOf(calc.commandes.analyse_bareme)+ "
");
- text.append("La progression est de " + String.valueOf(calc.commandes.analyse_progression) + "
");
- calculNotesProgression C = new calculNotesProgression(calc.commandes.analyse_progression, calc.commandes.analyse_bareme);
- text.append("" + C.getMessageLigne() + "
");
- }
- text.append(" ");
- text.append("Le nom du fichier : " + calc.commandes.analysis_filename + "
");
- text.append("Le hash de l'évaluation est : " + calc.commandes.hash + "
");
- text.append(" ");
- text.append("Historiques des modifications present : " + calc.commandes.analyse_historiquePresent + "
");
- text.append(" ");
- text.append("Verification de la presence metaSujet : " + calc.commandes.analyse_presenceMetaSujet + "
");
- text.append(" ");
- text.append("Contrôle la date de céation : " + calc.commandes.analyse_controleDateCreation+ "
");
- text.append(" ");
- text.append("Contrôle l'auteur initial du fichier : " + calc.commandes.analyse_controle_Initial_Creator + "
");
- text.append(" ");
- text.append("Dossier de l'analyse contenant les fichiers des étudiants :
");
- text.append(""+calc.commandes.path+"
");
- text.append(" ");
- text.append("Fichier d'analyse :
");
- text.append(""+calc.commandes.PathFilenameAnalysis+"
");
-
-
- setContentType("text/html");
- setText(text.toString());
- }
-
-}
-
-
-
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/allContent.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/allContent.java
deleted file mode 100644
index 3f11d19..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/allContent.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package fenetres;
-
-
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-import javax.swing.border.EmptyBorder;
-
-import nodeAC.nodeAC;
-
-public class allContent extends JFrame {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private JPanel contentPane;
- private JTextField textFieldPoint;
- private JLabel lblExplication;
- nodeAC nod;
- afficheText J;
- JComboBox comboBoxValeur;
- String valeur="strict";
- int point=0;
-
-
- /**
- * Create the frame.
- */
- public allContent(nodeAC nod, afficheText J) {
- this.nod=nod;
- this.J=J;
-
-
- if(nod.getAttributs().get("allContent")!=null) {
- String value = nod.getAttributs().get("allContent");
- if(value.contains("strictSansEspace")) { value=value.replace("strictSansEspace", "");valeur="strictSansEspace";}
- if(value.contains("strict")) {value=value.replace("strict", "");valeur="strict";}
- if(value.contains("environ")) {value=value.replace("environ", "");valeur="environ";}
-
- point = Integer.valueOf(value);
- }
-
- setResizable(false);
- setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- setBounds(100, 100, 556, 326);
-
- setTitle("allContent");
- ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
- 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);
-
- setTitle("allContent" + calc.commandes.Titre + " " + calc.commandes.version + " " + calc.commandes.branch);
- setIconImage(img.getImage());
-
-
-
-
- contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- setContentPane(contentPane);
- contentPane.setLayout(null);
-
- JButton btnNewButton = new JButton("Valide");
- btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 12));
- btnNewButton.setBounds(394, 237, 121, 39);
- contentPane.add(btnNewButton);
-
- JLabel lblValeurDeLattribut = new JLabel("Type d'évaluation");
- lblValeurDeLattribut.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lblValeurDeLattribut.setBounds(10, 105, 130, 23);
- contentPane.add(lblValeurDeLattribut);
-
- JLabel lblDescription = new JLabel("Cet attribut permet d'évaluer le contenu du nodeAC et de celui des nodes enfants de ce nodeAC. "
- + "Par conséquent, tous les nodes enfants seront évalués.");
- lblDescription.setLabelFor(this);
- lblDescription.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lblDescription.setBounds(10, 11, 520, 50);
- contentPane.add(lblDescription);
-
- comboBoxValeur = new JComboBox();
- comboBoxValeur.setModel(new DefaultComboBoxModel(new String[] {"strict", "strictSansEspace", "environ"}));
- comboBoxValeur.setSelectedItem(valeur);
- comboBoxValeur.setBounds(150, 106, 130, 22);
- contentPane.add(comboBoxValeur);
-
- JLabel lblPoint = new JLabel("Combien de point?");
- lblPoint.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lblPoint.setBounds(10, 72, 130, 22);
- contentPane.add(lblPoint);
-
- textFieldPoint = new JTextField();
- textFieldPoint.setHorizontalAlignment(SwingConstants.CENTER);
- textFieldPoint.setText("0");
- textFieldPoint.setBounds(150, 72, 43, 20);
- textFieldPoint.setColumns(6);
- textFieldPoint.setText(String.valueOf(point));
- contentPane.add(textFieldPoint);
-
-
- lblExplication = new JLabel("Dans le fichier de l'étudiants. Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.");
-
- if(comboBoxValeur.getSelectedItem().equals("strict")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.");
- }
- if(comboBoxValeur.getSelectedItem().equals("strictSansEspace")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC doit être rigoureusement identique, CASE comprise, mais ignore les espaces en début et fin.");
- }
- if(comboBoxValeur.getSelectedItem().equals("environ")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC peut être plus ou moins proche (voir le paramètre similude), la CASE est ignorée.");
- }
-
- lblExplication.setBounds(10, 158, 520, 56);
- contentPane.add(lblExplication);
-
-
- comboBoxValeur.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if(comboBoxValeur.getSelectedItem().equals("strict")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.");
- }
- if(comboBoxValeur.getSelectedItem().equals("strictSansEspace")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC doit être rigoureusement identique, CASE comprise, mais ignore les espaces en début et fin.");
- }
- if(comboBoxValeur.getSelectedItem().equals("environ")) {
- lblExplication.setText("Dans le fichier de l'étudiants. Le contenu du nodeAC peut être plus ou moins proche (voir le paramètre similude), la CASE est ignorée.");
- }
- }
- });
-
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- int point = Integer.valueOf(textFieldPoint.getText());
- if(point<0) point =0;
- nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point));
- nod.evaluerAllChildTrue();
- J.refreshAffichage(nod);
- dispose();
- } catch (Exception e2) {
- JOptionPane.showMessageDialog(null, "Le nombre de point doit être un entier.");
- }
- }
- });
-
-
- setVisible(true);
- }
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/attributs.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/attributs.java
deleted file mode 100644
index 0ce3482..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/attributs.java
+++ /dev/null
@@ -1,379 +0,0 @@
-package fenetres;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.FlowLayout;
-import java.awt.Font;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.util.ArrayList;
-import java.util.Set;
-
-import javax.swing.FocusManager;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextField;
-import javax.swing.border.EmptyBorder;
-
-import list.listeAttributWriterPasEvaluableAvecCodeEvaluateur;
-import list.listeAttributWriterValeurPasModifiable;
-import list.listeAttributsAnalyseWriter;
-import list.listeNodeFormatageDirectDeWriter;
-import net.miginfocom.swing.MigLayout;
-import nodeAC.nodeAC;
-
-
-public class attributs extends JFrame {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private JPanel contentPane;
- nodeAC nod;
- afficheText J;
- int indexSelect=0;
-
- ArrayList Leslabels = new ArrayList();
- ArrayList Lesvaleurs = new ArrayList();
- ArrayList Lesevaluer = new ArrayList();
- ArrayList Lespoints = new ArrayList();
-
- /**
- * Create the frame.
- */
- public attributs(nodeAC nod, afficheText J) {
- this.nod=nod;
- this.J=J;
-
- setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- setBounds(100, 100, 806, 669);
- 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);
-
-
- contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- setContentPane(contentPane);
- contentPane.setLayout(new BorderLayout(0, 0));
-
- ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
- setIconImage(img.getImage());
- setTitle(calc.commandes.Titre + " - Les attributs de Writer");
-
-
-
- JPanel panelGauche = new JPanel();
- contentPane.add(panelGauche, BorderLayout.WEST);
-
- JPanel panelHaut = new JPanel();
- contentPane.add(panelHaut, BorderLayout.NORTH);
-
- JLabel lblNomNode = new JLabel(nod.getNomElt());
- lblNomNode.setFont(new Font("Tahoma", Font.BOLD, 14));
- panelHaut.add(lblNomNode);
-
- JPanel panelBas = new JPanel();
- contentPane.add(panelBas, BorderLayout.SOUTH);
- panelBas.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
-
- JButton btnNewButton = new JButton("Verifier les codes d'évaluation");
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- }
- });
- panelBas.add(btnNewButton);
-
- JButton btnValide = new JButton("Valider les modifications");
- btnValide.setFont(new Font("Tahoma", Font.BOLD, 12));
- btnValide.setForeground(Color.RED);
- panelBas.add(btnValide);
-
- JPanel panelDroite = new JPanel();
- contentPane.add(panelDroite, BorderLayout.EAST);
- JButton btnIntervalle = new JButton("Intervalle");
- btnIntervalle.setToolTipText("Intervalle entre deux valeurs numériques.");
- btnIntervalle.setIcon(new ImageIcon(attributs.class.getResource("/resources/intervallemini.png")));
- btnIntervalle.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "→" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- panelDroite.setLayout(new GridLayout(12, 1, 0, 0));
-
- panelDroite.add(btnIntervalle);
-
- JButton btnTextClean = new JButton("Text clean");
- btnTextClean.setToolTipText("Texte nettoyé de tous les caractères spéciaux, chiffres et ignore la casse (équivalent à allContent=\"environ\"). Cette fonction ne peut pas être combinée avec les autres fonctions ci-dessous. Ce n'est pas un opérateur OU contrairement à l'opérateur ↕. La tolérance de texte (79% de similitude avec le texte de la consigne) paramètre dans les setting. (exemple : ¢‽2) ");
- btnTextClean.addActionListener(new ActionListener() {
-
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- Lesvaleurs.get(indexSelect).setText(Lesvaleurs.get(indexSelect).getText() + "¢");
- }
- });
- btnTextClean.setIcon(new ImageIcon(attributs.class.getResource("/resources/textcleanmini.png")));
- panelDroite.add(btnTextClean);
-
- JButton btnOuStrict = new JButton("OU Strict");
- btnOuStrict.setToolTipText("Fonction OU texte exact (sans traitement). Cette fonction ne peut pas être combinée avec les autres fonctions OU. Cette fonction peut être combinée avec la fonction ET.");
- btnOuStrict.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "¦" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- btnOuStrict.setIcon(new ImageIcon(attributs.class.getResource("/resources/oustrictmini.png")));
- panelDroite.add(btnOuStrict);
-
- JButton btnOuStrictSEps = new JButton("OU Strict s.esp");
- btnOuStrictSEps.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "≡" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- btnOuStrictSEps.setIcon(new ImageIcon(attributs.class.getResource("/resources/oustrictsepsmini.png")));
- btnOuStrictSEps.setToolTipText("Fonction OU texte exact sans les espaces. Cette fonction ne peut pas être combinée avec les autres fonctions OU.");
- panelDroite.add(btnOuStrictSEps);
-
- JButton btnOUEnviron = new JButton("OU Environ");
- btnOUEnviron.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "↑" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- btnOUEnviron.setIcon(new ImageIcon(attributs.class.getResource("/resources/ouenvironmini.png")));
- btnOUEnviron.setToolTipText("Fonction OU, texte nettoyé des caractères spéciaux, chiffres, ignore la CASE MAIS SANS SIMILITUDE de texte. Cette fonction ne peut pas être combinée avec les autres fonctions OU.");
- panelDroite.add(btnOUEnviron);
-
- JButton btnOUEnvironSimilitude = new JButton("OU Env. Sim.");
- btnOUEnvironSimilitude.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "↕" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- btnOUEnvironSimilitude.setToolTipText("Fonction OU texte nettoyé des caractères spéciaux, chiffres et similitude de texte. Cette fonction ne peut pas être combinée avec les autres fonctions OU. La tolérance de texte (79% de similitude avec le texte de la consigne) paramètre dans les setting.");
- btnOUEnvironSimilitude.setIcon(new ImageIcon(attributs.class.getResource("/resources/ouenvironsimilitudemini.png")));
- panelDroite.add(btnOUEnvironSimilitude);
-
- JButton btnET = new JButton("ET contient text");
- btnET.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "×" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
- Lesvaleurs.get(indexSelect).setText(newValue);
- }
- });
- btnET.setToolTipText("Fonction ET contient le texte. Ensemble des textes qui doivent être contenu dans la valeur de l'attribut ou le contenu du nodeAC.");
- btnET.setIcon(new ImageIcon(attributs.class.getResource("/resources/etmini.png")));
- panelDroite.add(btnET);
-
- JButton btnTouText = new JButton("Tout text");
- btnTouText.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int j = Lesvaleurs.get(indexSelect).getCaretPosition();
- System.out.println("position du cursor "+ j);
- Lesvaleurs.get(indexSelect).setText(Lesvaleurs.get(indexSelect).getText() + "†");
- }
- });
- btnTouText.setIcon(new ImageIcon(attributs.class.getResource("/resources/toutextmini.png")));
- btnTouText.setToolTipText("N'importe quel texte mais pas null, ou pas la valeur none ou pas vide. Toutes les autres fonctions sont ignorées.");
- panelDroite.add(btnTouText);
-
- JScrollPane scrollPaneCentre = new JScrollPane();
- contentPane.add(scrollPaneCentre, BorderLayout.CENTER);
-
- JPanel panelCentre = new JPanel();
- scrollPaneCentre.setViewportView(panelCentre);
- panelCentre.setLayout(new MigLayout("", "[100px:n,grow][150px:n,grow 150][::80px][80px:n]", "[::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px]"));
- panelCentre.setLayout(new MigLayout("", "[1px]", "[1px]"));
-
- JLabel lblNewLabel = new JLabel("Nom attribut");
- lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 11));
- panelCentre.add(lblNewLabel, "cell 0 0,grow");
-
- JLabel lblNewLabel_1 = new JLabel("Valeurs");
- lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11));
- panelCentre.add(lblNewLabel_1, "cell 0 0,grow");
-
- JLabel lblNewLabel_2 = new JLabel("Evaluer");
- lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 11));
- panelCentre.add(lblNewLabel_2, "cell 0 0,grow");
-
- JLabel lblNewLabel_3 = new JLabel("Point(s)");
- lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD, 11));
- panelCentre.add(lblNewLabel_3, "cell 0 0,grow");
-
-
- Set key = nod.getAttributs().keySet();
- for (String k : key){
- if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(k)) {
- String value = nod.getAttributs().get(k);
- String point = "0";
- JCheckBox checkEval = new JCheckBox();
- boolean evaluer = false;
- if(value.contains("‽")||value.contains("‼")) {
- evaluer=true;
- if(value.contains("‽")) {
- point = value.substring(value.lastIndexOf("‽")+1,value.length());
- value = value.substring(0,value.lastIndexOf("‽"));
- }
- if(value.contains("‼")) {
- point = value.substring(value.lastIndexOf("‼")+1,value.length());
- value = value.substring(0,value.lastIndexOf("‼"));
- }
- }
-
- JTextField txtFielPoints = new JTextField(point);
- JTextField txtFielValue = new JTextField(value);
- txtFielValue.addMouseListener(new MyMouseListener());
- txtFielPoints.setColumns(3);
- checkEval.setSelected(evaluer);
-
- Leslabels.add(new JLabel(k));
- Lesvaleurs.add(txtFielValue);
- Lespoints.add(txtFielPoints);
- Lesevaluer.add(checkEval);
- }
- }
-
-
-
- //Placement dans le panel des informations
- for(int i = 0 ; i"
- + "h1 {margin-bottom: 0.25cm;font-size: 20pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
- + "h2 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
- + "h3 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:left;font-weight: bold;}"
- + "h4 {text-align:left;font-family: \"Arial\"; font-size: 16pt; font-weight: bold; line-height: 110%;}"
- + "p {font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
- + "hr { display: block; margin-top: 0.5em; margin-bottom: 8em; margin-left: 2em; margin-right: 2em; border-style: inset; border-width: 4px;}"
- + "spanpablo { float: right; width: 8em; font-size: 250%; font-family: algerian, courier; line-height: 80%; margin-right: 1%; color: red; text-align: center}"
- + ".p1{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
- + "bleu{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: #AAAAAA; margin-left: 0cm; white-space: pre;}"
- + ".city { background-color: transparent;color: #008B8B;padding: 10px;}"
- + ".rouge { background-color: #8B0000;color: white;padding: 10px;}"
- + "li.p2{color:green;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
- + "li.p4{color:#FF8C00;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
- + "li.p3{color:red;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
- + "p.p4{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; line-height: 115%}"
- + "p.p5 {color: navy;text-indent: 30px;}"
- + ".center { display: block;margin-left: auto;margin-right: auto;width: 50%}"
- + "";
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create.java
deleted file mode 100644
index bc9ad42..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create.java
+++ /dev/null
@@ -1,847 +0,0 @@
-package fenetres;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.GridLayout;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.Enumeration;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JToggleButton;
-import javax.swing.JToolBar;
-import javax.swing.JTree;
-import javax.swing.UnsupportedLookAndFeelException;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreeNode;
-import javax.swing.tree.TreePath;
-import javax.swing.tree.TreeSelectionModel;
-
-import calc.commandes;
-import fenetres.create_act.actAPropos;
-import fenetres.create_act.actAbout;
-import fenetres.create_act.actAddMenuFalse;
-import fenetres.create_act.actAddMenuTrue;
-import fenetres.create_act.actAfficheInformationFichierAnalyse;
-import fenetres.create_act.actAttribut;
-import fenetres.create_act.actCoefficient;
-import fenetres.create_act.actCollapseAll;
-import fenetres.create_act.actCollapseNode;
-import fenetres.create_act.actDeleteNode;
-import fenetres.create_act.actDocumentation;
-import fenetres.create_act.actDownNode;
-import fenetres.create_act.actEvalNameNodeNon;
-import fenetres.create_act.actEvalNameNodeOui;
-import fenetres.create_act.actEvalNamePageNon;
-import fenetres.create_act.actEvalNamePageOui;
-import fenetres.create_act.actEvalueFalse;
-import fenetres.create_act.actEvalueTrue;
-import fenetres.create_act.actEvaluer;
-import fenetres.create_act.actEvaluerTousEnfantsFalse;
-import fenetres.create_act.actEvaluerTousEnfantsTrue;
-import fenetres.create_act.actExit;
-import fenetres.create_act.actExpandAll;
-import fenetres.create_act.actExpandNode;
-import fenetres.create_act.actNewFichierAnalyse;
-import fenetres.create_act.actNodeFichier;
-import fenetres.create_act.actOpen;
-import fenetres.create_act.actSave;
-import fenetres.create_act.actSaveAs;
-import fenetres.create_act.actSetting;
-import fenetres.create_act.actSupprimeTitre;
-import fenetres.create_act.actTitre1;
-import fenetres.create_act.actTitre2;
-import fenetres.create_act.actTitre3;
-import fenetres.create_act.actTitrePrincipal;
-import fenetres.create_act.actTotalPoint;
-import fenetres.create_act.actTotalPointNode;
-import fenetres.create_act.actTousLesNodesEvaluer;
-import fenetres.create_act.actTutoriels;
-import fenetres.create_act.actUpNode;
-import fenetres.create_act.actsautfalse;
-import fenetres.create_act.actsauttrue;
-import nodeAC.nodeAC;
-
-
-
-
-public final class create extends JFrame {
-
- private static final long serialVersionUID = 1L;
- // les élément de create
- private static JTree tree = new JTree();
- private static DefaultMutableTreeNode selectNode;
- private static afficheText textNodeSelect = new afficheText();
- private JToolBar toolBarPrincipal;
-
-
- private JMenuBar menuBar = new JMenuBar();
- private static JButton buttonEvaluate;
-
- private static JToggleButton tglbtnTousLesNodes;
-
- private JPanel panelPrincipal;
-
-
- private static create instance;
-
- /**
- * Create the application.
- */
- public create() {
- try {
- initialize();
- } catch (UnsupportedLookAndFeelException e) {
- e.printStackTrace();
- }
- setVisible(true);
- }
-
- public static create getInstance() {
- if (instance == null) {
- instance = new create();
- }
- instance.setVisible(true);
- return instance;
- }
-
-
- /**
- * Initialize the contents of the frame.
- * @throws UnsupportedLookAndFeelException
- */
- private void initialize() throws UnsupportedLookAndFeelException {
-
- setSize(1200,800);
- 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);
-
- ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
- setTitle(commandes.Titre + " " + commandes.version + " " + commandes.branch);
- setIconImage(img.getImage());
-
- setLocationRelativeTo( null );
- setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
-
- // Construction et injection de la barre de menu
- setJMenuBar( this.createMenuBar() );
- tree.setVisibleRowCount(30);
-
- // Ajoute le menu contextuel de la tree
- tree.setComponentPopupMenu(null);
-
- this.createToolBar();
-
- panelPrincipal = new JPanel();
- getContentPane().add(panelPrincipal, BorderLayout.NORTH);
-
- this.createPopupMenuTree(null);
-
- // The content of the window
- if(commandes.fichierAnalyseValide) tree = commandes.tree;
-
- JScrollPane leftScrollPane = new JScrollPane( );
- leftScrollPane.setPreferredSize( new Dimension(400, 0) );
- JScrollPane rightScrollPane = new JScrollPane( );
-
- JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftScrollPane, rightScrollPane );
- splitPane.setBounds(10, 10, 1364, 783);
- rightScrollPane.setViewportView(textNodeSelect);
- textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));
-
- leftScrollPane.setViewportView(tree);
- tree.setFont(new Font("Tahoma", Font.PLAIN, 14));
-
- getContentPane().add(splitPane, BorderLayout.CENTER);
- panelPrincipal.setLayout(new GridLayout(1, 1, 0, 0));
- panelPrincipal.add(toolBarPrincipal);
-
-
-
-
-// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top");
-// panelPrincipal.add(bRecherche2, "cell 0 1,alignx left,aligny top");
-
-
-// panelPrincipal.add(label, "cell 2 1,alignx left,aligny center");
-
- if(commandes.fichierAnalyseValide) constructionTree();
-
- this.setExtendedState(MAXIMIZED_BOTH);
-
- ListenerAction();
-
-
- }
-
-
- /**
- * Selection du nodeAC du tree et d'un nodeAC CXML
- */
- private void ListenerAction() {
-
- /**
- * Selection d'un nodeAC dans le JTree.
- */
- tree.addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- if(tree.getSelectionPath()!=null) {
- selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
- nodeAC nod = (nodeAC) selectNode.getUserObject();
- createPopupMenuTree(nod);
- textNodeSelect.refreshAffichage(nod);
- }
- }
- });
-
-
- /**
- * Fermeture de la fenêtre.
- */
- addWindowListener(new java.awt.event.WindowAdapter() {
- @Override
- public void windowClosing(java.awt.event.WindowEvent windowEvent) {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- dispose();
- };
- }
- });
-
-
-// chckbxtoolBarRecherche.addChangeListener(new ChangeListener() {
-// public void stateChanged(ChangeEvent e) {
-// if(chckbxtoolBarRecherche.isSelected()) {
-//// panelPrincipal.add(bRecherche);
-// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top");
-// bRecherche.setVisible(true);
-// bRecherche.setEnabled(true);
-// }else {
-// bRecherche.setVisible(false);
-// bRecherche.setEnabled(false);
-// panelPrincipal.remove(bRecherche);
-// }
-// }
-// });
-
-
- }
-
-
- /**
- * Création du menu contextuel du tree
- * @return
- */
- private void createPopupMenuTree(nodeAC nod) {
-
- if(nod!=null) {
-
- boolean nodeSetting = false;
- boolean nodeFormatageDirectePasDeTitrePasAddMenu = false;
-
-
- nodeAC nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
- if(nodStyleParent!=null) {
- String nomDuStle = nodStyleParent.getAttributs().get("style:name");
- Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$");
- Matcher m = p.matcher(nomDuStle);
- if(m.find()) {
- nodeFormatageDirectePasDeTitrePasAddMenu = true;
- }
- }
-
-
-
- //Menu Evaluer
- JMenu mnEvaluer = new JMenu("Evaluer");
- mnEvaluer.add(new actEvalueTrue());
- mnEvaluer.add(new actEvalueFalse());
-
- //Menu arbre
- JMenu mnManageTree = new JMenu("Arbre");
- mnManageTree.add(new actUpNode());
- mnManageTree.add(new actDownNode());
- mnManageTree.addSeparator();
- mnManageTree.add(new actExpandAll());
- mnManageTree.add(new actExpandNode());
- mnManageTree.addSeparator();
- mnManageTree.add(new actCollapseAll());
- mnManageTree.add(new actCollapseNode());
-
- //Menu Saut niveau >1
- JMenu mnSaut = new JMenu("Saut de ligne avant");
- mnSaut.setIcon( new ImageIcon(create.class.getResource("/resources/sautmini.png")));
- mnSaut.add(new actsauttrue());
- mnSaut.add(new actsautfalse());
-
- //Menu saut niveau = 1
- //Menu Saut
- JMenu mnSautNiveau1 = new JMenu("Saut de ligne avant");
- mnSautNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/sautmini.png")));
- mnSautNiveau1.add(new actsauttrue());
- mnSautNiveau1.add(new actsautfalse());
-
-
- //Menu Titre niveau > 1
- JMenu mnTitre = new JMenu("Titre");
- mnTitre.setIcon( new ImageIcon(create.class.getResource("/resources/titremini.png")));
- mnTitre.add(new actTitrePrincipal());
- mnTitre.add(new actTitre1());
- mnTitre.add(new actTitre2());
- mnTitre.add(new actTitre3());
- mnTitre.addSeparator();
- mnTitre.add(new actSupprimeTitre());
-
- //Menu Titre niveau = 1
- JMenu mnTitreNiveau1 = new JMenu("Titre");
- mnTitreNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/titremini.png")));
- mnTitreNiveau1.add(new actTitrePrincipal());
- mnTitreNiveau1.add(new actTitre1());
- mnTitreNiveau1.add(new actTitre2());
- mnTitreNiveau1.add(new actTitre3());
- mnTitreNiveau1.addSeparator();
- mnTitreNiveau1.add(new actSupprimeTitre());
-
- //Menu ajoute un lien de menu niveau 1
- JMenu mnAddMenuNiveau1= new JMenu("Lien"); //addMenu
- mnAddMenuNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/addmenumini.png")));
- mnAddMenuNiveau1.add(new actAddMenuTrue());
- mnAddMenuNiveau1.add(new actAddMenuFalse());
-
- //Menu ajoute un lien de menu niveau sup 1
- JMenu mnAddMenuNiveauSup1= new JMenu("Lien"); //addMenu
- mnAddMenuNiveauSup1.setIcon( new ImageIcon(create.class.getResource("/resources/addmenumini.png")));
- mnAddMenuNiveauSup1.add(new actAddMenuTrue());
- mnAddMenuNiveauSup1.add(new actAddMenuFalse());
-
-
- //Menu Evaluer présence d'un nodeAC pour les nodes de niveau > 1
- JMenu mnEvalNameNode = new JMenu("Evaluer la présence du nodeAC");
- mnEvalNameNode.setIcon(new ImageIcon(create.class.getResource("/resources/evalnodemini.png")));
- mnEvalNameNode.add(new actEvalNameNodeOui());
- mnEvalNameNode.add(new actEvalNameNodeNon());
-
-
- //Menu evalNamePage (pour les nodes page)
- JMenu mnEvalNamePage = new JMenu("Evaluer le nom de la page");
- mnEvalNamePage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnamepagemini.png")));
- mnEvalNamePage.add(new actEvalNamePageOui());
- mnEvalNamePage.add(new actEvalNamePageNon());
-
-
- //Menu Représentation dans le feedback
- JMenu mnPourFeedback = new JMenu("Pour représentation feedback");
- mnPourFeedback.add(mnSaut);
- if(!nodeFormatageDirectePasDeTitrePasAddMenu) {
- mnPourFeedback.addSeparator();
- mnPourFeedback.add(mnTitre);
- mnPourFeedback.addSeparator();
- mnPourFeedback.add(mnAddMenuNiveauSup1);
- }
-
-
- //***************************
- //** Menu nodeAC niveau = 1 ***
- //***************************
- JMenu mnNiveau1 = new JMenu("Attributs aW, niveau 1 ");
- mnNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/attributanalysewritermini.png")));
- mnNiveau1.add(new actCoefficient());
- mnNiveau1.addSeparator();
- mnNiveau1.add(mnSautNiveau1);
- mnNiveau1.addSeparator();
- mnNiveau1.add(mnTitreNiveau1);
- mnNiveau1.addSeparator();
- mnNiveau1.add(mnAddMenuNiveau1);
-
-
-
- //*********************************************
- //** La popupMenu qui s'affiche sur le tree ***
- //*********************************************
- JPopupMenu mnPopupTree = new JPopupMenu();
- if(!nodeSetting) {
- mnPopupTree.add(mnEvaluer);
- }
- if(nod.getLevel()==1 ) {
- mnPopupTree.addSeparator();
- mnPopupTree.add(mnNiveau1);
- }
-
- //Pour les nodes de niveau supérieur à 1
- if(nod.getLevel()>1 ) {
- mnPopupTree.addSeparator();
- mnPopupTree.add(mnPourFeedback);
- mnPopupTree.addSeparator();
- mnPopupTree.add(new actAttribut());
- }
-
-
- mnPopupTree.addSeparator();
- mnPopupTree.add(mnManageTree);
- mnPopupTree.addSeparator();
- mnPopupTree.add(new actDeleteNode());
-
-
- tree.setComponentPopupMenu(mnPopupTree);
- }
- }
-
-
-
-
- /* Methode de construction de la barre de menu */
- private JMenuBar createMenuBar() {
-
- // La barre de menu à proprement parler
- menuBar = new JMenuBar();
-
- // Définition du menu déroulant "File" et de son contenu
- JMenu mnuFile = new JMenu( "Fichier" );
- mnuFile.setMnemonic( 'F' );
-
- /*JMenuItem mnuNewFile =*/
- mnuFile.add( new actOpen() );
- mnuFile.add( new actNewFichierAnalyse() );
- mnuFile.addSeparator();
- mnuFile.add( new actSave() );
- mnuFile.add( new actSaveAs() );
- mnuFile.addSeparator();
- mnuFile.add( new actExit() );
-
- menuBar.add(mnuFile);
-
- // Définition du menu déroulant "Edit" et de son contenu
- JMenu mnuEdit = new JMenu( "Edition" );
- mnuEdit.setMnemonic( 'E' );
-
-// mnuEdit.add( actUndo );
-// mnuEdit.add( actRedo );
-// mnuEdit.addSeparator();
-// mnuEdit.add( actCopy );
-// mnuEdit.add( actCut );
-// mnuEdit.add( actPaste );
-
- menuBar.add(mnuEdit);
-
- JMenu mnAffiche = new JMenu("Affichage");
- menuBar.add(mnAffiche);
-
-// chckbxtoolBarRecherche = new JCheckBoxMenuItem("Barre outils recherche nodeAC");
-// chckbxtoolBarRecherche.setSelected(true);
-// mnAffiche.add(chckbxtoolBarRecherche);
-
- // Définition du menu Node
- JMenu mnNode = new JMenu("Modifier");
- mnNode.add( new actNodeFichier() );
- mnNode.addSeparator();
- menuBar.add(mnNode);
-
- //Menu arbre
- JMenu mnManageTree = new JMenu("Arbre");
- mnManageTree.add(new actUpNode());
- mnManageTree.add(new actDownNode());
- mnManageTree.addSeparator();
- mnManageTree.add(new actExpandAll());
- mnManageTree.add(new actExpandNode());
- mnManageTree.addSeparator();
- mnManageTree.add(new actCollapseAll());
- mnManageTree.add(new actCollapseNode());
- mnNode.add(mnManageTree);
- mnNode.addSeparator();
-
- //Définition Evaluer
- JMenu mnEvaluer = new JMenu("Evaluer");
- mnEvaluer.add(new actEvalueTrue());
- mnEvaluer.add(new actEvalueFalse());
- mnNode.add(mnEvaluer);
-
-
-
- // Définition du menu déroulant "Création évaluation" et de son contenu
- JMenu mnuExercice = new JMenu( "Création évaluation" );
- mnuExercice.setMnemonic( 'N' );
- mnuExercice.add(new actEvaluer());
-
- menuBar.add(mnuExercice);
-
- // Définition du menu déroulant "Help" et de son contenu
- JMenu mnuHelp = new JMenu( "Aide" );
- mnuHelp.setMnemonic( 'H' );
-
- mnuHelp.add( new actAPropos());
- mnuHelp.add( new actDocumentation());
-
- menuBar.add( mnuHelp );
-
- return menuBar;
- }
-
- /* Methode de construction de la barre d'outils */
- private void createToolBar() {
- toolBarPrincipal = new JToolBar();
- toolBarPrincipal.setFloatable(false);
- toolBarPrincipal.setRollover(true);
-
- toolBarPrincipal.setName("outils principaux");
-
- JButton buttonLoadFile = toolBarPrincipal.add( new actOpen() );
- buttonLoadFile.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyse.png")));
- buttonLoadFile.setHideActionText(true);
- toolBarPrincipal.add(buttonLoadFile);
-
- JButton btnNewFichierAnalyse = toolBarPrincipal.add( new actNewFichierAnalyse() );
- btnNewFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierODF.png")));
- btnNewFichierAnalyse.setHideActionText(true);
- toolBarPrincipal.add(btnNewFichierAnalyse);
-
- toolBarPrincipal.addSeparator();
-
- buttonEvaluate = toolBarPrincipal.add( new actEvaluer() );
- buttonEvaluate.setIcon(new ImageIcon(create.class.getResource("/resources/evaluate.png")));
-
- toolBarPrincipal.addSeparator();
-
- JButton btnAfficheInformationFichierAnalyse = toolBarPrincipal.add( new actAfficheInformationFichierAnalyse() );
- btnAfficheInformationFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyseInfo.png")));
- btnAfficheInformationFichierAnalyse.setHideActionText(true);
- toolBarPrincipal.add(btnAfficheInformationFichierAnalyse);
-
- JButton btnNodeFichier = toolBarPrincipal.add( new actNodeFichier() );
- btnNodeFichier.setIcon(new ImageIcon(create.class.getResource("/resources/nodeFichier.png")));
- btnNodeFichier.setHideActionText(true);
- toolBarPrincipal.add(btnNodeFichier);
-
- JButton btnSetting = toolBarPrincipal.add( new actSetting());
- btnSetting.setIcon(new ImageIcon(create.class.getResource("/resources/setting.png")));
- toolBarPrincipal.add(btnSetting);
-
-
- toolBarPrincipal.addSeparator();
-
- JButton btnEvaluerTrue = toolBarPrincipal.add( new actEvalueTrue() );
- btnEvaluerTrue.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertrue.png")));
- btnEvaluerTrue.setHideActionText(true);
- toolBarPrincipal.add(btnEvaluerTrue);
-
- JButton btnEvaluerFalse = toolBarPrincipal.add(new actEvalueFalse() );
- btnEvaluerFalse.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerfalse.png")));
- btnEvaluerFalse.setHideActionText(true);
- toolBarPrincipal.add(btnEvaluerFalse);
-
- JButton btnEvaluerTouteLaBrancheEtLesEnfantTrue = toolBarPrincipal.add( new actEvaluerTousEnfantsTrue() );
- btnEvaluerTouteLaBrancheEtLesEnfantTrue.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")));
- btnEvaluerTouteLaBrancheEtLesEnfantTrue.setHideActionText(true);
- toolBarPrincipal.add(btnEvaluerTouteLaBrancheEtLesEnfantTrue);
-
- JButton btnEvaluerTouteLaBrancheEtLesEnfantFalse = toolBarPrincipal.add( new actEvaluerTousEnfantsFalse() );
- btnEvaluerTouteLaBrancheEtLesEnfantFalse.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsfaux.png")));
- btnEvaluerTouteLaBrancheEtLesEnfantTrue.setHideActionText(true);
- toolBarPrincipal.add(btnEvaluerTouteLaBrancheEtLesEnfantFalse);
-
- toolBarPrincipal.addSeparator();
-
-
- JButton btnAttribut = new JButton(new actAttribut());
- btnAttribut.setText("");
- btnAttribut.setIcon(new ImageIcon(create.class.getResource("/resources/attribut.png")));
- toolBarPrincipal.add(btnAttribut);
-
- toolBarPrincipal.addSeparator();
-
- JButton btnTotalPoint = new JButton(new actTotalPoint());
- btnTotalPoint.setToolTipText("Nombre de point total dans l'exercice.");
- btnTotalPoint.setText("");
- btnTotalPoint.setIcon(new ImageIcon(create.class.getResource("/resources/totalpoint.png")));
- toolBarPrincipal.add(btnTotalPoint);
-
- JButton btnTotalPointNode = toolBarPrincipal.add( new actTotalPointNode() );
- btnTotalPointNode.setIcon(new ImageIcon(create.class.getResource("/resources/totalpointnode.png")));
- btnTotalPointNode.setHideActionText(true);
- toolBarPrincipal.add(btnTotalPointNode);
-
- toolBarPrincipal.addSeparator();
-
-
- tglbtnTousLesNodes = new JToggleButton("");
- tglbtnTousLesNodes.setAction(new actTousLesNodesEvaluer());
- tglbtnTousLesNodes.setIcon(new ImageIcon(create.class.getResource("/resources/lesnodesevaluer.png")));
- toolBarPrincipal.add(tglbtnTousLesNodes);
-
- toolBarPrincipal.addSeparator();
-
- JButton btnAbout = toolBarPrincipal.add( new actAbout() );
- btnAbout.setIcon(new ImageIcon(create.class.getResource("/resources/apropos.png")));
- btnAbout.setHideActionText( true );
- toolBarPrincipal.add(btnAbout);
-
-
- JButton btnNewButton = toolBarPrincipal.add( new actTutoriels());
- btnNewButton.setIcon(new ImageIcon(create.class.getResource("/resources/tutoriel.png")));
- btnNewButton.setHideActionText(true);
- toolBarPrincipal.add(btnNewButton);
-
- toolBarPrincipal.addSeparator();
-
- JButton buttonExit = toolBarPrincipal.add( new actExit() );
- buttonExit.setHideActionText( true );
-
- }
-
-
-
-
-
-
- public void closeWindows() {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- dispose();
- }
- }
-
- public void closeDirectlyWindows() {
- this.dispose();
- }
-
-// public static void expandOrCollapsePath (JTree tree,TreePath treePath,int level,int currentLevel,boolean expand) {
-// System.out.println("Exp level="+currentLevel+", exp="+expand + ", level=" + level);
-// if (expand && level<=currentLevel && level>0) return;
-//
-// TreeNode treeNode = ( TreeNode ) treePath.getLastPathComponent();
-// TreeModel treeModel=tree.getModel();
-// if ( treeModel.getChildCount(treeNode) >= 0 ) {
-// for ( int i = 0; i < treeModel.getChildCount(treeNode); i++ ) {
-// TreeNode n = ( TreeNode )treeModel.getChild(treeNode, i);
-// TreePath path = treePath.pathByAddingChild( n );
-// expandOrCollapsePath(tree,path,level,currentLevel+1,expand);
-// }
-// if (!expand && currentLevel topLevelNodes = ((TreeNode) tree.getModel().getRoot()).children();
- while(topLevelNodes.hasMoreElements()) {
- DefaultMutableTreeNode N = (DefaultMutableTreeNode) topLevelNodes.nextElement();
- tree.expandPath(new TreePath(N.getPath()));
- expandNode( N);
- }
- }
-
- public static void collapseAll() {
- Enumeration> topLevelNodes = ((TreeNode) tree.getModel().getRoot()).children();
- while(topLevelNodes.hasMoreElements()) {
- DefaultMutableTreeNode N = (DefaultMutableTreeNode) topLevelNodes.nextElement();
- tree.collapsePath(new TreePath(N.getPath()));
- collapseNode(N);
- }
- }
-
- public static void expandNode(DefaultMutableTreeNode N) {
- Enumeration> topLevelNodes = ((TreeNode) N).children();
- while(topLevelNodes.hasMoreElements()) {
- DefaultMutableTreeNode N1 = (DefaultMutableTreeNode) topLevelNodes.nextElement();
- tree.expandPath(new TreePath(N1.getPath()));
- expandNode(N1);
- }
- }
-
- public static void collapseNode(DefaultMutableTreeNode N) {
- Enumeration> topLevelNodes = ((TreeNode) N).children();
- while(topLevelNodes.hasMoreElements()) {
- DefaultMutableTreeNode N1 = (DefaultMutableTreeNode) topLevelNodes.nextElement();
- tree.collapsePath(new TreePath(N1.getPath()));
- collapseNode( N1 );
- }
- tree.collapsePath(new TreePath(N.getPath()));
- }
-
-
-// void saySomething(String eventDescription, TreeExpansionEvent e) {
-// System.out.println(eventDescription + "; " + "path = " + e.getPath());
-// }
-//
-//
-// // Required by TreeExpansionListener interface.
-// public void treeExpanded(TreeExpansionEvent e) {
-// saySomething("Tree-expanded event detected", e);
-// }
-//
-// // Required by TreeExpansionListener interface.
-// public void treeCollapsed(TreeExpansionEvent e) {
-// saySomething("Tree-collapsed event detected", e);
-// }
-
-
-
-
-
-}
-
-
-
-//class MyTreeWillExpandListener implements TreeWillExpandListener {
-//
-//
-// public void treeWillExpand(TreeExpansionEvent evt) throws ExpandVetoException {
-// JTree tree = (JTree) evt.getSource();
-//
-// TreePath path = evt.getPath();
-// boolean veto = false;
-// if (veto) {
-// throw new ExpandVetoException(evt);
-// }
-// }
-//
-// public void treeWillCollapse(TreeExpansionEvent evt) throws ExpandVetoException {
-// JTree tree = (JTree) evt.getSource();
-//
-// TreePath path = evt.getPath();
-// boolean veto = false;
-// if (veto) {
-// throw new ExpandVetoException(evt);
-// }
-// }
-//}
-
-//class MyTreeExpansionListener implements TreeExpansionListener {
-//
-// public ArrayList Chemin = new ArrayList();
-//
-// public ArrayList getChemin() {
-// return Chemin;
-// }
-//
-// public void setChemin(ArrayList chemin) {
-// Chemin = chemin;
-// }
-//
-// public void treeExpanded(TreeExpansionEvent evt) {
-// TreePath path = evt.getPath();
-// Chemin.add(path);
-// System.out.println("treeExpanded");
-// }
-//
-// public void treeCollapsed(TreeExpansionEvent evt) {
-// TreePath path = evt.getPath();
-// Chemin.remove(path);
-// System.out.println("treeCollapsed");
-//
-// }
-//}
-
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAPropos.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAPropos.java
deleted file mode 100644
index d2bfa55..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAPropos.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.about;
-import fenetres.create;
-
-public class actAPropos extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Informations" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/aproposmini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_M );
- putValue( Action.SHORT_DESCRIPTION, "Informations (CTRL+I)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- about.getInstance();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAbout.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAbout.java
deleted file mode 100644
index 9825c1e..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAbout.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.about;
-import fenetres.create;
-
-public class actAbout extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
-
- {
- putValue( Action.NAME, "Informations" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/aproposmini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_I );
- putValue( Action.SHORT_DESCRIPTION, "Informations (CTRL+I)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK) );
- }
-
-
- @Override
- public void actionPerformed(ActionEvent e) {
- about.getInstance();
- }
-
-
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuFalse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuFalse.java
deleted file mode 100644
index dccf8cc..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuFalse.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import nodeAC.nodeAC;
-
-
-public class actAddMenuFalse extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "false" );
- putValue( Action.SHORT_DESCRIPTION, "false" );
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.addMenu(false);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuTrue.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuTrue.java
deleted file mode 100644
index 78b4e18..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAddMenuTrue.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import nodeAC.nodeAC;
-
-public class actAddMenuTrue extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "true" );
- putValue( Action.SHORT_DESCRIPTION, "true" );
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.addMenu(true);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAfficheInformationFichierAnalyse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAfficheInformationFichierAnalyse.java
deleted file mode 100644
index 324f69e..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAfficheInformationFichierAnalyse.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-public class actAfficheInformationFichierAnalyse extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Affiche informations" );
- putValue( Action.SHORT_DESCRIPTION, "Affiche les informations du fichier d'analyse." );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAttribut.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAttribut.java
deleted file mode 100644
index 5538756..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actAttribut.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.util.Set;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.attributs;
-import fenetres.create;
-import list.listeAttributsAnalyseWriter;
-import nodeAC.nodeAC;
-
-public class actAttribut extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer les attributs Writer" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/attributmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/attributmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer les attributs du traitement de texte Writer" );
-
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
-
- int nbrAttribut = nod.getAttributs().size();
-
- Set key = nod.getAttributs().keySet();
- for (String k : key) {
- if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k)) {
- nbrAttribut--;
- }
- }
-
- if(nbrAttribut>0) {
- if(nod.getLevel()>1 && !nod.chemin().contains("setting")) {
- new attributs(nod,fenetres.create.getTextNodeSelect());
- }else {
- JOptionPane.showMessageDialog(null, "Vous ne pouvez pas modifier les attributs de ce nodeAC.");
- }
- }else {
- JOptionPane.showMessageDialog(null, "Ce nodeAC ne contient pas d'attribut Writer.");
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCoefficient.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCoefficient.java
deleted file mode 100644
index 6aeebad..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCoefficient.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.baliseStyle;
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actCoefficient extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Coefficient (poids)" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/poidsmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Coefficient (poids)" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- double poids = 1.00;
- if(nod.getAttributs().get("poids")!=null) {
- try {
- poids = Double.valueOf(nod.getAttributs().get("poids"));
- } catch (Exception e2) {
- System.out.println(e2.toString());
- }
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le coefficient de cette partie de l'évaluation?",poids);
-
- if(!a.isEmpty()) {
- try {
- poids = Double.valueOf(a);
- if(poids<=0) {
- nod.poids(Double.valueOf(1));
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro. Cependant,la valeur a été modifiée. poids=1. ");
- }else {
- nod.poids(Double.valueOf(poids));
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
- } catch (Exception e2) {
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier. La valeur n'a pas été modifiée. ");
- }
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseAll.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseAll.java
deleted file mode 100644
index d104871..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseAll.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-
-public class actCollapseAll extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Tout réduire" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/collapseallmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Tout réduire" );
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.collapseAll();
-
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseNode.java
deleted file mode 100644
index 41b7c59..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actCollapseNode.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-
-public class actCollapseNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Réduire ce node" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/collapsenodemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Réduire ce node" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.collapseNode(fenetres.create.getSelectNode());
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDeleteNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDeleteNode.java
deleted file mode 100644
index d8f00ac..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDeleteNode.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actDeleteNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Supprime" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/supprimemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Supprime" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
-
-
- if(fenetres.create.getTree().getSelectionPath()!=null) {
- int a = JOptionPane.showConfirmDialog(null,"Voulez-vous supprimer le nodeAC " + fenetres.create.getSelectNode().toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
-
- if(a == JOptionPane.YES_NO_OPTION) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- if(!(nod.getNomElt().equals("setting")||nod.getNomElt().equals("csv")||nod.getNomElt().equals("import_moodle")||nod.getNomElt().equals("zip")
- ||nod.getNomElt().equals("plagiarism")||nod.getNomElt().equals("text:similarity")||nod.getNomElt().equals("color") ||nod.getNomElt().equals("translation") )) {
-
- nod.getParent().supprimeNodeEnfant(nod);
- fenetres.create.constructionTree();
-
- }else {
- JOptionPane.showMessageDialog(null,"Vous ne devez pas supprimer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
-
- }
-
- }
- }
-
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDocumentation.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDocumentation.java
deleted file mode 100644
index 05036c0..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDocumentation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.Desktop;
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.io.File;
-import java.io.IOException;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-
-public class actDocumentation extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Documentation" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/documentationmini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_D );
- putValue( Action.SHORT_DESCRIPTION, "Documentation (CTRL+D)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- Desktop d = Desktop.getDesktop();
- try {
- d.open(new File(create.class.getResource("/resources/documentation.pdf").getPath()));
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDownNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDownNode.java
deleted file mode 100644
index f187929..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actDownNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actDownNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Descendre le nodeAC" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/downnodemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Descendre le nodeAC" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- if(fenetres.create.getTree().getSelectionPath()!=null) {
- int a = JOptionPane.showConfirmDialog(null,"Voulez-vous descendre le nodeAC " + fenetres.create.getSelectNode().toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
-
- if(a == JOptionPane.YES_NO_OPTION) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- if(!nod.chemin().contains("setting")) {
- nod.getParent().downNodeEnfant(nod);
- fenetres.create.constructionTree();
- }else {
- JOptionPane.showMessageDialog(null,"Vous ne devez pas déplacer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
- }
- }
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalInitialCreator.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalInitialCreator.java
deleted file mode 100644
index 6481c54..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalInitialCreator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.baliseStyle;
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actEvalInitialCreator extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer la présence du premier auteur (créateur)" );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence du premier auteur (créateur)" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/auteurcreateurmini.png")) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- int point = 0;
- if(nod.getAttributs().get("evalNameInitialCreator")!=null) {
- point = Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator"));
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
-
- if(!a.isEmpty()) {
- try {
- point = Integer.valueOf(a);
- if(point<=0) {
- nod.getAttributs().put("evalNameInitialCreator", String.valueOf(0));
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro. Cependant,la valeur a été modifiée. evalNameInitialCreator=0. ");
- }else {
- nod.getAttributs().put("evalNameInitialCreator", String.valueOf(point));
- }
- } catch (Exception e2) {
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier. L'attribut n'a pas été modifiée. ");
- }
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeNon.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeNon.java
deleted file mode 100644
index 9e3ef83..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeNon.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import nodeAC.nodeAC;
-
-public class actEvalNameNodeNon extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Supprime l'évaluation de la présence du nodeAC" );
- putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du nodeAC" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.supprimeAttribut("evalNameNode");
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeOui.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeOui.java
deleted file mode 100644
index cb635f2..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNameNodeOui.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import fenetres.baliseStyle;
-import nodeAC.nodeAC;
-
-public class actEvalNameNodeOui extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Oui, combien de point?" );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce nodeAC" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- int point = 0;
- if(nod.getAttributs().get("evalNameNode")!=null) {
- point = Integer.valueOf(nod.getAttributs().get("evalNameNode"));
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
-
- if(!a.isEmpty()) {
- try {
- point = Integer.valueOf(a);
- if(point<=0) {
- nod.getAttributs().put("evalNameNode", String.valueOf(0));
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro. Cependant,la valeur a été modifiée. evalNameNode=0. ");
- }else {
- nod.getAttributs().put("evalNameNode", String.valueOf(point));
- }
- } catch (Exception e2) {
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier. L'attribut n'a pas été modifiée. ");
- }
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageNon.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageNon.java
deleted file mode 100644
index 4f09b03..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageNon.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import nodeAC.nodeAC;
-
-public class actEvalNamePageNon extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Supprime évaluer le nom de la page" );
- putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du nom de la page." );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.supprimeAttribut("evalNamePage");
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageOui.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageOui.java
deleted file mode 100644
index a41d75c..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalNamePageOui.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import fenetres.baliseStyle;
-import nodeAC.nodeAC;
-
-public class actEvalNamePageOui extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Oui, combien de point?" );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom de la page" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- int point = 0;
- if(nod.getAttributs().get("evalNamePage")!=null) {
- point = Integer.valueOf(nod.getAttributs().get("evalNamePage"));
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
-
- if(!a.isEmpty()) {
- try {
- point = Integer.valueOf(a);
- if(point<=0) {
- nod.getAttributs().put("evalNamePage", String.valueOf(0));
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro. Cependant,la valeur a été modifiée. evalNamePage=0. ");
- }else {
- nod.getAttributs().put("evalNamePage", String.valueOf(point));
- }
- } catch (Exception e2) {
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier. L'attribut n'a pas été modifiée. ");
- }
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueFalse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueFalse.java
deleted file mode 100644
index 563e440..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueFalse.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actEvalueFalse extends AbstractAction {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue(ACCELERATOR_KEY,
- KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
- putValue(Action.NAME, "Evaluer false");
- putValue(Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluerfalsemini.png")));
- putValue(Action.SHORT_DESCRIPTION, "Ne pas évaluer ce nodeAC par l'application.");
- }
-
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.evaluerFalse();
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueTrue.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueTrue.java
deleted file mode 100644
index 651a905..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvalueTrue.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actEvalueTrue extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_DOWN_MASK));
- putValue( Action.NAME, "Evaluer true" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertruemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer ce nodeAC par l'application" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- nod.evaluerTrue();
- if(nod.getLevel()==1) {
- nod.addMenu(true);
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluer.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluer.java
deleted file mode 100644
index 6063a49..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluer.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-import fenetres.evaluate;
-
-public class actEvaluer extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer" );
- putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/evaluate.png") ) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_E );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer un node (CTRL+E)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- new evaluate();
- create.getInstance().dispose();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsFalse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsFalse.java
deleted file mode 100644
index da0971b..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsFalse.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actEvaluerTousEnfantsFalse extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer toute la branche" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer toute la branche de la racine à la feuille." );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- if(!nod.getNomElt().equals("fichier")) {
- nod.evaluerAllChildFalse();
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsTrue.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsTrue.java
deleted file mode 100644
index 4bee813..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actEvaluerTousEnfantsTrue.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actEvaluerTousEnfantsTrue extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer toute la branche" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer toute la branche de la racine à la feuille." );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- if(!nod.getNomElt().equals("fichier")) {
- nod.evaluerAllChildTrue();
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExit.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExit.java
deleted file mode 100644
index 29e621b..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExit.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-
-public class actExit extends AbstractAction {
-
- {
- putValue( Action.NAME, "Quitter" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/exitmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/exit.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_Q );
- putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
- }
-
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Override
- public void actionPerformed(ActionEvent e) {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- create.getInstance().dispose();
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandAll.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandAll.java
deleted file mode 100644
index 469da96..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandAll.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-
-public class actExpandAll extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Tout étendre" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/expandallmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Tout étendre" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.expandAll();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandNode.java
deleted file mode 100644
index c759685..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actExpandNode.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-
-public class actExpandNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Etendre ce node" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/expandnodemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Etendre ce node" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.expandNode(fenetres.create.getSelectNode());
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNewFichierAnalyse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNewFichierAnalyse.java
deleted file mode 100644
index 56702f5..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNewFichierAnalyse.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.io.IOException;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JFileChooser;
-import javax.swing.KeyStroke;
-import javax.swing.filechooser.FileNameExtensionFilter;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.xml.sax.SAXException;
-
-import AnalyseCalc.Classeur2;
-import calc.commandes;
-import fenetres.evaluate;
-import nodeAC.Ecriture;
-import nodeAC.LecturesDossiers;
-import nodeAC.constructionNodeAvecString;
-import outils.verificationFichierAnalyse;
-
-public class actNewFichierAnalyse extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierODF.png")));
- putValue( Action.NAME, "Génère un nouveau fichier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierODFmini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_N );
- putValue( Action.SHORT_DESCRIPTION, "Générer un nouveau fichier d'analyse (CTRL+N)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- JFileChooser chooser = new JFileChooser();
- chooser.setDialogTitle("Choisir un fichier ODF");
-
- chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
- chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
- FileNameExtensionFilter filter = new FileNameExtensionFilter("Format ODF", "ods");
- chooser.setFileFilter(filter);
- chooser.setAcceptAllFileFilterUsed(true);
-
- if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
- System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
- System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
-
- // réinitialise les commandes
- calc.commandes.initialiseCommandes();
-
- calc.commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
- calc.commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
- String cheminVersFichier = chooser.getSelectedFile().getAbsolutePath();
- calc.commandes.nameSujet = chooser.getSelectedFile().getName();
-
-
- try {
- new LecturesDossiers(cheminVersFichier);
- constructionNodeAvecString A = new constructionNodeAvecString();
-
- ;
- calc.commandes.sujet = A.NewNode(LecturesDossiers.getEC().getListeContentTableur().get(0));
-
- // Manque la transformation d'un nodeAC en nodeAC pour l'analyse
- //calc.commandes.sujet = ...
-
- calc.commandes.sujet.getAttributs().put("analysis_filename","sujet.xml");
-
- Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
-
-
-// Ecriture.ecritureNodeEnXML(ClasseurAnalyse, "ClasseurAnalyse", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
-
-
- //calc.commandes.sujet = ecritureSujet.nodePourEcritureSujet(calc.commandes.sujet,b,0);
-
- calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start");
- calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
- calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes");
- calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change");
-
- Classeur2 ClasseurAnalyse = new Classeur2(calc.commandes.sujet,0,Ecriture.typeFichier.fichier_analyse);
-// ClasseurAnalyse.ecritureClasseur(commandes.path);
-
- calc.commandes.sujet = ClasseurAnalyse.convertClasseurToNode(Ecriture.typeFichier.fichier_analyse);
-
-// Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet2", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
-
-
- calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
-
- new verificationFichierAnalyse();
- System.out.println("Fichier d'analyse valide = " + calc.commandes.fichierAnalyseValide);
-
- if(calc.commandes.fichierAnalyseValide) {
- fenetres.create.constructionTree();
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
- }else {
- fenetres.create.getTextNodeSelect().setText("Le fichier n'est pas valise ");
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
- }
-
- } catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
- e1.printStackTrace();
- } catch (Exception e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- } else {
- fenetres.create.getTextNodeSelect().refreshAffichage(null);
- }
-
-
- calc.commandes.ecritCode = true;
-
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNodeFichier.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNodeFichier.java
deleted file mode 100644
index 16658ac..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actNodeFichier.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-import fenetres.proprieteFichierAnalyse;
-
-public class actNodeFichier extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Modifier les paramètres de l'évaluation" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/nodeFichiermini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/nodeFichier.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Modifier les paramètres de l'évaluation" );
-
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- proprieteFichierAnalyse.getInstance();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actOpen.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actOpen.java
deleted file mode 100644
index 2d1f5ab..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actOpen.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-import fenetres.filechooserXML;
-
-public class actOpen extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Ouvrir un fichier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalysemini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
- putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- new filechooserXML();
- if(calc.commandes.fichierAnalyseValide) {
- fenetres.create.constructionTree();
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
- }else {
- fenetres.create.constructionTree();
- fenetres.create.getTextNodeSelect().setContentType("text/plain");
- fenetres.create.getTextNodeSelect().setText(calc.commandes.message.toString());
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSave.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSave.java
deleted file mode 100644
index e8c4d00..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSave.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-import javax.swing.KeyStroke;
-
-import fenetres.create;
-import nodeAC.Ecriture;
-
-public class actSave extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Enregister" );
- putValue( Action.SMALL_ICON, new ImageIcon( create.class.getResource("/resources/save.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
- putValue( Action.SHORT_DESCRIPTION, "Enregistrer (CTRL+S)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- Pattern p = Pattern.compile("[.xml]\\b");
- Matcher m = p.matcher(calc.commandes.nameSujet);
-
- String message="";
-
- if(m.find()) {
- message="\"Voulez-vous enregistrer le fichier \"" + calc.commandes.nameSujet + "\"\n"
- + "Dans le dossier " + calc.commandes.PathFilenameAnalysis;
- }else {
- message="\"Voulez-vous enregistrer le fichier \"" + calc.commandes.nameSujet + ".xml\"\n"
- + "Dans le dossier " + calc.commandes.PathFilenameAnalysis;
- calc.commandes.nameSujet = calc.commandes.nameSujet + ".xml";
- }
-
- int input = JOptionPane.showConfirmDialog(null, message);
-
- if(input==0) {
- try {
-// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(calc.commandes.nameSujet);
- if(calc.commandes.sujet.retourneFirstEnfantsByName("settings")==null) {
- Ecriture.addSetting(calc.commandes.sujet);
- }
- Ecriture.ecritureNodeEnXML(calc.commandes.sujet, calc.commandes.nameSujet , calc.commandes.PathFilenameAnalysis, Ecriture.typeFichier.fichier_analyse);
-// Run.ecritureNodeEnXML(calc.commandes.sujet, calc.commandes.nameSujet ,calc.commandes.PathFilenameAnalysis,"sujet");
-
- if(m.find()) {
- fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + " a été réenregistré.\n\n"
- + "Il se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
- }else {
- fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été réenregistré.\n\n"
- + "Il se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
- }
-
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSaveAs.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSaveAs.java
deleted file mode 100644
index 0def331..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSaveAs.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.io.File;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JFileChooser;
-
-import fenetres.create;
-import nodeAC.Ecriture;
-
-
-public class actSaveAs extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Enregistrer sous..." );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/save_as.png") ));
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_A );
- putValue( Action.SHORT_DESCRIPTION, "Enregistrer sous..." );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- JFileChooser fileChooser = new JFileChooser();
- fileChooser.setDialogTitle("Enregistrer sous...");
- File file = null;
-
- if(!calc.commandes.nameSujet.isEmpty()) {
- file = new File(calc.commandes.PathFilenameAnalysis ); //+ "\\" + utils.filename + ".xml"
- }
-
-
-
- fileChooser.setCurrentDirectory(file);
-
- int userSelection = fileChooser.showSaveDialog(null);
-
- if (userSelection == JFileChooser.APPROVE_OPTION) {
- File fileToSave = fileChooser.getSelectedFile();
- try {
-
-// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(fileToSave.getName());
-
- if(calc.commandes.sujet.retourneFirstEnfantsByName("settings")==null) {
- Ecriture.addSetting(calc.commandes.sujet);
- }
- Ecriture.ecritureNodeEnXML(calc.commandes.sujet, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),Ecriture.typeFichier.fichier_analyse);
- calc.commandes.nameSujet = fileToSave.getName();
- calc.commandes.PathFilenameAnalysis = fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\"));
-
- Pattern p = Pattern.compile("[.xml]\\b");
- Matcher m = p.matcher(calc.commandes.nameSujet);
-
- if(m.find()) {
- file = new File(calc.commandes.PathFilenameAnalysis + "\\" + calc.commandes.nameSujet);
- fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + " a été renregistré.\n\nIl se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
- }else {
- file = new File(calc.commandes.PathFilenameAnalysis + "\\" + calc.commandes.nameSujet + ".xml");
- fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
- }
-
-
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- System.out.println("Save as file: " + fileToSave.getAbsolutePath());
- }
- System.out.println( "Save as" );
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSetting.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSetting.java
deleted file mode 100644
index 58f116b..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSetting.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-import fenetres.setting;
-
-public class actSetting extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Settings" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/settingmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/setting.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Modifier les paramètres" );
-
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- setting.getInstance();
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSupprimeTitre.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSupprimeTitre.java
deleted file mode 100644
index 9223e89..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actSupprimeTitre.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-import nodeAC.nodeAC;
-
-public class actSupprimeTitre extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Supprimer le titre" );
- putValue( Action.SHORT_DESCRIPTION, "Supprime le titre" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- if(nod.getAttributs().get("titre")!=null) {
- nod.supprimeAttribut("titre");
- }
- if(nod.getAttributs().get("titre1")!=null) {
- nod.supprimeAttribut("titre1");
- }
- if(nod.getAttributs().get("titre2")!=null) {
- nod.supprimeAttribut("titre2");
- }
- if(nod.getAttributs().get("titre3")!=null) {
- nod.supprimeAttribut("titre3");
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre1.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre1.java
deleted file mode 100644
index f4a4c61..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre1.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import nodeAC.nodeAC;
-
-public class actTitre1 extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Titre 1" );
- putValue( Action.SHORT_DESCRIPTION, "Titre 1" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- String titre = "";
- if(nod.getAttributs().get("titre1")!=null) {
- titre = nod.getAttributs().get("titre1");
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
- nod.titre1(a);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre2.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre2.java
deleted file mode 100644
index a05fd82..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre2.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import nodeAC.nodeAC;
-
-public class actTitre2 extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Titre 2" );
- putValue( Action.SHORT_DESCRIPTION, "Titre 2" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- String titre = "";
- if(nod.getAttributs().get("titre2")!=null) {
- titre = nod.getAttributs().get("titre2");
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
- nod.titre2(a);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre3.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre3.java
deleted file mode 100644
index fd62fce..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitre3.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import nodeAC.nodeAC;
-
-public class actTitre3 extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Titre 3" );
- putValue( Action.SHORT_DESCRIPTION, "Titre 3" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- String titre = "";
- if(nod.getAttributs().get("titre3")!=null) {
- titre = nod.getAttributs().get("titre3");
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
- nod.titre3(a);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitrePrincipal.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitrePrincipal.java
deleted file mode 100644
index ccca363..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTitrePrincipal.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-
-import nodeAC.nodeAC;
-
-public class actTitrePrincipal extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Titre principal" );
- putValue( Action.SHORT_DESCRIPTION, "Titre principal" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- String titre = "";
- if(nod.getAttributs().get("titre")!=null) {
- titre = nod.getAttributs().get("titre");
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
- nod.titre(a);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPoint.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPoint.java
deleted file mode 100644
index e8ff444..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPoint.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import calcul.calculNombrePointEvaluation;
-import fenetres.create;
-
-public class actTotalPoint extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Nombre de point" );
- putValue( Action.SHORT_DESCRIPTION, "Nombre de point total dans l'exercice" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointmini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpoint.png")) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- fenetres.create.getTextNodeSelect().afficheListeDesPointsDansToutExercice(calculNombrePointEvaluation.calculPointDansToutExercice());
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPointNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPointNode.java
deleted file mode 100644
index b4eb7bc..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTotalPointNode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import calcul.calculNombrePointEvaluation;
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actTotalPointNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Nombre de point" );
- putValue( Action.SHORT_DESCRIPTION, "Nombre de point brut dans le nodeAC" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointnodemini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpointnode.png")) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- fenetres.create.getTextNodeSelect().AfficheTotalPoint(nod,calculNombrePointEvaluation.calculNombreDepoint(nod,0));
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTousLesNodesEvaluer.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTousLesNodesEvaluer.java
deleted file mode 100644
index 79e63b1..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTousLesNodesEvaluer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-
-import fenetres.create;
-
-public class actTousLesNodesEvaluer extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/touslesnodesmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Affiche tous les nodes" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- if(fenetres.create.getTglbtnTousLesNodes().isSelected()) {
- try {
- calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
- calc.commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull();
- calc.commandes.fichierAnalyseValide=false;
- fenetres.create.getTextNodeSelect().setContentType("text/html");
- fenetres.create.getTextNodeSelect().setText("Affiche uniquement les nodes évalués par l'application. "
- + "Le chemin vers chaque node évalué est constitué de node évalué. "
- + "Si vous enregistrez maintenant, vous enregistrez le fichier d'analyse avec uniquement les nodes évalués. ");
- fenetres.create.getButtonEvaluate().setEnabled(false);
- fenetres.create.constructionTree();
- } catch (CloneNotSupportedException e1) {
- e1.printStackTrace();
- }
- }else {
- try {
- calc.commandes.sujet = calc.commandes.sujetSauvegarde.clone();
- fenetres.create.getButtonEvaluate().setEnabled(true);
- } catch (CloneNotSupportedException e1) {
- e1.printStackTrace();
- }
- fenetres.create.getTextNodeSelect().setContentType("text/html");
- fenetres.create.getTextNodeSelect().setText("Affiche tous les nodes évalués ou pas. ");
- calc.commandes.fichierAnalyseValide=true;
- fenetres.create.constructionTree();
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTutoriels.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTutoriels.java
deleted file mode 100644
index 7253d92..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actTutoriels.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.create;
-
-public class actTutoriels extends AbstractAction {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Tutoriels" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/tutorielmini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Tutoriels" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- try {
- String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
- java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
- }
- catch (java.io.IOException e1) {
- JOptionPane.showMessageDialog(null, e1.toString());
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actUpNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actUpNode.java
deleted file mode 100644
index 44b637f..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actUpNode.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-import javax.swing.tree.DefaultMutableTreeNode;
-
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actUpNode extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Monter le nodeAC" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/upnodemini.png")) );
- putValue( Action.SHORT_DESCRIPTION, "Monter le nodeAC" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- if(fenetres.create.getTree().getSelectionPath()!=null) {
- DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) fenetres.create.getTree().getSelectionPath().getLastPathComponent();
-
- int a = JOptionPane.showConfirmDialog(null,"Voulez-vous monter le nodeAC " + selectNode.toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
-
- if(a == JOptionPane.YES_NO_OPTION) {
- nodeAC nod = (nodeAC) selectNode.getUserObject();
- if(!nod.chemin().contains("setting")) {
- nod.getParent().upNodeEnfant(nod);
- fenetres.create.constructionTree();
- }else {
- JOptionPane.showMessageDialog(null,"Vous ne devez pas déplacer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
- }
- }
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actevalNameCreator.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actevalNameCreator.java
deleted file mode 100644
index 39ebd24..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actevalNameCreator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
-
-import fenetres.baliseStyle;
-import fenetres.create;
-import nodeAC.nodeAC;
-
-public class actevalNameCreator extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "Evaluer la présence du dernier éditeur" );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence du dernier éditeur" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/auteurediteurmini.png")) );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- int point = 0;
- if(nod.getAttributs().get("evalNameCreator")!=null) {
- point = Integer.valueOf(nod.getAttributs().get("evalNameCreator"));
- }
-
- String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
-
- if(!a.isEmpty()) {
- try {
- point = Integer.valueOf(a);
- if(point<=0) {
- nod.getAttributs().put("evalNameCreator", String.valueOf(0));
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro. Cependant,la valeur a été modifiée. evalNameCreator=0. ");
- }else {
- nod.getAttributs().put("evalNameCreator", String.valueOf(point));
- }
- } catch (Exception e2) {
- fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
- fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier. L'attribut n'a pas été modifiée. ");
- }
- }
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsautfalse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsautfalse.java
deleted file mode 100644
index 36743ca..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsautfalse.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-import javax.swing.tree.TreeNode;
-
-import nodeAC.nodeAC;
-
-public class actsautfalse extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "false" );
- putValue( Action.SHORT_DESCRIPTION, "false" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- TreeNode[] chemin = fenetres.create.getSelectNode().getPath();
- boolean avertissement=false;
- for(int i = 0 ; i < chemin.length; i++) {
- if(chemin[i].toString().contains("setting")) avertissement = true;
- System.out.println(chemin[i].toString());
- }
-
- if(!avertissement) {
- nod.saut(false);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }else {
- JOptionPane.showMessageDialog(null, "Ce nodeAC ne peut pas être évaluer." );
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsauttrue.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsauttrue.java
deleted file mode 100644
index 78d310d..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/create_act/actsauttrue.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package fenetres.create_act;
-
-import java.awt.event.ActionEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-import javax.swing.tree.TreeNode;
-
-import nodeAC.nodeAC;
-
-public class actsauttrue extends AbstractAction{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- {
- putValue( Action.NAME, "true" );
- putValue( Action.SHORT_DESCRIPTION, "true" );
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
- TreeNode[] chemin = fenetres.create.getSelectNode().getPath();
- boolean avertissement=false;
- for(int i = 0 ; i < chemin.length; i++) {
- if(chemin[i].toString().contains("setting")) avertissement = true;
- System.out.println(chemin[i].toString());
- }
-
- if(!avertissement) {
- nod.saut(true);
- fenetres.create.getTextNodeSelect().refreshAffichage(nod);
- }else {
- JOptionPane.showMessageDialog(null, "Ce nodeAC ne peut pas être évaluer." );
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/evaluate.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/evaluate.java
deleted file mode 100644
index bda5adb..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/evaluate.java
+++ /dev/null
@@ -1,860 +0,0 @@
-package fenetres;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JToolBar;
-import javax.swing.KeyStroke;
-import javax.swing.SwingConstants;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-import fenetres.create_act.actAbout;
-import net.miginfocom.swing.MigLayout;
-
-
-
-public class evaluate extends JFrame {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
-
- /**
- *
- */
- private JToolBar toolBar;
- private JPanel contentPane;
- private JLabel lblPath;
- private JLabel lblFileAnalyse;
- private JLabel lblFichierCSV;
- private JLabel lblFichierSVG;
- private JCheckBox chckbxfichiersEtudaints;
- private JCheckBox chckbxZipfeedback;
- private JCheckBox chckbxnoFeedback;
- private JCheckBox chckbxNoNote;
- private JCheckBox chckCSVNotes;
- private JCheckBox chckbxNoLogo;
- private JCheckBox chckbxVerif;
- private JCheckBox chckbxNewLogo;
- private afficheText txtpnmessages;
-
-
-
- /**
- * Create the frame.
- */
- public evaluate() {
-
- ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
- this.setIconImage(img.getImage());
- setTitle(calc.commandes.Titre + " " + calc.commandes.version + " " + calc.commandes.branch);
-
- setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- setBounds(100, 100, 980, 700);
- 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);
-
- createMenu();
- createToolBar();
-
- contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- setContentPane(contentPane);
- contentPane.setLayout(new BorderLayout(0, 0));
-
-
- contentPane.add(toolBar, BorderLayout.NORTH);
-
- JPanel panelWest = new JPanel();
- contentPane.add(panelWest, BorderLayout.WEST);
- panelWest.setLayout(new MigLayout("", "[309px][]", "[38.00][71px][71px][][71px][][74.00][][]"));
-
- JLabel lblTITRE = new JLabel("PARAMETRES ");
- lblTITRE.setForeground(Color.RED);
- lblTITRE.setFont(new Font("Tahoma", Font.BOLD, 16));
- lblTITRE.setHorizontalAlignment(SwingConstants.CENTER);
- panelWest.add(lblTITRE, "cell 0 0,alignx left,aligny center");
-
- lblFileAnalyse = new JLabel("Fichier de l'analyse : ");
- lblFileAnalyse.setHorizontalAlignment(SwingConstants.LEFT);
- lblFileAnalyse.setFont(new Font("Tahoma", Font.BOLD, 14));
- panelWest.add(lblFileAnalyse, "flowy,cell 0 1,alignx left,growy");
-
- chckbxfichiersEtudaints = new JCheckBox("Les fichiers ne sont pas dans des dossiers nominatifs");
- chckbxfichiersEtudaints.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxfichiersEtudaints.isSelected()) {
- calc.commandes.fichierStudentMoodle=true;
- }else {
- calc.commandes.fichierStudentMoodle=false;
- }
- }
- });
- chckbxfichiersEtudaints.setFont(new Font("Tahoma", Font.PLAIN, 12));
- chckbxfichiersEtudaints.setToolTipText("Cochez si les fichiers des étudiants ne sont pas dans des dossier nominatifs");
- panelWest.add(chckbxfichiersEtudaints, "flowy,cell 0 2,grow");
-
- lblFichierCSV = new JLabel("Fichier CSV liste des étudiants :");
- lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
- panelWest.add(lblFichierCSV, "flowy,cell 0 4,grow");
-
- lblFichierSVG = new JLabel("Fichier SVG :");
- lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
- panelWest.add(lblFichierSVG, "flowy,cell 0 6,growx");
-
- chckCSVNotes = new JCheckBox("Créer un fichier CSV des notes");
- chckCSVNotes.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckCSVNotes.isSelected()) {
- calc.commandes.ecritNoteCSV=true;
- }else {
- calc.commandes.ecritNoteCSV=false;
- }
- }
- });
- chckCSVNotes.setToolTipText("Cochez si vous voulez importer les notes dans un fichier CSV.");
- panelWest.add(chckCSVNotes, "cell 0 4,grow");
-
- lblPath = new JLabel();
- lblPath.setHorizontalAlignment(SwingConstants.LEFT);
- lblPath.setFont(new Font("Tahoma", Font.BOLD, 14));
- lblPath.setText("Dossier de l'analyse : " + calc.commandes.path.substring(calc.commandes.path.lastIndexOf("\\")+1,calc.commandes.path.length()) + "");
- panelWest.add(lblPath, "cell 0 1,grow");
-
- chckbxnoFeedback = new JCheckBox("Pas de feedback");
- chckbxnoFeedback.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxnoFeedback.isSelected()) {
- calc.commandes.sansFeeback=true;
- }else {
- calc.commandes.sansFeeback=false;
- }
- }
- });
- chckbxnoFeedback.setToolTipText("Cochez si vous ne voulez pas générer des feedbacks");
- chckbxnoFeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxnoFeedback, "cell 0 2,grow");
-
- chckbxZipfeedback = new JCheckBox("Zip les feedbacks");
- chckbxZipfeedback.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxZipfeedback.isSelected()) {
- calc.commandes.zipfeedback=true;
- }else {
- calc.commandes.zipfeedback=false;
- }
- }
- });
- chckbxZipfeedback.setToolTipText("Cochez si vous voulez placer tous les feedbacks dans une archive ZIP");
- chckbxZipfeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxZipfeedback, "cell 0 2,grow");
-
- chckbxNoNote = new JCheckBox("Pas de note dans les feedbacks");
- chckbxNoNote.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxNoNote.isSelected()) {
- calc.commandes.noNote=true;
- }else {
- calc.commandes.noNote=false;
- }
- }
- });
- chckbxNoNote.setToolTipText("Cochez si vous voulez pas faire apparaître les notes dans les feedbacks");
- chckbxNoNote.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxNoNote, "cell 0 2,grow");
-
- chckbxVerif = new JCheckBox("Vérification des historiques avant analyse");
- chckbxVerif.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxVerif.isSelected()) {
- calc.commandes.verifHisto2=true;
- }else {
- calc.commandes.verifHisto2=false;
- }
- }
- });
- chckbxVerif.setToolTipText("Cochez si vous voulez vérifier les échanges de fichiers entre les étudiants.");
- chckbxVerif.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxVerif, "cell 0 2,grow");
-
- chckbxNewLogo = new JCheckBox("Nouveau logo");
- chckbxNewLogo.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxNewLogo.isSelected()) {
- calc.commandes.newLogo=true;
- }else {
- calc.commandes.newLogo=false;
- }
- }
- });
- chckbxNewLogo.setToolTipText("Cochez si vous voulez remplacer le logo par celui au-dessus.");
- chckbxNewLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxNewLogo, "cell 0 6");
-
- chckbxNoLogo = new JCheckBox("Pas de logo");
- chckbxNoLogo.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- if(chckbxNoLogo.isSelected()) {
- calc.commandes.noLogo=true;
- }else {
- calc.commandes.noLogo=false;
- }
- }
- });
- chckbxNoLogo.setToolTipText("Cochez si vous voulez pas de logo dans les feedbacks.");
- chckbxNoLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
- panelWest.add(chckbxNoLogo, "cell 0 6");
-
-
- JPanel panelCentre = new JPanel();
- contentPane.add(panelCentre, BorderLayout.CENTER);
- panelCentre.setLayout(new BorderLayout(0, 0));
-
- JScrollPane scrollPane = new JScrollPane();
- panelCentre.add(scrollPane);
-
-
- txtpnmessages = new afficheText();
- txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 16));
- txtpnmessages.setContentType("text/html");
- txtpnmessages.setText(baliseStyle.balise() + "*** Charger un fichier d'analyse. *** ");
- scrollPane.setViewportView(txtpnmessages);
-
- this.setExtendedState(MAXIMIZED_BOTH);
-
-
-
- ListenerAction();
-
- refreshLabel();
- setVisible(true);
-// Pro();
-
- }
-
-
- private void ListenerAction() {
-
- /*Some piece of code*/
- addWindowListener(new java.awt.event.WindowAdapter() {
- @Override
- public void windowClosing(java.awt.event.WindowEvent windowEvent) {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- dispose();
- }
- }
- });
- }
-
-
-
-
- private void createMenu() {
- JMenuBar menuBar = new JMenuBar();
- menuBar.setFont(new Font("Segoe UI", Font.BOLD, 14));
- setJMenuBar(menuBar);
-
- JMenu mnNewMenu = new JMenu("Fichier");
- mnNewMenu.setMnemonic( 'F' );
- menuBar.add(mnNewMenu);
- mnNewMenu.add( actSave );
- mnNewMenu.add( actSaveas );
- mnNewMenu.addSeparator();
- mnNewMenu.add( actExit );
-
-
- JMenu mnMenu_Fichier = new JMenu("Fichier d'analyse");
- menuBar.add(mnMenu_Fichier);
- mnMenu_Fichier.add( actOpen );
- mnMenu_Fichier.addSeparator();
- mnMenu_Fichier.add( actAboutFichierAnalyse );
-// mnMenu_Fichier.add( actCodeFichierAnalyse );
- mnMenu_Fichier.add( actModifierFichierAnalyse );
-
- JMenu mnMenu_Liste_Etudiant = new JMenu("Liste des étudiants");
- menuBar.add(mnMenu_Liste_Etudiant);
-// mnMenu_Liste_Etudiant.add(actChargeListeEtudiantCSV);
- mnMenu_Liste_Etudiant.addSeparator();
-// mnMenu_Liste_Etudiant.add(actAfficheListeEtudiant );
-// mnMenu_Liste_Etudiant.add(actVerifCSV );
-
-
- JMenu mnMenu_Logo = new JMenu("Logo");
- menuBar.add(mnMenu_Logo);
-// mnMenu_Logo.add(actChargeLogo);
-
- JMenu mnMenu_Evaluation = new JMenu("Evaluation des étudiants");
- menuBar.add(mnMenu_Evaluation);
- mnMenu_Evaluation.add(actSelectFolder);
- mnMenu_Evaluation.addSeparator();
- mnMenu_Evaluation.add(actEvaluate);
- mnMenu_Evaluation.addSeparator();
- mnMenu_Evaluation.add(actVerifHistorique);
-
- JMenu mnMenu_Informations = new JMenu("Informations");
- menuBar.add(mnMenu_Informations);
- mnMenu_Informations.add(actTutoriels);
- mnMenu_Informations.addSeparator();
- mnMenu_Informations.add( new actAbout() );
- }
-
-
-
- private void createToolBar() {
- toolBar = new JToolBar();
- JButton btnSelectFileAnalyse = toolBar.add( actOpen );
- btnSelectFileAnalyse.setHideActionText( true );
- btnSelectFileAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
-
-
-// JButton btnInformationAnalyse = toolBar.add( actCodeFichierAnalyse );
-// btnInformationAnalyse.setHideActionText(true);
-// btnInformationAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo2.png")));
-
-
- JButton btnAfficheCodeFichierAnalyse = toolBar.add( actAboutFichierAnalyse );
- btnAfficheCodeFichierAnalyse.setHideActionText(true);
- btnAfficheCodeFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo.png")));
- toolBar.add(btnAfficheCodeFichierAnalyse);
-
- JButton btnModifierFichierAnalyse = toolBar.add(actModifierFichierAnalyse);
- btnModifierFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
- btnModifierFichierAnalyse.setHideActionText(true);
- toolBar.add(btnModifierFichierAnalyse);
-
- toolBar.addSeparator();
-
- JButton btnEvaluerLesFichiers = toolBar.add(actEvaluate);
- btnEvaluerLesFichiers.setHideActionText(true);
-
-// JButton btnFichierCSV = toolBar.add(actChargeListeEtudiantCSV );
-// btnFichierCSV.setHideActionText(true);
-// btnFichierCSV.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSV.png")));
-// toolBar.add(btnFichierCSV);
-
-// JButton btnInfoListeEtudiant = toolBar.add(actAfficheListeEtudiant);
-// btnInfoListeEtudiant.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfo.png")));
-// btnInfoListeEtudiant.setHideActionText(true);
-// toolBar.add(btnInfoListeEtudiant);
-
-// JButton btnVerificationCSVavecFichierAnalyse = toolBar.add( actVerifCSV );
-// btnVerificationCSVavecFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfoXML.png")));
-// btnVerificationCSVavecFichierAnalyse.setHideActionText(true);
-// toolBar.add(btnVerificationCSVavecFichierAnalyse);
-
- toolBar.addSeparator();
-
-// JButton btnFichierSVG = toolBar.add(actChargeLogo);
-// btnFichierSVG.setHideActionText(true);
-// btnFichierSVG.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierSVG.png")));
-// toolBar.add(btnFichierSVG);
-
- toolBar.addSeparator();
-
- JButton btnSelectFolder = toolBar.add(actSelectFolder);
- btnSelectFolder.setIcon(new ImageIcon(evaluate.class.getResource("/resources/open.png")));
- btnSelectFolder.setHideActionText(true);
- toolBar.add(btnSelectFolder);
-
- btnEvaluerLesFichiers.setIcon(new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
- toolBar.add(btnEvaluerLesFichiers);
-
- JButton btnVerifHistorique = toolBar.add(actVerifHistorique);
- btnVerifHistorique.setIcon(new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
- btnVerifHistorique.setHideActionText(true);
- toolBar.add(btnVerifHistorique);
-
- toolBar.addSeparator();
-
- JButton btnAbout = toolBar.add(new actAbout());
- btnAbout.setIcon(new ImageIcon(evaluate.class.getResource("/resources/apropos.png")));
- btnAbout.setHideActionText(true);
- toolBar.add(btnAbout);
-
- JButton btnTutoriels = toolBar.add(actTutoriels);
- btnTutoriels.setIcon(new ImageIcon(evaluate.class.getResource("/resources/tutoriel.png")));
- toolBar.add(btnTutoriels);
-
- toolBar.addSeparator();
-
- JButton btnExit = toolBar.add(actExit);
- btnExit.setIcon(new ImageIcon(evaluate.class.getResource("/resources/exit.png")));
- btnExit.setHideActionText(true);
- toolBar.add(btnExit);
- }
-
-
- /**
- * Raffraichi les informations
- */
- private void refreshLabel() {
- if(!calc.commandes.fichierAnalyseValide) {
- }
- }
-// if(!verificationFichierAnalyse.messageErreur.toString().isEmpty())
-// txtpnmessages.setText(MEPTL.verificationFichierAnalyse.messageErreur.toString());
-//
-// chckbxfichiersEtudaints.setEnabled(false);
-// chckbxZipfeedback.setEnabled(false);
-// chckbxnoFeedback.setEnabled(false);
-// chckbxNoNote.setEnabled(false);
-// chckCSVNotes.setEnabled(false);
-// chckbxNewLogo.setEnabled(false);
-// chckbxNoLogo.setEnabled(false);
-// chckbxVerif.setEnabled(false);
-// }else {
-// chckbxfichiersEtudaints.setEnabled(true);
-// chckbxZipfeedback.setEnabled(true);
-// chckbxnoFeedback.setEnabled(true);
-// chckbxNoNote.setEnabled(true);
-// chckCSVNotes.setEnabled(true);
-// chckbxNewLogo.setEnabled(true);
-// chckbxNoLogo.setEnabled(true);
-// chckbxVerif.setEnabled(true);
-//
-// txtpnmessages.afficheChargementFichierAnalyse();
-// }
-//
-// lblPath.setText("Dossier de l'analyse : " + calc.commandes.path.substring(calc.commandes.path.lastIndexOf("\\")+1,calc.commandes.path.length()) + "");
-// lblFileAnalyse.setText("Fichier de l'analyse : " + calc.commandes.analysis_filename + "");
-// lblFichierSVG.setText("Fichier SVG : " + calc.commandes.nameSVG.substring(calc.commandes.nameSVG.lastIndexOf("\\")+1,calc.commandes.nameSVG.length()) + "");
-// lblFichierCSV.setText("Fichier CSV : " + calc.commandes.nameCSV + "");
-
-
-
- /**
- *
- * evaluer l'ensemble des fichiers des étudiants
- */
- private AbstractAction actEvaluate = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
- putValue( Action.NAME, "Evaluer les fichiers" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/evaluatemini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_E );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer les fichiers (CTRL+E)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK) );
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
-// Thread t2 = new Thread(new evaluerLesFichiersEtudiants(txtpnmessages));
-// t2.start();
- }
- };
-
-
- /**
- * Ouvre et affiche un fichier XML
- */
- private AbstractAction actOpen = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
- putValue( Action.NAME, "Ouvrir un nouveau fichier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalysemini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
- putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK) );
- }
-
- @Override
- public void actionPerformed( ActionEvent e ) {
- new filechooserXML();
- refreshLabel();
- System.out.println( "Open" );
- }
- };
-
-
-
-
- /**
- * Sélectionne le dossier courant contenant les fichiers des étudiants
- */
- private AbstractAction actSelectFolder = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/open.png")));
- putValue( Action.NAME, "Dossier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/openmini.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U );
- putValue( Action.SHORT_DESCRIPTION, "Dossier d'analyse (CTRL+U)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK) );
- }
-
- @Override
- public void actionPerformed( ActionEvent e ) {
- JFileChooser chooser = new JFileChooser();
-
- chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
- chooser.setDialogTitle("Sélectionner le dossier contenant les fichiers des étudiants.");
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- chooser.setAcceptAllFileFilterUsed(false);
-
- if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
- System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
- System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
- calc.commandes.path = chooser.getSelectedFile().getAbsolutePath();
- } else {
- System.out.println("No Selection ");
- }
-
- refreshLabel();
- }
- };
-
- /**
-
- /**
- * Verification
- */
- private AbstractAction actVerifHistorique = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
- {
- putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
- putValue( Action.NAME, "Evaluer l'historique des modification" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/verifhistoriquemini.png")));
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_H );
- putValue( Action.SHORT_DESCRIPTION, "Evaluer l'historique des modification (CTRL+H)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_H, InputEvent.CTRL_DOWN_MASK) );
- }
- @Override
- public void actionPerformed( ActionEvent e ) {
- calc.commandes.verifHisto = true;
- calc.commandes.analyse = false;
- if(!calc.commandes.path.isEmpty()) {
- }else {
- txtpnmessages.setText("*** Veuillez sélectionner un dossier d'analyse. ***");
- }
- calc.commandes.verifHisto = false;
- }
- };
-
-
-
-
-
-
-// /**
-// * Gènère un nouveau fichier d'analyse à partir d'un fichier ODF
-// */
-// private AbstractAction actNewFichierAnalyse = new AbstractAction() {
-//
-// private static final long serialVersionUID = 1L;
-//
-// {
-// putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierODF.png")));
-// putValue( Action.NAME, "Génère un nouveau fichier d'analyse" );
-// putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierODFmini.png")) );
-// putValue( Action.MNEMONIC_KEY, KeyEvent.VK_N );
-// putValue( Action.SHORT_DESCRIPTION, "Générer un nouveau fichier d'analyse (CTRL+N)" );
-// putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK) );
-// }
-//
-// @Override
-// public void actionPerformed( ActionEvent e ) {
-// JFileChooser chooser = new JFileChooser();
-// chooser.setDialogTitle("Choisir un fichier ODF");
-//
-// chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
-// chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
-// FileNameExtensionFilter filter = new FileNameExtensionFilter("Format ODF", "odt");
-// chooser.setFileFilter(filter);
-// chooser.setAcceptAllFileFilterUsed(true);
-//
-// if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
-// System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
-// System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
-// calc.commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
-// calc.commandes.PathFilenameAnalysis = chooser.getSelectedFile().getAbsolutePath();
-// calc.commandes.nameSujet = chooser.getSelectedFile().getName();
-//
-// Run b = null;
-// try {
-// b = new Run(calc.commandes.PathFilenameAnalysis);
-// nodeAC nodSujet = Run.XMLContent(b.getLectDossiers().getEC().getListeContentWriter().get(0));
-//
-// nodSujet.supprimeTousLesNodesEnfantWithThisName("text:change-start"); //historique des modification
-// nodSujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
-//
-// calc.commandes.sujetSauvegarde = nodSujet.clone();
-//
-// nodSujet = meptl.LectureFichierEtudiantSousFormeDeNode(nodSujet,b,0);
-// nodSujet.getAttributs().put("analysis_filename","sujet.xml");
-// nodSujet = ecritureSujet.nodePourEcritureSujet(nodSujet,b,0);
-// Run.ecritureNodeEnXML(nodSujet, "sujet",calc.commandes.path,"Sujet");
-// txtpnmessages.setContentType("text/plain");
-// txtpnmessages.setText(Run.ecritureNode(nodSujet, 0).toString()
-// + "\n\n"
-// +"\n*************************"
-// +"\nLe fichier sujet.xml a été généré dans le dossier :"
-// +"\n" + calc.commandes.path
-// +"\n*************************");
-// calc.commandes.sujet = nodSujet;
-// new verificationFichierAnalyse();
-//
-// } catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
-// e1.printStackTrace();
-// }
-//
-// } else {
-// calc.commandes.nameSujet = "";
-// calc.commandes.PathFilenameAnalysis = "";
-// System.out.println("No Selection ");
-// calc.commandes.fichierAnalyseValide=false;
-// refreshLabel();
-// }
-//
-//
-// calc.commandes.ecritCode = true;
-// }
-// };
-
-
-
- /**
- * Information sur le fichier d'analyse
- */
- private AbstractAction actAboutFichierAnalyse = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Informations du fichier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo2mini.png")));
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_K );
- putValue( Action.SHORT_DESCRIPTION, "Informations du fichier d'analyse (CTRL+K)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_K, InputEvent.CTRL_DOWN_MASK) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- if(calc.commandes.fichierAnalyseValide) {
- txtpnmessages.afficheChargementFichierAnalyse();
- }else {
- txtpnmessages.setText(baliseStyle.balise() + "*** Veuillez charger un fichier d'analyse *** ");
- }
-
-
- System.out.println( "Refresh Labels and texts" );
- }
- };
-
- /**
- * Quitter l'application
- */
- private AbstractAction actExit = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Quitter" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/exitmini.png")));
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/exit.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_Q );
- putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- dispose();
- }
- }
- };
-
- /**
- * Enregistre L'évaluation
- */
- private AbstractAction actSave = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Enregistrer la zone de texte" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/savemini.png")));
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
- putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte (CRTL+S)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
-
-
-
- }
- };
-
- /**
- * Enregistre sous l'évaluation
- */
- private AbstractAction actSaveas = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Enregistrer la zone de texte sous ..." );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/saveasmini.png")));
- putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte sous ..." );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
-
-
-
- }
- };
-
- /**
- *
- */
- @SuppressWarnings("unused")
- private AbstractAction actSavePreference = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Enregistrer prefrences" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/savepreferencemini.png")) );
- putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/savepreference.png")) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_W );
- putValue( Action.SHORT_DESCRIPTION, "Enregistrer prefrences" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.ALT_DOWN_MASK) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- if(calc.commandes.fichierAnalyseValide) {
-
- }else {
- JOptionPane.showMessageDialog(null, "Charger un fichier Writer (.odt) ou un fichier d'évaluaton (.xml).");
- }
- System.out.println( "Configuration" );
- }
- };
-
-
-
- /**
- * Affiche les tutoriels sur Youtube
- */
- private AbstractAction actTutoriels = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Tutoriels" );
- putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/tutorielmini.png")));
- putValue(Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/tutoriel.png")));
- putValue( Action.SHORT_DESCRIPTION, "Tutoriels" );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- try {
- String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
- java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
- }
- catch (java.io.IOException e1) {
- System.out.println(e1.getMessage());
- }
- System.out.println( "Affiche les tutoriels." );
- }
- };
-
-
-
-
-
- /**
- * Affiche le code XMl du fichier d'analyse
- */
- private AbstractAction actModifierFichierAnalyse = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Modifier le fichier d'analyse" );
- putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModifmini.png")) );
- putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_M );
- putValue( Action.SHORT_DESCRIPTION, "Modifier le fichier d'analyse (CTRL+M)" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- create.getInstance();
- dispose();
- }
- };
-
-
-
-
-// /**
-// * Permet l'évaluation des fichiers des étudaints.
-// * @throws ParserConfigurationException
-// * @throws SAXException
-// * @throws IOException
-// * @throws CloneNotSupportedException
-// */
-// private void evaluerLesFichiersEtudiants() throws ParserConfigurationException, SAXException, IOException, CloneNotSupportedException {
-//
-// calc.commandes.analyse=true;
-// progressBarre.setVisible(true);
-//
-// if(chckbxfichiersEtudaints.isSelected()) calc.commandes.fichierStudentMoodle=true;
-// if(chckbxZipfeedback.isSelected()) calc.commandes.zipfeedback=true;
-// if(chckbxnoFeedback.isSelected()) calc.commandes.sansFeeback=true;
-// if(chckbxNoNote.isSelected()) calc.commandes.noNote=true;
-// if(chckCSVNotes.isSelected()) calc.commandes.ecritNoteCSV=true;
-// if(chckbxNewLogo.isSelected()) calc.commandes.newLogo=true;
-// if(chckbxNoLogo.isSelected()) calc.commandes.noLogo = true;
-// if(chckbxVerif.isSelected()) calc.commandes.verifHisto2 = true;
-//
-// meptl.analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV();
-//
-// txtpnmessages.setText(calc.commandes.message.toString());
-//
-//
-// }
-
-
-
-
-
-}
-
-
-
-
-
-
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/filechooserXML.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/filechooserXML.java
deleted file mode 100644
index 7b40b75..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/filechooserXML.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package fenetres;
-
-import java.awt.Dimension;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-
-import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-import javax.swing.filechooser.FileNameExtensionFilter;
-
-import calc.commandes;
-import nodeAC.constructionNodeAvecString;
-
-
-public class filechooserXML extends JFileChooser {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
-
- public filechooserXML() {
- setDialogTitle("Choisir un fichier d'analyse");
-
- FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichier d'analyse .XML", "xml");
- setFileFilter(filter);
-
- if(!calc.commandes.PathFilenameAnalysis.isEmpty()) {
- File file = new File(calc.commandes.PathFilenameAnalysis ); //+ "\\" + utils.filename + ".xml"
- setCurrentDirectory(file);
- }
-
-
- setPreferredSize(new Dimension(550, 420));
-
- int response = showOpenDialog(null);
- if(response == JFileChooser.APPROVE_OPTION) {
- calc.commandes.initialiseCommandes();
-
- File file = new File(getSelectedFile().getAbsolutePath());
- System.out.println(file.getPath() + "\n" + file.getName());
- String ext = file.getName().substring(file.getName().lastIndexOf("."));
-
- if(ext.equals(".xml")){
- openFileXML(file);
- }
- }
- }
-
-
-
-
- private void openFileXML(File file) {
- calc.commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("\\"));
- calc.commandes.PathFilenameAnalysis = getCurrentDirectory().getPath();
- calc.commandes.nameSujet = file.getName().toString();
-
- BufferedReader br;
- try {
- br = new BufferedReader(
- new InputStreamReader(
- new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
- String line;
- StringBuilder targetString = new StringBuilder();
- while ((line = br.readLine()) != null) {
- targetString.append(line);
- }
-
- //node.node2(targetString);
- constructionNodeAvecString A = new constructionNodeAvecString();
- commandes.sujet = A.NewNode(targetString.toString().replace("\t","").replace("\r", "").replace("\n", ""));
-
- calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
-
-
- // Vérification de la conformité du fichier d'analyse
- if(!fichierSujetValide()) JOptionPane.showMessageDialog(null, "Le fichier d'analyse n'est pas valide.");
-
- //Chargement des paramètres du fichier d'analyse
-// meptl.chargementParametresFichierAnalyse();
-
- // Rechercher des erreurs dans le fichier d'analyse
-// new verificationFichierAnalyse();
-
-
- } catch (UnsupportedEncodingException e1) {
- e1.printStackTrace();
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- } catch (Exception e) {
- }
-
- }
-
-
- /**
- * Verification rapide du fichier.
- * @return
- */
- public static boolean fichierSujetValide () {
- if(calc.commandes.sujet==null) {System.out.println("Le fichier est null."); return false;}
- if(!calc.commandes.sujet.getNomElt().equals("classeur")) {System.out.println("Ce n'est pas un classeur."); calc.commandes.fichierAnalyseValide=true; return false;}
- calc.commandes.fichierAnalyseValide=false;
- return true;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/mainApp.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/mainApp.java
deleted file mode 100644
index 68497b9..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/mainApp.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package fenetres;
-
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.SwingConstants;
-
-import java.awt.SystemColor;
-
-public class mainApp extends JFrame implements ActionListener{
-
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- private JFrame frmEvalwriter;
-
- JButton btnCreate;
- JButton actCharge;
-
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- try {
- mainApp window = new mainApp();
- window.frmEvalwriter.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Create the application.
- */
- public mainApp() {
- initialize();
- }
-
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
-
-
- frmEvalwriter = new JFrame();
- frmEvalwriter.setResizable(false);
- frmEvalwriter.setTitle(calc.commandes.Titre);
- frmEvalwriter.setBounds(100, 100, 500, 380);
- 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);
-
- frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- frmEvalwriter.getContentPane().setLayout(null);
- ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
- frmEvalwriter.setIconImage(img.getImage());
-
- btnCreate = new JButton("Créer ou modifier un fichier d'analyse");
- 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.setBounds(34, 180, 420, 60);
- frmEvalwriter.getContentPane().add(btnCreate);
-
- actCharge = new JButton("Evaluer les fichiers des étudiants");
- actCharge.setHorizontalAlignment(SwingConstants.LEFT);
- actCharge.setIcon(new ImageIcon(mainApp.class.getResource("/resources/evaluate.png")));
- actCharge.setBackground(SystemColor.inactiveCaption);
- actCharge.addActionListener(this);
- actCharge.setFont(new Font("Arial", Font.BOLD, 16));
- actCharge.setBounds(34, 110, 420, 60);
- frmEvalwriter.getContentPane().add(actCharge);
-
- JLabel lblNewLabel = new JLabel();
- lblNewLabel.setIcon(new ImageIcon(mainApp.class.getResource("/resources/accueilanalysecalc.png")));
- lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
- lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
- lblNewLabel.setBounds(33, 25, 421, 74);
- frmEvalwriter.getContentPane().add(lblNewLabel);
-
- JButton btnNewButton = new JButton("Version & Documentation");
- btnNewButton.setHorizontalAlignment(SwingConstants.LEFT);
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- about.getInstance();
- }
- });
- btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14));
- btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
- btnNewButton.setBounds(34, 270, 200, 60);
- frmEvalwriter.getContentPane().add(btnNewButton);
-
- JButton btnTutoriels = new JButton("Tutoriels");
- btnTutoriels.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
- java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
- }
- catch (java.io.IOException e1) {
- System.out.println(e1.getMessage());
- }
- System.out.println( "Affiche les tutoriels." );
- }
- });
- btnTutoriels.setIcon(new ImageIcon(mainApp.class.getResource("/resources/tutoriel.png")));
- btnTutoriels.setHorizontalAlignment(SwingConstants.LEFT);
- btnTutoriels.setFont(new Font("Arial", Font.PLAIN, 14));
- btnTutoriels.setBounds(254, 270, 200, 60);
- frmEvalwriter.getContentPane().add(btnTutoriels);
- }
-
-
- @Override
- public void actionPerformed(ActionEvent e) {
- if(e.getSource()==btnCreate) {
- create.getInstance();
- frmEvalwriter.dispose();
- }
-
- if(e.getSource()==actCharge) {
- new evaluate();
- frmEvalwriter.dispose();
- }
-
- }
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/proprieteFichierAnalyse.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/proprieteFichierAnalyse.java
deleted file mode 100644
index f1ea2d9..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/proprieteFichierAnalyse.java
+++ /dev/null
@@ -1,606 +0,0 @@
-package fenetres;
-
-
-import java.awt.Font;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-
-import calcul.calculNotesProgression;
-import calcul.formatDateWriter;
-import net.miginfocom.swing.MigLayout;
-
-public final class proprieteFichierAnalyse extends JFrame {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private JPanel contentPane;
- private JTextField textFieldTitre;
- private JTextField textFieldAuteur;
- private JTextField textFieldMetaSujet;
- private JTextField textFieldNoteFrom;
- private JTextField textFieldProgression;
- private JTextField textFieldDateCreation;
- private JComboBox comboBoxPresenceMetaSujet;
- private JComboBox comboBoxBaremeABC;
- private JComboBox comboBoxhistoriquePresent;
- private JComboBox comboBoxcontrole_Initial_Creator;
- private JComboBox comboBoxcontroleDateCreation;
- private JLabel lblNewLabel_8;
- private JLabel lblNewLabel_9;
- private JTextField textFieldInitial_Creator;
- private JLabel lblNewLabel_10;
- private JLabel lblNewLabel_11;
- private JTextField textFieldlink_help;
- private JLabel lblNewLabel_12;
- private JTextField textFieldlink_sujet;
- private JButton btnAideTitre;
- private JButton btnAideAuteur;
- private JButton btnAideMetaSujet;
- private JButton btnAidePresenceMetaSujet;
- private JButton btnAideBaremeABC;
- private JButton btnAideNoteFrom;
- private JButton btnAideProgression;
- private JButton btnAideHistoriquePresent;
- private JButton btnAideDateCreation;
- private JButton btnAideControleDateCreation;
- private JButton btnAideInitial_Creator;
- private JButton btnAidecontrole_Initial_Creator;
- private JButton btnVoirBaremeABC;
- private JButton btnVoirBaremeNumeric;
- private static proprieteFichierAnalyse instance;
-
-
- /**
- * Create the frame.
- */
- public proprieteFichierAnalyse() {
- setIconImage(Toolkit.getDefaultToolkit().getImage(proprieteFichierAnalyse.class.getResource("/resources/evalwriter.ico")));
- setBounds(0, 0, 630, 639);
- setResizable(false);
- setTitle("Propriété du fichier d'analyse");
- setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- 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);
-
- contentPane = new JPanel();
- contentPane.setBorder(null);
- setContentPane(contentPane);
- contentPane.setLayout(new MigLayout("", "[260px][260px][10,grow 20]", "[18px][18px][18px][30px][18px][18px][18px][30px][45px][18px][18px][18px][][][][18px:24px:48px,grow]"));
-
- JLabel lblNewLabel = new JLabel("Titre de l'exercice");
- lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel, "cell 0 0,alignx left,aligny center");
-
- textFieldTitre = new JTextField();
- textFieldTitre.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldTitre, "cell 1 0,grow");
- textFieldTitre.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("titre")!=null){
- textFieldTitre.setText(calc.commandes.sujet.getAttributs().get("titre"));
- }
-
- btnAideTitre = new JButton("");
- btnAideTitre.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Le titre de l'exercice apparaît dans les feedbacks des étudiants.");
- }
- });
- btnAideTitre.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideTitre, "cell 2 0");
-
- JLabel lblNewLabel_1 = new JLabel("Auteur");
- lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_1, "cell 0 1,alignx left,aligny center");
-
- textFieldAuteur = new JTextField();
- textFieldAuteur.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldAuteur, "cell 1 1,grow");
- textFieldAuteur.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("auteur")!=null){
- textFieldAuteur.setText(calc.commandes.sujet.getAttributs().get("auteur"));
- }
-
- btnAideAuteur = new JButton("");
- btnAideAuteur.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "L'auteur de l'exercice apparaît dans les feedbacks des étudiants.");
- }
- });
- btnAideAuteur.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideAuteur, "cell 2 1");
-
- JLabel lblNewLabel_2 = new JLabel("metaSujet");
- lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_2, "cell 0 2,alignx left,aligny center");
-
- textFieldMetaSujet = new JTextField();
- textFieldMetaSujet.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldMetaSujet, "cell 1 2,grow");
- textFieldMetaSujet.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("metaSujet")!=null){
- textFieldMetaSujet.setText(calc.commandes.sujet.getAttributs().get("metaSujet"));
- }
-
- btnAideMetaSujet = new JButton("");
- btnAideMetaSujet.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "La propriété personnalisé Sujet apparaît dans les feedbacks. "
- + "Elle est placée sous la note des étudiants. "
- + "Si la donnée personnalisé Sujet dans les fichiers des étudiants est présente, "
- + "alors il peut y avoir comparaison avec cet valeur (voir la valeur logique suivante).");
- }
- });
- btnAideMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideMetaSujet, "cell 2 2");
-
- JLabel lblNewLabel_3 = new JLabel("Propriété personnalisé Sujet obligatoire dans les fichiers des étudiants.
" );
- lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_3, "cell 0 3,alignx left,aligny center");
-
- comboBoxPresenceMetaSujet = new JComboBox();
- comboBoxPresenceMetaSujet.setFont(new Font("Tahoma", Font.BOLD, 12));
- comboBoxPresenceMetaSujet.setModel(new DefaultComboBoxModel(new String[] {"false", "true"}));
- contentPane.add(comboBoxPresenceMetaSujet, "cell 1 3,growx,aligny top");
- if(calc.commandes.sujet.getAttributs().get("presenceMetaSujet")!=null){
- comboBoxPresenceMetaSujet.setSelectedItem(calc.commandes.sujet.getAttributs().get("presenceMetaSujet").toLowerCase());
- }
-
- btnAidePresenceMetaSujet = new JButton("");
- btnAidePresenceMetaSujet.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Si la donnée personnalisé Sujet dans les fichiers des étudiants ne correspond pas, "
- + "Ã la valeur au-dessus alors le fichier n'est pas le fichier du sujet. "
- + "La note de l'étudiant sera nulle."
- + " L'étudiant doit utiliser le fichier remis par l'enseignant. "
- + "Cette technique peut être utilisée durant les contrôles. ");
- }
- });
- btnAidePresenceMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAidePresenceMetaSujet, "cell 2 3");
-
- JLabel lblNewLabel_4 = new JLabel("Barème alphabétique ABCDE");
- lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_4, "cell 0 4,alignx left");
-
- comboBoxBaremeABC = new JComboBox();
- comboBoxBaremeABC.setModel(new DefaultComboBoxModel(new String[] {"false", "true"}));
- comboBoxBaremeABC.setFont(new Font("Tahoma", Font.BOLD, 12));
- contentPane.add(comboBoxBaremeABC, "cell 1 4,growx");
- if(calc.commandes.sujet.getAttributs().get("baremeABC")!=null){
- comboBoxBaremeABC.setSelectedItem(calc.commandes.sujet.getAttributs().get("baremeABC").toLowerCase());
- }
-
- btnAideBaremeABC = new JButton("");
- btnAideBaremeABC.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showMessageDialog(null, "Permet d'utiliser une notation alphabétique à 5 niveaux (de A à E). "
- + "Si le coefficient de progression est de 1 alors la largeur des intervalles est de 20%.");
- }
- });
- btnAideBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideBaremeABC, "flowx,cell 2 4");
-
-
-
- JLabel lblNoteFrom = new JLabel("Barème");
- lblNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNoteFrom, "cell 0 5,alignx left");
-
- textFieldNoteFrom = new JTextField();
- textFieldNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldNoteFrom, "cell 1 5,growx");
- textFieldNoteFrom.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("bareme")!=null){
- textFieldNoteFrom.setText(calc.commandes.sujet.getAttributs().get("bareme"));
- }
-
- btnAideNoteFrom = new JButton("");
- btnAideNoteFrom.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showMessageDialog(null, "La notation par défaut est numérique. "
- + "La note maximale est par défaut de 20 points. "
- + "La note maximale doit être une valeur supérieur strictement 0 point. "
- + "Si le coefficient de progression est de 1 alors un exercice à 50% correct "
- + "aura la note (maximale/2).");
- }
- });
- btnAideNoteFrom.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideNoteFrom, "flowx,cell 2 5");
-
- JLabel lblNewLabel_5 = new JLabel("Coef. de progression");
- lblNewLabel_5.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_5, "cell 0 6,alignx left");
-
- textFieldProgression = new JTextField();
- contentPane.add(textFieldProgression, "cell 1 6,growx");
- textFieldProgression.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("progression")!=null){
- textFieldProgression.setText(calc.commandes.sujet.getAttributs().get("progression"));
- }
-
- btnAideProgression = new JButton("");
- btnAideProgression.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showMessageDialog(null, "Le coefficient de progression permet de régler la difficulté de l'exercice. "
- + "Le coefficient de progression d'affiche dans les feedbacks des étudiants. "
- + "Le coefficient de progression doit être compris entre ]0 et 10[. "
- + " Un coef. inférieur à 1 signifie qu'il est facile d'atteindre la note maximale "
- + " Un coef. supérieur à 1 signifie qu'il est difficile d'atteindre la note maximale.");
- }
- });
- btnAideProgression.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideProgression, "cell 2 6");
-
- JLabel lblNewLabel_6 = new JLabel("Le suivi des modifications activé dans les fichiers des étudiants.");
- lblNewLabel_6.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_6, "cell 0 7,alignx left");
-
- comboBoxhistoriquePresent = new JComboBox();
- comboBoxhistoriquePresent.setModel(new DefaultComboBoxModel(new String[] {"false", "true"}));
- comboBoxhistoriquePresent.setFont(new Font("Tahoma", Font.BOLD, 12));
- contentPane.add(comboBoxhistoriquePresent, "cell 1 7,growx,aligny top");
- if(calc.commandes.sujet.getAttributs().get("historiquePresent")!=null){
- comboBoxhistoriquePresent.setSelectedItem(calc.commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
- }
-
- btnAideHistoriquePresent = new JButton("");
- btnAideHistoriquePresent.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Si VRAI alors le suivi des modifications doit être activé dans les fichiers des étudiants. "
- + "Si ce n'est pas le cas alors l'étudiant aura une note nulle. "
- + "L'étudiant doit utiliser le fichier remis par l'enseignant. "
- + "L'enseignant aura activé le suivi des modifications et protégé le suivi par un mot de passe. "
- + "Cette technique peut être utilisée durant les contrôles. "
- + "Elle permettra de rechercher les fichiers échangés entre les étudiants en comparant les modifications.");
- }
- });
- btnAideHistoriquePresent.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideHistoriquePresent, "cell 2 7");
-
-
- JLabel lblNewLabel_7 = new JLabel("Date de création du fichier transmis aux étudiants.");
- lblNewLabel_7.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_7, "cell 0 8,alignx left");
-
- textFieldDateCreation = new JTextField();
- textFieldDateCreation.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldDateCreation, "cell 1 8,growx");
- textFieldDateCreation.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("creationDate")!=null){
- textFieldDateCreation.setText(calc.commandes.sujet.getAttributs().get("creationDate"));
- }
-
- btnAideDateCreation = new JButton("");
- btnAideDateCreation.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Ne modifier pas cette date. "
- + "Sauf, si vous avez remis aux étudiants un nouveau fichier avec une autre date de création. "
- + "Exemple de format 2019-12-25T15:50:45.");
- }
- });
- btnAideDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideDateCreation, "cell 2 8");
-
- lblNewLabel_8 = new JLabel("La date de création dans les fichers des étudiants doit être le même que celui du fichier fourni.");
- lblNewLabel_8.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_8, "cell 0 9,alignx trailing");
-
- comboBoxcontroleDateCreation = new JComboBox();
- comboBoxcontroleDateCreation.setModel(new DefaultComboBoxModel(new String[] {"false", "true"}));
- comboBoxcontroleDateCreation.setFont(new Font("Tahoma", Font.BOLD, 12));
- contentPane.add(comboBoxcontroleDateCreation, "cell 1 9,growx,aligny top");
- if(calc.commandes.sujet.getAttributs().get("controleDateCreation")!=null){
- comboBoxcontroleDateCreation.setSelectedItem(calc.commandes.sujet.getAttributs().get("controleDateCreation").toLowerCase());
- }
-
- btnAideControleDateCreation = new JButton("");
- btnAideControleDateCreation.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Si VRAI alors la date de création du fichier de l'étudiant doit être identique à celle-ci. "
- + "Si ce n'est pas le cas alors l'étudiant aura une note nulle. "
- + "L'étudiant doit utiliser le fichier remis par l'enseignant. "
- + "Cette technique peut être utilisée durant les contrôles. "
- + "Elle permettra de rechercher les fichiers réïnitialisés pour effacer l'historique.");
- }
- });
- btnAideControleDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideControleDateCreation, "cell 2 9,aligny top");
-
- lblNewLabel_9 = new JLabel("Auteur du fichier fourni aux étudiants.");
- lblNewLabel_9.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_9, "cell 0 10,alignx left");
-
- textFieldInitial_Creator = new JTextField();
- textFieldInitial_Creator.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldInitial_Creator, "cell 1 10,growx");
- textFieldInitial_Creator.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("Initial_Creator")!=null){
- textFieldInitial_Creator.setText(calc.commandes.sujet.getAttributs().get("Initial_Creator"));
- }
-
- btnAideInitial_Creator = new JButton("");
- btnAideInitial_Creator.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Le premier auteur du fichier (créateur). "
- + "Ne modifier pas, sauf si vous avez fourni un nouveau fichier aux étudiants avec un autre créateur.");
- }
- });
- btnAideInitial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAideInitial_Creator, "cell 2 10");
-
- lblNewLabel_10 = new JLabel("L'auteur des fichiers des étudiants doit être celui du fichier fourni.");
- lblNewLabel_10.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_10, "cell 0 11,alignx trailing");
-
- comboBoxcontrole_Initial_Creator = new JComboBox();
- comboBoxcontrole_Initial_Creator.setModel(new DefaultComboBoxModel(new String[] {"false", "true"}));
- comboBoxcontrole_Initial_Creator.setFont(new Font("Tahoma", Font.BOLD, 12));
- contentPane.add(comboBoxcontrole_Initial_Creator, "cell 1 11,growx,aligny top");
- if(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator")!=null){
- comboBoxcontrole_Initial_Creator.setSelectedItem(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator").toLowerCase());
- }
-
- btnAidecontrole_Initial_Creator = new JButton("");
- btnAidecontrole_Initial_Creator.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JOptionPane.showInternalMessageDialog(null, "Si vrai alors le créateur du fichier des étudiants doit correspondre avec cet auteur. "
- + "Si ce n'est pas le cas, l'étudiant aura une note nulle. "
- + "Cette technique peut être utilisée pour les contrôles.");
- }
- });
- btnAidecontrole_Initial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
- contentPane.add(btnAidecontrole_Initial_Creator, "cell 2 11");
-
- lblNewLabel_11 = new JLabel("Lien URL de l'aide");
- lblNewLabel_11.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_11, "cell 0 12,alignx left");
-
- textFieldlink_help = new JTextField();
- textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textFieldlink_help, "cell 1 12,growx");
- textFieldlink_help.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("link_help")!=null){
- textFieldlink_help.setText(calc.commandes.sujet.getAttributs().get("link_help"));
- }
-
- lblNewLabel_12 = new JLabel("Lien URL du sujet");
- lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_12, "cell 0 13,alignx left");
-
- textFieldlink_sujet = new JTextField();
- contentPane.add(textFieldlink_sujet, "cell 1 13,growx");
- textFieldlink_sujet.setColumns(10);
- if(calc.commandes.sujet.getAttributs().get("link_sujet")!=null){
- textFieldlink_sujet.setText(calc.commandes.sujet.getAttributs().get("link_sujet"));
- }
-
- btnVoirBaremeABC = new JButton("");
- btnVoirBaremeABC.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- double progression = Double.valueOf(textFieldProgression.getText());
- calcul.calculIntervalleBaremeABCDE C = new calcul.calculIntervalleBaremeABCDE(progression);
- JOptionPane.showMessageDialog(null, C.getMessageHTMLColonne());
- }
- });
- btnVoirBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
- contentPane.add(btnVoirBaremeABC, "cell 2 4");
-
- btnVoirBaremeNumeric = new JButton("");
- btnVoirBaremeNumeric.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- double progression = Double.valueOf(textFieldProgression.getText());
- double noteFrom = Double.valueOf(textFieldNoteFrom.getText());
- calculNotesProgression C = new calculNotesProgression(progression,noteFrom);
- JOptionPane.showMessageDialog(null, C.getMessageHTMLColonne());
- }
- });
- btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
- contentPane.add(btnVoirBaremeNumeric, "cell 2 5");
-
- JButton btnNewButton = new JButton("Valide");
- btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(btnNewButton, "cell 1 15,grow");
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
-
-
- if(verifCoefProgression()&&verifBareme()&&formatDateWriter.isCorrect(textFieldDateCreation.getText())) {
- calc.commandes.sujet.getAttributs().put("titre", textFieldTitre.getText() );
- calc.commandes.sujet.getAttributs().put("auteur", textFieldAuteur.getText() );
- calc.commandes.sujet.getAttributs().put("metaSujet", textFieldMetaSujet.getText() );
- calc.commandes.sujet.getAttributs().put("presenceMetaSujet", comboBoxPresenceMetaSujet.getSelectedItem().toString() );
- calc.commandes.sujet.getAttributs().put("baremeABC", comboBoxBaremeABC.getSelectedItem().toString() );
- calc.commandes.sujet.getAttributs().put("bareme", textFieldNoteFrom.getText() );
- calc.commandes.sujet.getAttributs().put("progression", textFieldProgression.getText() );
- calc.commandes.sujet.getAttributs().put("historiquePresent", comboBoxhistoriquePresent.getSelectedItem().toString() );
- calc.commandes.sujet.getAttributs().put("creationDate", textFieldDateCreation.getText() );
- calc.commandes.sujet.getAttributs().put("controleDateCreation", comboBoxcontroleDateCreation.getSelectedItem().toString() );
- calc.commandes.sujet.getAttributs().put("Initial_Creator", textFieldInitial_Creator.getText() );
- calc.commandes.sujet.getAttributs().put("controle_Initial_Creator", comboBoxcontrole_Initial_Creator.getSelectedItem().toString() );
- calc.commandes.sujet.getAttributs().put("link_help", textFieldlink_help.getText() );
- calc.commandes.sujet.getAttributs().put("link_sujet", textFieldlink_sujet.getText() );
-
-// meptl.chargementParametresFichierAnalyse();
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
-
- instance.dispose();
- }
-
-
- }
- });
-
-
-
- comboBoxBaremeABC.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- String resultat = (String) comboBoxBaremeABC.getSelectedItem();
- if(resultat.equals("true")) {
- lblNoteFrom.setEnabled(false);
- textFieldNoteFrom.setEnabled(false);
- textFieldNoteFrom.setEditable(false);
- }else {
- lblNoteFrom.setEnabled(true);
- textFieldNoteFrom.setEnabled(true);
- textFieldNoteFrom.setEditable(true);
- }
- }
- });
-
-
- /**
- * Fermeture de la fenêtre.
- */
- addWindowListener(new java.awt.event.WindowAdapter() {
- @Override
- public void windowClosing(java.awt.event.WindowEvent windowEvent) {
- if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter cette fenêtre?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
- dispose();
- };
- }
- });
-
- Refresh();
- this.setVisible(true);
- }
-
- /**
- * Lorsque le combobox du barème ABC est sélectionner.
- */
- private void Refresh() {
- if(comboBoxBaremeABC.getSelectedItem().equals("true")) {
- textFieldNoteFrom.setEditable(false);
- }else {
- textFieldNoteFrom.setEditable(true);
- }
- }
-
- /**
- * Retourn true si pas d'erreur dans le coefficient de progression
- * @return
- */
- private boolean verifCoefProgression() {
- double progression;
- try {
- progression = Double.valueOf(textFieldProgression.getText());
- }catch (Exception e) {
- JOptionPane.showMessageDialog(null, "Le coef. de progression doit être une valeur numérique.");
- return false;
- }
- if(progression<0) {
- JOptionPane.showMessageDialog(null, "Le coef. de progression doit être positif.");
- return false;
- }
- if(progression>100) {
- JOptionPane.showMessageDialog(null, "Le coef. de progression doit être inférieur strictement à 10.");
- return false;
- }
-
- return true;
- }
-
- /**
- * Retourne true si pas d'erreur dans le barème.
- * @return
- */
- private boolean verifBareme() {
- double bareme;
- try {
- bareme = Double.valueOf(textFieldNoteFrom.getText());
- }catch (Exception e) {
- JOptionPane.showMessageDialog(null, "Le barème doit être une valeur numérique.");
- return false;
- }
- if(bareme<0) {
- JOptionPane.showMessageDialog(null, "Le barème doit être positif.");
- return false;
- }
-
-
- return true;
- }
-
- public static proprieteFichierAnalyse getInstance() {
- if (instance == null) {
- instance = new proprieteFichierAnalyse();
- }
- instance.actualise();
- instance.setVisible(true);
- return instance;
- }
-
-
- public void actualise() {
- if(calc.commandes.sujet.getAttributs().get("titre")!=null){
- textFieldTitre.setText(calc.commandes.sujet.getAttributs().get("titre"));
- }else {
- textFieldTitre.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("auteur")!=null){
- textFieldAuteur.setText(calc.commandes.sujet.getAttributs().get("auteur"));
- }else {
- textFieldAuteur.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("metaSujet")!=null){
- textFieldMetaSujet.setText(calc.commandes.sujet.getAttributs().get("metaSujet"));
- }else {
- textFieldMetaSujet.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("bareme")!=null){
- textFieldNoteFrom.setText(calc.commandes.sujet.getAttributs().get("bareme"));
- }else {
- textFieldNoteFrom.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("progression")!=null){
- textFieldProgression.setText(calc.commandes.sujet.getAttributs().get("progression"));
- }else {
- textFieldProgression.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("creationDate")!=null){
- textFieldDateCreation.setText(calc.commandes.sujet.getAttributs().get("creationDate"));
- }else {
- textFieldDateCreation.setText("");
- }
- if(calc.commandes.sujet.getAttributs().get("presenceMetaSujet")!=null){
- comboBoxPresenceMetaSujet.setSelectedItem(calc.commandes.sujet.getAttributs().get("presenceMetaSujet").toLowerCase());
- }else {
- comboBoxPresenceMetaSujet.setSelectedItem(String.valueOf(calc.commandes.analyse_presenceMetaSujet));
- }
- if(calc.commandes.sujet.getAttributs().get("baremeABC")!=null){
- comboBoxBaremeABC.setSelectedItem(calc.commandes.sujet.getAttributs().get("baremeABC").toLowerCase());
- }else {
- comboBoxBaremeABC.setSelectedItem(String.valueOf(calc.commandes.analyse_baremeABC));
- }
- if(calc.commandes.sujet.getAttributs().get("historiquePresent")!=null){
- comboBoxhistoriquePresent.setSelectedItem(calc.commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
- }else {
- comboBoxhistoriquePresent.setSelectedItem(String.valueOf(calc.commandes.analyse_historiquePresent));
- }
- if(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator")!=null){
- comboBoxcontrole_Initial_Creator.setSelectedItem(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator").toLowerCase());
- }else {
- comboBoxcontrole_Initial_Creator.setSelectedItem(String.valueOf(calc.commandes.analyse_controle_Initial_Creator));
- }
- if(calc.commandes.sujet.getAttributs().get("controleDateCreation")!=null){
- comboBoxcontroleDateCreation.setSelectedItem(calc.commandes.sujet.getAttributs().get("controleDateCreation").toLowerCase());
- }else {
- comboBoxcontroleDateCreation.setSelectedItem(String.valueOf(calc.commandes.analyse_controleDateCreation));
- }
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/setting.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/setting.java
deleted file mode 100644
index 3c8a8d9..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/fenetres/setting.java
+++ /dev/null
@@ -1,1162 +0,0 @@
-package fenetres;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Font;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-import javax.swing.border.EmptyBorder;
-import javax.swing.filechooser.FileNameExtensionFilter;
-
-import nodeAC.Ecriture;
-import nodeAC.constructionNodeAvecString;
-import nodeAC.nodeAC;
-
-public final class setting extends JFrame {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private JPanel contentPane;
- private JTextField textFieldNomEtudiant;
- private JTextField textFieldPrenomEtudiant;
- private JTextField textFieldEmail;
- private JTextField textFieldIDEtudiant;
- private JComboBox comboBoxSeparateur;
- private JComboBox comboBoxEncodage;
- private JButton btnValiderModifications;
- private JButton btnReinit;
- private JButton btnTestCouleur;
- private JTextField textFieldSize;
- private JTextField textFieldNameZIP;
- private JTextField textFieldMiniCorrespondance;
- private JTextField textFieldNbrMiniModification;
- private JTextField textFieldMaxiModificationSimul;
- private JTextField textFieldTextSimilitude;
- private JTextField textFieldRouge;
- private JTextField textFieldVert;
- private JTextField textFieldBleu;
- private JTextField textFieldTestCouleur;
- private JButton btnExtraire;
-
- private static setting instance;
-
- // Bouton couleur de test
- JButton btnCouleurInitTest;
- JButton btnRougeMax;
- JButton btnRougeMini;
- JButton btnVertMax;
- JButton btnVertMini;
- JButton btnBleuMini;
- JButton btnBleuMax;
- JButton btnCouleurMiniTotal;
- JButton btnCouleurMaxiTotal;
- JButton btnAjouterVosTraductions;
-
- /**
- * Create the frame.
- */
- public setting() {
- setResizable(false);
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setBounds(100, 100, 742, 642);
- contentPane = new JPanel();
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- contentPane.setLayout(new BorderLayout(0, 0));
- setContentPane(contentPane);
-
- JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
- contentPane.add(tabbedPane, BorderLayout.CENTER);
-
- ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
- setIconImage(img.getImage());
- setTitle(calc.commandes.Titre + calc.commandes.version + " - Les paramètres pour l'évaluation");
- setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- 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);
-
- ImageIcon img1 = new ImageIcon(getClass().getResource("/resources/fichierCSV.png") );
- ImageIcon img2 = new ImageIcon(getClass().getResource("/resources/zip.png") );
- ImageIcon img3 = new ImageIcon(getClass().getResource("/resources/triche.png") );
- ImageIcon img4 = new ImageIcon(getClass().getResource("/resources/similitude.png") );
- ImageIcon img5 = new ImageIcon(getClass().getResource("/resources/couleur.png") );
- ImageIcon img6 = new ImageIcon(getClass().getResource("/resources/traduction.png") );
-
-
- //*********************************************************
- //** CSV **
- //*********************************************************
- JPanel panelCSV = new JPanel();
- tabbedPane.addTab("CSV", img1, panelCSV, null);
- panelCSV.setLayout(null);
-
- nodeAC nodCSV = calc.commandes.sujet.retourneFirstEnfantsByName("csv");
- if(nodCSV==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC csv n'est pas dans le fichier.");
- dispose();
- return;
- }
-
- JLabel lblNewLabel = new JLabel("Les paramètres du fichier CSV permettent, d'écrire et d'importer les notes des étudiants dans le CMS moodle. \r\nCes paramètres seront enregistrés dans le fichier d'analyse.");
- lblNewLabel.setVerticalAlignment(SwingConstants.TOP);
- lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
- lblNewLabel.setBounds(10, 10, 691, 46);
- panelCSV.add(lblNewLabel);
-
- JLabel lblEncodage = new JLabel("Encodage");
- lblEncodage.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblEncodage.setBounds(42, 74, 86, 20);
- panelCSV.add(lblEncodage);
-
- comboBoxEncodage = new JComboBox();
- comboBoxEncodage.setModel(new DefaultComboBoxModel(new String[] {"UTF-8", "US-ASCII", "ISO-8859-1", "UTF-16BE", "UTF-16LE", "UTF-16"}));
- comboBoxEncodage.setSelectedItem(nodCSV.getAttributs().get("encoding"));
- comboBoxEncodage.setBounds(138, 74, 159, 22);
- panelCSV.add(comboBoxEncodage);
-
- JLabel lblSeparateur = new JLabel("Séparateur");
- lblSeparateur.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblSeparateur.setBounds(370, 74, 86, 20);
- panelCSV.add(lblSeparateur);
-
- comboBoxSeparateur = new JComboBox();
- comboBoxSeparateur.setModel(new DefaultComboBoxModel(new String[] {"point virgule", "virgule", "espace", "tabulation", ""}));
- if(nodCSV.getAttributs().get("separator").equals(";")) comboBoxSeparateur.setSelectedItem("point virgule");
- if(nodCSV.getAttributs().get("separator").equals(",")) comboBoxSeparateur.setSelectedItem("virgule");
- if(nodCSV.getAttributs().get("separator").equals(" ")) comboBoxSeparateur.setSelectedItem("espace");
- if(nodCSV.getAttributs().get("separator").equals("\t")) comboBoxSeparateur.setSelectedItem("tabulation");
- comboBoxSeparateur.setBounds(457, 74, 159, 22);
- panelCSV.add(comboBoxSeparateur);
-
- JLabel lblveuillezSaisirLes = new JLabel("Veuillez saisir des quatre noms des champs. \r\nSi vous exportez le fichier depuis moodle, faite correspondre les noms des 4 champs ci-dessous avec celui de votre fichier.");
- lblveuillezSaisirLes.setVerticalAlignment(SwingConstants.TOP);
- lblveuillezSaisirLes.setHorizontalAlignment(SwingConstants.LEFT);
- lblveuillezSaisirLes.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lblveuillezSaisirLes.setBounds(10, 120, 691, 60);
- panelCSV.add(lblveuillezSaisirLes);
-
- JLabel lblNewLabel_3 = new JLabel("Champ, nom de l'étudiant");
- lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_3.setBounds(42, 210, 186, 20);
- panelCSV.add(lblNewLabel_3);
-
- nodeAC nodImportMoodle = nodCSV.retourneFirstEnfantsByName("import_moodle");
- if(nodImportMoodle==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. le nodeAC import_moodle n'est pas dans le fichier d'analyse.");
- }
-
- textFieldNomEtudiant = new JTextField();
- textFieldNomEtudiant.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldNomEtudiant.setColumns(10);
- textFieldNomEtudiant.setBounds(233, 210, 200, 22);
- textFieldNomEtudiant.setText(nodImportMoodle.getAttributs().get("name"));
- panelCSV.add(textFieldNomEtudiant);
-
-
- JLabel lblNewLabel_3_1 = new JLabel("Champ, prénom de l'étudiant");
- lblNewLabel_3_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_3_1.setBounds(42, 260, 186, 20);
- panelCSV.add(lblNewLabel_3_1);
-
- textFieldPrenomEtudiant = new JTextField();
- textFieldPrenomEtudiant.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldPrenomEtudiant.setColumns(10);
- textFieldPrenomEtudiant.setBounds(233, 260, 200, 22);
- textFieldPrenomEtudiant.setText(nodImportMoodle.getAttributs().get("firstname"));
- panelCSV.add(textFieldPrenomEtudiant);
-
- JLabel lblNewLabel_3_1_1 = new JLabel("Champ, email de l'étudiant");
- lblNewLabel_3_1_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_3_1_1.setBounds(42, 310, 186, 20);
- panelCSV.add(lblNewLabel_3_1_1);
-
- textFieldEmail = new JTextField();
- textFieldEmail.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldEmail.setColumns(10);
- textFieldEmail.setBounds(233, 310, 200, 22);
- textFieldEmail.setText(nodImportMoodle.getAttributs().get("email"));
- panelCSV.add(textFieldEmail);
-
- JLabel lblNewLabel_3_1_1_1 = new JLabel("Champ,numéro de l'étudiant");
- lblNewLabel_3_1_1_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_3_1_1_1.setBounds(42, 360, 186, 20);
- panelCSV.add(lblNewLabel_3_1_1_1);
-
- textFieldIDEtudiant = new JTextField();
- textFieldIDEtudiant.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldIDEtudiant.setColumns(10);
- textFieldIDEtudiant.setBounds(233, 360, 200, 22);
- textFieldIDEtudiant.setText(nodImportMoodle.getAttributs().get("id"));
- panelCSV.add(textFieldIDEtudiant);
-
-
-
- //*********************************************************
- //** ZIP **
- //*********************************************************
- JPanel panelZip = new JPanel();
- panelZip.setLayout(null);
- tabbedPane.addTab("ZIP", img2, panelZip, null);
-
- nodeAC nodZIP = calc.commandes.sujet.retourneFirstEnfantsByName("zip");
- if(nodZIP==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC zip n'est pas dans le fichier.");
- dispose();
- return;
- }
-
-
- JLabel lblZIP = new JLabel("Ces paramètres permettent de réaliser les archives au format ZIP contenant les feedbacks des étudiants. \r\nCes paramètres sont enregistrés dans le fichier d'analyse.");
- lblZIP.setHorizontalAlignment(SwingConstants.LEFT);
- lblZIP.setVerticalAlignment(SwingConstants.TOP);
- lblZIP.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lblZIP.setBounds(10, 10, 691, 46);
- panelZip.add(lblZIP);
-
- JLabel lblSize = new JLabel("Taille maximale (Mo)");
- lblSize.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblSize.setBounds(60, 96, 134, 20);
- panelZip.add(lblSize);
-
- textFieldSize = new JTextField();
- textFieldSize.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldSize.setBounds(198, 94, 86, 22);
- Integer size = 0;
- try {
- size = Integer.valueOf(nodZIP.getAttributs().get("size"));
- size = size/1000000;
- size = size + 2;
- }catch (Exception e) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec la taille de l'archive dans le fichier d'analyse.");
- dispose();
- return;
- }
- textFieldSize.setText(String.valueOf(size));
- textFieldSize.setColumns(10);
- panelZip.add(textFieldSize);
-
- JLabel lblNewLabel_1_1 = new JLabel("Nom de l'archive");
- lblNewLabel_1_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_1_1.setBounds(60, 164, 134, 20);
- panelZip.add(lblNewLabel_1_1);
-
- textFieldNameZIP = new JTextField();
- textFieldNameZIP.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldNameZIP.setColumns(10);
- textFieldNameZIP.setBounds(198, 164, 187, 22);
- textFieldNameZIP.setText(nodZIP.getAttributs().get("nameZip"));
- panelZip.add(textFieldNameZIP);
-
- JLabel lblNewLabel_1 = new JLabel("La taille maximale sur moodle est limitée à 50Mo.");
- lblNewLabel_1.setBounds(311, 97, 349, 20);
- panelZip.add(lblNewLabel_1);
-
- JLabel lblNewLabel_1_2 = new JLabel("Ne saisissez pas de caractère spéciaux.");
- lblNewLabel_1_2.setBounds(406, 165, 254, 20);
- panelZip.add(lblNewLabel_1_2);
-
-
-
- //*********************************************************
- //** TRICHE **
- //*********************************************************
- JPanel panelPlagiarism = new JPanel();
- panelPlagiarism.setLayout(null);
- tabbedPane.addTab("Triche", img3, panelPlagiarism, null);
-
- nodeAC nodTriche = calc.commandes.sujet.retourneFirstEnfantsByName("plagiarism");
- if(nodTriche==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC plagiarism n'est pas dans le fichier.");
- dispose();
- return;
- }
-
-
- JLabel lbldurantVosContrles = new JLabel("Pour vérifier d'éventuelles triches, les fichiers des étudiants doivent enregistrer les modifications . "
- + "Durant vos contrôles, des étudiants peuvent transmettre leurs fichiers à d'autres étudiants. Ils peuvent aussi réaliser des copiés et collés entre les fichiers. "
- + "Pour limiter les risques, remettez à vos étudiants un fichier avec le mode suivi des modifications activé et protégé par un mot de passe. "
- + "Si vous avez oublié de demander, dans vos consignes, de changer dans les options le nom et le prénom de l'auteur."
- + " Alors, il est possible (mais très peu probable) qu'une modification identique se produise dans deux fichiers. "
- + "Les paramètres ci-dessous permettent d'avoir une tolérances sur le signalement d'une éventuelle triche.");
- lbldurantVosContrles.setVerticalAlignment(SwingConstants.TOP);
- lbldurantVosContrles.setHorizontalAlignment(SwingConstants.LEFT);
- lbldurantVosContrles.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lbldurantVosContrles.setBounds(10, 10, 691, 226);
- panelPlagiarism.add(lbldurantVosContrles);
-
- JLabel lblNbrCorrespondanceMinimale = new JLabel("Nombre minimale de correspondance entre fichier");
- lblNbrCorrespondanceMinimale.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrCorrespondanceMinimale.setBounds(40, 247, 313, 20);
- panelPlagiarism.add(lblNbrCorrespondanceMinimale);
-
- textFieldMiniCorrespondance = new JTextField();
- textFieldMiniCorrespondance.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldMiniCorrespondance.setColumns(10);
- textFieldMiniCorrespondance.setBounds(364, 247, 56, 22);
- textFieldMiniCorrespondance.setText(nodTriche.getAttributs().get("number_match"));
- panelPlagiarism.add(textFieldMiniCorrespondance);
-
- JLabel lblNbrMiniModification = new JLabel("Nombre minimale de modification");
- lblNbrMiniModification.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrMiniModification.setBounds(43, 293, 239, 20);
- panelPlagiarism.add(lblNbrMiniModification);
-
- textFieldNbrMiniModification = new JTextField();
- textFieldNbrMiniModification.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldNbrMiniModification.setColumns(10);
- textFieldNbrMiniModification.setBounds(364, 293, 56, 22);
- textFieldNbrMiniModification.setText(nodTriche.getAttributs().get("mini_number_modification"));
- panelPlagiarism.add(textFieldNbrMiniModification);
-
- JLabel lblNewLabel_2 = new JLabel("L'étudiants n'a pas réaliser assez de travaux. "
- + "si valuer = -1 alors n'est pas pris en compte.");
- lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_2.setVerticalAlignment(SwingConstants.TOP);
- lblNewLabel_2.setBounds(430, 297, 239, 41);
- panelPlagiarism.add(lblNewLabel_2);
-
- JLabel lblNewLabel_2_1 = new JLabel("Zéro = aucune tolérance");
- lblNewLabel_2_1.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_2_1.setBounds(430, 247, 239, 20);
- panelPlagiarism.add(lblNewLabel_2_1);
-
- JLabel lblNbrMaxiModificationSimul = new JLabel("Nombre maximale de modification simultanée");
- lblNbrMaxiModificationSimul.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrMaxiModificationSimul.setBounds(40, 373, 313, 20);
- panelPlagiarism.add(lblNbrMaxiModificationSimul);
-
- textFieldMaxiModificationSimul = new JTextField();
- textFieldMaxiModificationSimul.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldMaxiModificationSimul.setColumns(10);
- textFieldMaxiModificationSimul.setBounds(364, 373, 56, 22);
- textFieldMaxiModificationSimul.setText(nodTriche.getAttributs().get("nombres_modifications_simultané_maxi"));
- panelPlagiarism.add(textFieldMaxiModificationSimul);
-
- JLabel lblNewLabel_2_2 = new JLabel("Evite le copié collé de tout l'exercice, ou d'une partie de l'exercice. "
- + "Cette valeur dépend de votre exercice.");
- lblNewLabel_2_2.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_2_2.setVerticalAlignment(SwingConstants.TOP);
- lblNewLabel_2_2.setBounds(430, 377, 239, 83);
- panelPlagiarism.add(lblNewLabel_2_2);
-
-
- //*********************************************************
- //** SIMILITUDE **
- //*********************************************************
- JPanel panelTextSimilarity = new JPanel();
- panelTextSimilarity.setLayout(null);
- tabbedPane.addTab("Textes", img4, panelTextSimilarity, null);
-
- nodeAC nodSimilitude = calc.commandes.sujet.retourneFirstEnfantsByName("text:similarity");
- if(nodSimilitude==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC text:similarity n'est pas dans le fichier.");
- dispose();
- return;
- }
-
- JLabel lbllesSimilitude = new JLabel("Les méthodes par comparaison des chaînes de caractères utilisent la distance de Levenshtein d=[0;1] . "
- + "Exemple : allContent=\"environ1\", ou \"value\". "
- + "La valeur du paramètre \"texte similitude\" par défaut est de 0.79 pour la méthode envirion, les fonctions dans les attributs de Writer. "
- + "");
- lbllesSimilitude.setVerticalAlignment(SwingConstants.TOP);
- lbllesSimilitude.setHorizontalAlignment(SwingConstants.LEFT);
- lbllesSimilitude.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lbllesSimilitude.setBounds(10, 10, 691, 96);
- panelTextSimilarity.add(lbllesSimilitude);
-
- JLabel lblNewLabel_4 = new JLabel("Texte similitude");
- lblNewLabel_4.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_4.setBounds(57, 159, 160, 20);
- panelTextSimilarity.add(lblNewLabel_4);
-
- textFieldTextSimilitude = new JTextField();
- textFieldTextSimilitude.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldTextSimilitude.setBounds(199, 159, 86, 22);
- textFieldTextSimilitude.setText(nodSimilitude.getAttributs().get("tolerance_text"));
- panelTextSimilarity.add(textFieldTextSimilitude);
- textFieldTextSimilitude.setColumns(10);
-
- JLabel lblNewLabel_5 = new JLabel("C'est la distance minimale qu'il doit y avoir entre le texte (paragraphe, ensemble de paragraphe, valeur d'un attribut Writer) et le texte présent dans le fichier d'analyse. "
- + "La distance est une valeur comprise entre 0 et 1. "
- + "Si d=0 alors n'importe quel texte est accepté. "
- + "Si d=1 alors aucune différence entre les textes.");
- lblNewLabel_5.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_5.setVerticalAlignment(SwingConstants.TOP);
- lblNewLabel_5.setBounds(325, 163, 376, 145);
- panelTextSimilarity.add(lblNewLabel_5);
-
-
- //*********************************************************
- //** COULEUR **
- //*********************************************************
- JPanel panelColor = new JPanel();
- panelColor.setLayout(null);
- tabbedPane.addTab("Couleur", img5, panelColor, null);
-
- nodeAC nodColor = calc.commandes.sujet.retourneFirstEnfantsByName("color");
- if(nodColor==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC color n'est pas dans le fichier.");
- dispose();
- return;
- }
-
- JLabel lblCouleur = new JLabel("Dans les attributs de Writer contenant un code couleur, vous pouvez régler la tolérance de la couleur sur les trois canaux RVB. "
- + "Il y a 255 nuances sur chaque canal. "
- + "Par défaut les valeurs des tolérances sont réglées à 30 nuances.");
- lblCouleur.setVerticalAlignment(SwingConstants.TOP);
- lblCouleur.setHorizontalAlignment(SwingConstants.LEFT);
- lblCouleur.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lblCouleur.setBounds(10, 10, 691, 97);
- panelColor.add(lblCouleur);
-
- JLabel lblRouge = new JLabel("Valeur de la tolérance sur les rouges");
- lblRouge.setToolTipText("");
- lblRouge.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblRouge.setBounds(30, 165, 250, 20);
- panelColor.add(lblRouge);
-
- JLabel lblValeurDeLa = new JLabel("Valeur de la tolérance sur les verts");
- lblValeurDeLa.setToolTipText("");
- lblValeurDeLa.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblValeurDeLa.setBounds(30, 218, 250, 20);
- panelColor.add(lblValeurDeLa);
-
- JLabel lblValeurDeLa_2 = new JLabel("Valeur de la tolérance sur les bleus");
- lblValeurDeLa_2.setToolTipText("");
- lblValeurDeLa_2.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblValeurDeLa_2.setBounds(30, 275, 244, 20);
- panelColor.add(lblValeurDeLa_2);
-
- textFieldRouge = new JTextField();
- textFieldRouge.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldRouge.setBounds(292, 165, 86, 22);
- panelColor.add(textFieldRouge);
- textFieldRouge.setText(nodColor.getAttributs().get("tolerance_rouge"));
- textFieldRouge.setColumns(10);
-
- textFieldVert = new JTextField();
- textFieldVert.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldVert.setColumns(10);
- textFieldVert.setText(nodColor.getAttributs().get("tolerance_vert"));
- textFieldVert.setBounds(292, 219, 86, 22);
- panelColor.add(textFieldVert);
-
- textFieldBleu = new JTextField();
- textFieldBleu.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldBleu.setColumns(10);
- textFieldBleu.setText(nodColor.getAttributs().get("tolerance_bleu"));
- textFieldBleu.setBounds(292, 276, 86, 22);
- panelColor.add(textFieldBleu);
-
- btnTestCouleur = new JButton("Test de tolérance");
- btnTestCouleur.setBounds(396, 353, 173, 23);
- panelColor.add(btnTestCouleur);
-
- textFieldTestCouleur = new JTextField();
- textFieldTestCouleur.setHorizontalAlignment(SwingConstants.CENTER);
- textFieldTestCouleur.setText("#ff0000");
- textFieldTestCouleur.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldTestCouleur.setColumns(10);
- textFieldTestCouleur.setBounds(292, 354, 86, 22);
- panelColor.add(textFieldTestCouleur);
-
- JLabel lblValeurDeLa_2_1 = new JLabel("Tapez un code couleur hexadécimal");
- lblValeurDeLa_2_1.setToolTipText("");
- lblValeurDeLa_2_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblValeurDeLa_2_1.setBounds(30, 357, 244, 20);
- panelColor.add(lblValeurDeLa_2_1);
-
- btnCouleurInitTest = new JButton("Couleur");
- Color couleurInit = hex2Rgb(textFieldTestCouleur.getText());
- btnCouleurInitTest.setBackground(couleurInit);
- btnCouleurInitTest.setBounds(119, 430, 89, 23);
- panelColor.add(btnCouleurInitTest);
-
- btnRougeMax = new JButton("Rouge max");
- btnRougeMax.setBackground(new Color(153, 0, 16));
- btnRougeMax.setBounds(209, 405, 89, 23);
- panelColor.add(btnRougeMax);
-
- btnRougeMini = new JButton("Rouge mini");
- btnRougeMini.setBackground(new Color(153, 0, 16));
- btnRougeMini.setBounds(30, 405, 89, 23);
- panelColor.add(btnRougeMini);
-
- btnVertMini = new JButton("Vert mini");
- btnVertMini.setBackground(new Color(153, 0, 16));
- btnVertMini.setBounds(30, 430, 89, 23);
- panelColor.add(btnVertMini);
-
- btnVertMax = new JButton("Vert max");
- btnVertMax.setBackground(new Color(153, 0, 16));
- btnVertMax.setBounds(209, 430, 89, 23);
- panelColor.add(btnVertMax);
-
- btnBleuMini = new JButton("Bleu mini");
- btnBleuMini.setBackground(new Color(153, 0, 16));
- btnBleuMini.setBounds(30, 454, 89, 23);
- panelColor.add(btnBleuMini);
-
- btnBleuMax = new JButton("Bleu max");
- btnBleuMax.setBackground(new Color(153, 0, 16));
- btnBleuMax.setBounds(209, 454, 89, 23);
- panelColor.add(btnBleuMax);
-
- btnCouleurMiniTotal = new JButton("Couleur");
- btnCouleurMiniTotal.setBackground(Color.RED);
- btnCouleurMiniTotal.setBounds(373, 430, 89, 23);
- panelColor.add(btnCouleurMiniTotal);
-
- btnCouleurMaxiTotal = new JButton("Couleur");
- btnCouleurMaxiTotal.setBackground(Color.RED);
- btnCouleurMaxiTotal.setBounds(519, 430, 89, 23);
- panelColor.add(btnCouleurMaxiTotal);
-
- JLabel lblNewLabel_6 = new JLabel("Couleur la plus claire");
- lblNewLabel_6.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_6.setBounds(512, 409, 102, 14);
- panelColor.add(lblNewLabel_6);
-
- JLabel lblNewLabel_6_1 = new JLabel("Couleur la plus sombre");
- lblNewLabel_6_1.setFont(new Font("Tahoma", Font.PLAIN, 11));
- lblNewLabel_6_1.setBounds(363, 409, 139, 14);
- panelColor.add(lblNewLabel_6_1);
-
- //*********************************************************
- //** TRADUCTION **
- //*********************************************************
- JPanel panelTraduction = new JPanel();
- panelTraduction.setLayout(null);
- tabbedPane.addTab("Traduction", img6, panelTraduction, null);
-
- JLabel lblCouleur_1 = new JLabel("Dans le fichier d'analyse se trouve le nodeAC translation. "
- + "Cliquez sur le bouton extraire le nodeAC. "
- + "Vous pouvez manuellement ajouter des nodes enfants permettant la traduction des attributs d'analyseWriter. "
- + "Cliquez sur le bouton ajouter vos traductions pour insérer vos modifications."
- + "");
- lblCouleur_1.setVerticalAlignment(SwingConstants.TOP);
- lblCouleur_1.setHorizontalAlignment(SwingConstants.LEFT);
- lblCouleur_1.setFont(new Font("Tahoma", Font.PLAIN, 14));
- lblCouleur_1.setBounds(10, 10, 691, 104);
- panelTraduction.add(lblCouleur_1);
-
- btnExtraire = new JButton("Extraire le nodeAC");
- btnExtraire.setFont(new Font("Tahoma", Font.BOLD, 12));
- btnExtraire.setBounds(99, 201, 194, 48);
- panelTraduction.add(btnExtraire);
-
- btnAjouterVosTraductions = new JButton("Ajouter vos traductions");
- btnAjouterVosTraductions.setFont(new Font("Tahoma", Font.BOLD, 12));
- btnAjouterVosTraductions.setBounds(388, 201, 205, 48);
- panelTraduction.add(btnAjouterVosTraductions);
-
-
- //*********************************************************
- //** BOUTON VALIDATION MODIFICATION **
- //*********************************************************
- btnValiderModifications = new JButton("Valider les modifications");
- btnValiderModifications.setFont(new Font("Tahoma", Font.BOLD, 14));
- JPanel Pane = new JPanel();
- Pane.setLayout(new GridLayout(1, 2, 0, 0));
- contentPane.add(Pane,BorderLayout.SOUTH );
-
- btnReinit = new JButton("Réïnitialiser les valeurs");
- btnReinit.setFont(new Font("Tahoma", Font.BOLD, 14));
- Pane.add(btnReinit);
- Pane.add(btnValiderModifications);
-
-
-
- ListenerAction();
-
- if(!erreurFormatHexCouleur()&&!erreurFormatHexCouleur()) miseAJourCouleurTest();
- this.setVisible(true);
- }
-
-
-
- private void ListenerAction() {
-
- /**
- * Bouton de validation des modification
- */
- btnValiderModifications.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
-
- if(!erreurValeursSaisies()&&!erreurToleranceCouleur()) {
- //*** Validation du fichier CSV
- nodeAC nodCSV = calc.commandes.sujet.retourneFirstEnfantsByName("csv");
- nodCSV.getAttributs().put("encoding", comboBoxEncodage.getSelectedItem().toString());
- if(comboBoxSeparateur.getSelectedItem().equals("point virgule")) nodCSV.getAttributs().put("separator", ";");
- if(comboBoxSeparateur.getSelectedItem().equals("virgule")) nodCSV.getAttributs().put("separator", ",");
- if(comboBoxSeparateur.getSelectedItem().equals("espace")) nodCSV.getAttributs().put("separator", " ");
- if(comboBoxSeparateur.getSelectedItem().equals("tabulation")) nodCSV.getAttributs().put("separator", "\t");
-
- nodeAC nodImport= calc.commandes.sujet.retourneFirstEnfantsByName("import_moodle");
-
- nodImport.getAttributs().put("name", textFieldNomEtudiant.getText());
- nodImport.getAttributs().put("firstname", textFieldPrenomEtudiant.getText());
- nodImport.getAttributs().put("email", textFieldEmail.getText());
- nodImport.getAttributs().put("id", textFieldIDEtudiant.getText());
-
- //*** Validation du ZIP
- nodeAC nodZIP = calc.commandes.sujet.retourneFirstEnfantsByName("zip");
- int valueNumeric = Integer.valueOf(textFieldSize.getText());
- valueNumeric = valueNumeric*1000000;
- valueNumeric = valueNumeric - 2000000;
- nodZIP.getAttributs().put("size",String.valueOf(valueNumeric));
- nodZIP.getAttributs().put("nameZip",textFieldNameZIP.getText());
-
-
- //** Validation triche
- nodeAC nodTriche = calc.commandes.sujet.retourneFirstEnfantsByName("plagiarism");
- nodTriche.getAttributs().put("number_match",textFieldMiniCorrespondance.getText());
- nodTriche.getAttributs().put("mini_number_modification",textFieldNbrMiniModification.getText());
- nodTriche.getAttributs().put("nombres_modifications_simultané_maxi",textFieldMaxiModificationSimul.getText());
-
- //** Validation similitude
- nodeAC nodSimilitude = calc.commandes.sujet.retourneFirstEnfantsByName("text:similarity");
- nodSimilitude.getAttributs().put("tolerance_text",textFieldTextSimilitude.getText());
-
- //** Validation des tolérance couleur
- nodeAC nodColor = calc.commandes.sujet.retourneFirstEnfantsByName("color");
- nodColor.getAttributs().put("tolerance_rouge",textFieldRouge.getText());
- nodColor.getAttributs().put("tolerance_vert",textFieldVert.getText());
- nodColor.getAttributs().put("tolerance_bleu",textFieldBleu.getText());
-
- JOptionPane.showMessageDialog(null, "Les informations ont bien été renseignées. "
- + "N'oubliez pas d'enregistrer votre fichier d'analyse.");
-
- }
-
- }
- });
-
- /**
- * Bouton du test de couleur
- */
- btnTestCouleur.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if(!erreurFormatHexCouleur()&&!erreurFormatHexCouleur()) miseAJourCouleurTest();
- }
- });
-
- /**
- * Bouton extraire le nodeAC translate
- */
- btnExtraire.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- nodeAC nodeTransalte = calc.commandes.sujet.retourneFirstEnfantsByName("translation");
- JFileChooser fileChooser = new JFileChooser();
- fileChooser.setDialogTitle("Enregistrer sous...");
- File file = null;
-
- fileChooser.setCurrentDirectory(file);
-
- int userSelection = fileChooser.showSaveDialog(null);
-
- if (userSelection == JFileChooser.APPROVE_OPTION) {
- File fileToSave = fileChooser.getSelectedFile();
- try {
-
-// Run.ecritureNodeEnXML(nodeTransalte, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),"" );
- Ecriture.ecritureNodeEnXML(nodeTransalte, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),Ecriture.typeFichier.fichier_analyse );
-
- JOptionPane.showMessageDialog(null, "Le fichier \"" + fileToSave.getName() + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + fileToSave.getPath());
-
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
- }
- }
- });
-
- /**
- * Ajoute les traductions personnalisées
- */
- btnAjouterVosTraductions.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JFileChooser fileChooser = new JFileChooser();
- fileChooser.setDialogTitle("Charger le nodeAC translate en mémoire");
-
- FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichier d'analyse .XML", "xml");
- fileChooser.setFileFilter(filter);
- File file = null;
-
- fileChooser.setCurrentDirectory(file);
-
- int userSelection = fileChooser.showSaveDialog(null);
-
- if (userSelection == JFileChooser.APPROVE_OPTION) {
- File fileToSave = fileChooser.getSelectedFile();
- try {
- file = new File(fileToSave.getAbsolutePath());
- BufferedReader br = new BufferedReader(
- new InputStreamReader(
- new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
- String line;
- StringBuilder targetString = new StringBuilder();
- while ((line = br.readLine()) != null) {
- targetString.append(line);
- }
- nodeAC nodeSetting = calc.commandes.sujet.retourneFirstEnfantsByName("setting");
- constructionNodeAvecString A = new constructionNodeAvecString();
-
- nodeAC nodeTranslate2 = A.NewNode(targetString.toString());
- if(nodeTranslate2.getNomElt().equals("translation")) {
- nodeSetting.getNodes().remove(calc.commandes.sujet.retourneFirstEnfantsByName("translation"));
- nodeSetting.getNodes().add(nodeTranslate2);
- JOptionPane.showMessageDialog(null, "Chargement du nouveau nodeAC de traduction.");
- }
-
- }catch (Exception e1) {
-
- }
- }
- }
- });
-
- /**
- * Réînitialiser les valeurs par défaut
- */
- btnReinit.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- int a = JOptionPane.showConfirmDialog(null,"Voulez-vous remettre toutes les valeurs par défauts?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
-
- if(a == JOptionPane.YES_NO_OPTION) {
- nodeAC nodCSV = calc.commandes.sujet.retourneFirstEnfantsByName("csv");
- nodCSV.getAttributs().put("encoding","UTF-8");
- nodCSV.getAttributs().put("separator",";");
- nodeAC nodImportMoodle = nodCSV.retourneFirstEnfantsByName("import_moodle");
- nodImportMoodle.getAttributs().put("name","nom");
- nodImportMoodle.getAttributs().put("email","adresse");
- nodImportMoodle.getAttributs().put("firstname","prenom");
- nodImportMoodle.getAttributs().put("id","identification");
- nodeAC nodZIP = calc.commandes.sujet.retourneFirstEnfantsByName("zip");
- nodZIP.getAttributs().put("size","48000000");
- nodZIP.getAttributs().put("nameZip","feedbackMoodle");
- nodeAC nodplagiarism = calc.commandes.sujet.retourneFirstEnfantsByName("plagiarism");
- nodplagiarism.getAttributs().put("number_match","2");
- nodplagiarism.getAttributs().put("mini_number_modification","-1");
- nodplagiarism.getAttributs().put("nombres_modifications_simultané_maxi","100");
- nodeAC nodSimilitude = calc.commandes.sujet.retourneFirstEnfantsByName("text:similarity");
- nodSimilitude.getAttributs().put("tolerance_text","0.79");
- nodeAC nodColor = calc.commandes.sujet.retourneFirstEnfantsByName("color");
- nodColor.getAttributs().put("tolerance_rouge","30");
- nodColor.getAttributs().put("tolerance_vert","30");
- nodColor.getAttributs().put("tolerance_bleu","30");
-
- // Relecture des nouvelles valeurs
- comboBoxEncodage.setSelectedItem(nodCSV.getAttributs().get("encoding"));
- if(nodCSV.getAttributs().get("separator").equals(";")) comboBoxSeparateur.setSelectedItem("point virgule");
- if(nodCSV.getAttributs().get("separator").equals(",")) comboBoxSeparateur.setSelectedItem("virgule");
- if(nodCSV.getAttributs().get("separator").equals(" ")) comboBoxSeparateur.setSelectedItem("espace");
- if(nodCSV.getAttributs().get("separator").equals("\t")) comboBoxSeparateur.setSelectedItem("tabulation");
- textFieldNomEtudiant.setText(nodImportMoodle.getAttributs().get("name"));
- textFieldPrenomEtudiant.setText(nodImportMoodle.getAttributs().get("firstname"));
- textFieldEmail.setText(nodImportMoodle.getAttributs().get("email"));
- textFieldIDEtudiant.setText(nodImportMoodle.getAttributs().get("id"));
- textFieldSize.setText(nodZIP.getAttributs().get("size"));
- textFieldNameZIP.setText(nodZIP.getAttributs().get("nameZip"));
- textFieldMiniCorrespondance.setText(nodplagiarism.getAttributs().get("number_match"));
- textFieldNbrMiniModification.setText(nodplagiarism.getAttributs().get("mini_number_modification"));
- textFieldMaxiModificationSimul.setText(nodplagiarism.getAttributs().get("nombres_modifications_simultané_maxi"));
- textFieldTextSimilitude.setText(nodSimilitude.getAttributs().get("tolerance_text"));
- textFieldRouge.setText(nodColor.getAttributs().get("tolerance_rouge"));
- textFieldVert.setText(nodColor.getAttributs().get("tolerance_vert"));
- textFieldBleu.setText(nodColor.getAttributs().get("tolerance_bleu"));
- }
- }
- });
- }
-
-
- public static setting getInstance() {
- if (instance == null) {
- instance = new setting();
- }else {
- if(instance.actualise()) {
- instance.setVisible(true);
- }
- }
- return instance;
- }
-
- private boolean actualise() {
- Boolean Valide = true;
- nodeAC nodCSV = calc.commandes.sujet.retourneFirstEnfantsByName("csv");
- if(nodCSV==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC csv n'est pas dans le fichier.");
- Valide =false;
- }
- nodeAC nodImportMoodle = calc.commandes.sujet.retourneFirstEnfantsByName("import_moodle");
- if(nodImportMoodle==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. le nodeAC import_moodle n'est pas dans le fichier d'analyse.");
- Valide =false;
- }
- nodeAC nodZIP = calc.commandes.sujet.retourneFirstEnfantsByName("zip");
- if(nodZIP==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC zip n'est pas dans le fichier.");
- Valide =false;
- }
- nodeAC nodTriche = calc.commandes.sujet.retourneFirstEnfantsByName("plagiarism");
- if(nodTriche==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC plagiarism n'est pas dans le fichier.");
- Valide =false;
- }
- nodeAC nodSimilitude = calc.commandes.sujet.retourneFirstEnfantsByName("text:similarity");
- if(nodSimilitude==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC text:similarity n'est pas dans le fichier.");
- Valide =false;
- }
- nodeAC nodColor = calc.commandes.sujet.retourneFirstEnfantsByName("color");
- if(nodColor==null) {
- JOptionPane.showMessageDialog(null, "Problème avec le fichier d'analyse. Le nodeAC color n'est pas dans le fichier.");
- Valide =false;
- }
-
- if(!Valide) return Valide;
-
- if(nodCSV.getAttributs().get("encoding")!=null) comboBoxEncodage.setSelectedItem(nodCSV.getAttributs().get("encoding"));
- if(nodCSV.getAttributs().get("separator")!=null) comboBoxSeparateur.setSelectedItem(nodCSV.getAttributs().get("separator"));
-
- if(nodImportMoodle.getAttributs().get("name")!=null) textFieldNomEtudiant.setText(nodImportMoodle.getAttributs().get("name"));
- if(nodImportMoodle.getAttributs().get("firstname")!=null) textFieldPrenomEtudiant.setText(nodImportMoodle.getAttributs().get("firstname"));
- if(nodImportMoodle.getAttributs().get("email")!=null) textFieldEmail.setText(nodImportMoodle.getAttributs().get("email"));
- if(nodImportMoodle.getAttributs().get("id")!=null) textFieldIDEtudiant.setText(nodImportMoodle.getAttributs().get("id"));
-
- if(nodZIP.getAttributs().get("size")!=null) {
- Integer size = 0;
- try {
- size = Integer.valueOf(nodZIP.getAttributs().get("size"));
- size = size/1000000;
- size = size + 2;
- }catch (Exception e) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec la taille de l'archive dans le fichier d'analyse.");
- return false;
- }
- textFieldSize.setText(String.valueOf(size));
- }
- if(nodZIP.getAttributs().get("nameZip")!=null) textFieldNameZIP.setText(nodZIP.getAttributs().get("nameZip"));
-
- if(nodTriche.getAttributs().get("number_match")!=null) textFieldMiniCorrespondance.setText(nodTriche.getAttributs().get("number_match"));
- if(nodTriche.getAttributs().get("mini_number_modification")!=null) textFieldNbrMiniModification.setText(nodTriche.getAttributs().get("mini_number_modification"));
- if(nodTriche.getAttributs().get("nombres_modifications_simultané_maxi")!=null) textFieldMaxiModificationSimul.setText(nodTriche.getAttributs().get("nombres_modifications_simultané_maxi"));
-
- if(nodSimilitude.getAttributs().get("tolerance_text")!=null) textFieldTextSimilitude.setText(nodSimilitude.getAttributs().get("tolerance_text"));
-
- if(nodColor.getAttributs().get("tolerance_rouge")!=null) textFieldRouge.setText(nodColor.getAttributs().get("tolerance_rouge"));
- if(nodColor.getAttributs().get("tolerance_vert")!=null) textFieldVert.setText(nodColor.getAttributs().get("tolerance_vert"));
- if(nodColor.getAttributs().get("tolerance_bleu")!=null) textFieldBleu.setText(nodColor.getAttributs().get("tolerance_bleu"));
-
- return Valide;
- }
-
-
- /**
- * vérification des valeurs saisies dans la fenêtre setting.
- * @return
- */
- private boolean erreurValeursSaisies() {
- boolean erreur = false;
-
- //*******************
- //** taille du zip **
- //*******************
- Integer valueNumeric = 0;
- try {
- valueNumeric = Integer.valueOf(textFieldSize.getText());
- if(valueNumeric<2) {
- JOptionPane.showInternalMessageDialog(null, "La taille de l'archive doit être supérieure à 2 Mo.");
- erreur = true;
- }
- if(valueNumeric>200) {
- JOptionPane.showInternalMessageDialog(null, "La taille de l'archive doit être inférieure à 200 Mo.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format de la taille de l'archive.");
- erreur = true;
- }
-
- //******************************
- //** Les valeurs de la triche **
- //******************************
- try {
- valueNumeric = Integer.valueOf(textFieldMiniCorrespondance.getText());
- if(valueNumeric<1) {
- JOptionPane.showInternalMessageDialog(null, "Le nombre de correspondance doit être supérieure à 1.");
- erreur = true;
- }
- if(valueNumeric>5) {
- JOptionPane.showInternalMessageDialog(null, "Le nombre de correspondance doit être inférieure à 5.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format du nombre de correspondance (triche).");
- erreur = true;
- }
- try {
- valueNumeric = Integer.valueOf(textFieldNbrMiniModification.getText());
- if(valueNumeric<-2) {
- JOptionPane.showInternalMessageDialog(null, "Le nombre minimal de modification dans le fichier doit être supérieure à -1.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format du nombre de modification minimale (triche).");
- erreur = true;
- }
- try {
- valueNumeric = Integer.valueOf(textFieldMaxiModificationSimul.getText());
- if(valueNumeric<0) {
- JOptionPane.showInternalMessageDialog(null, "Le nombre maximal de modification dans le fichier doit être une valeur positive non nulle.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format du nombre de modification maximale (triche).");
- erreur = true;
- }
-
- //**********************************
- //** Les valeurs de la similitude **
- //**********************************
- try {
- double valueNumericDouble = Double.valueOf(textFieldTextSimilitude.getText());
- if(valueNumericDouble<0) {
- JOptionPane.showInternalMessageDialog(null, "La distance de Levenshtein doit être supérieure à 0.");
- erreur = true;
- }
- if(valueNumericDouble>1) {
- JOptionPane.showInternalMessageDialog(null, "La distance de Levenshtein doit être inférieure à 1.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format de la distance de Levenshtein.");
- erreur = true;
- }
-
-
-
-
- //***************************************************
- //** caractères spéciaux dans les noms des valeurs **
- //***************************************************
- Pattern p = Pattern.compile("[^\\w]");
- Matcher m = p.matcher(textFieldNomEtudiant.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom du champ, nom de l'étudiant (fichier CSV).");
- erreur = true;
- }
- m = p.matcher(textFieldPrenomEtudiant.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom du champ, prénom de l'étudiant (fichier CSV).");
- erreur = true;
- }
- m = p.matcher(textFieldPrenomEtudiant.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom du champ, prénom de l'étudiant (fichier CSV).");
- erreur = true;
- }
- m = p.matcher(textFieldEmail.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom du champ, email de l'étudiant (fichier CSV).");
- erreur = true;
- }
- m = p.matcher(textFieldIDEtudiant.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom du champ, numéro de l'étudiant (fichier CSV).");
- erreur = true;
- }
- m = p.matcher(textFieldNameZIP.getText());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un caractère spécial dans le nom de l'archive.");
- erreur = true;
- }
-
-
-
- return erreur;
- }
-
-
- /**
- * Vérification du format du code couleur pour le test de couleur.
- * @return
- */
- private boolean erreurFormatHexCouleur() {
- boolean erreur= false;
- Pattern p = Pattern.compile("^#[a-fA-F0-9].{6}$");
- Matcher m = p.matcher(textFieldTestCouleur.getText().toUpperCase());
- if(m.find()) {
- JOptionPane.showInternalMessageDialog(null, "Ce n'est pas le format correct d'un code couleur hexdécimal.");
- erreur = true;
- }
- return erreur;
- }
-
- /**
- * Vérification tolérance de couleur.
- * @return
- */
- private boolean erreurToleranceCouleur() {
- boolean erreur =false;
-
- Integer valueNumeric = 0;
- try {
- valueNumeric = Integer.valueOf(textFieldRouge.getText());
- if(valueNumeric<0) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le rouge doit être une valeur positive.");
- erreur = true;
- }
- if(valueNumeric>255) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le rouge doit être inférieur à 255.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format de la tolérance sur le rouge.");
- erreur = true;
- }
-
- try {
- valueNumeric = Integer.valueOf(textFieldVert.getText());
- if(valueNumeric<0) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le vert doit être une valeur positive.");
- erreur = true;
- }
- if(valueNumeric>255) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le vert doit être inférieur à 255.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format de la tolérance sur le vert.");
- erreur = true;
- }
-
- try {
- valueNumeric = Integer.valueOf(textFieldBleu.getText());
- if(valueNumeric<0) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le bleu doit être une valeur positive.");
- erreur = true;
- }
- if(valueNumeric>255) {
- JOptionPane.showInternalMessageDialog(null, "La tolérance sur le bleu doit être inférieur à 255.");
- erreur = true;
- }
- }catch (Exception e1) {
- JOptionPane.showInternalMessageDialog(null, "Il y a un problème avec le format de la tolérance sur le bleu.");
- erreur = true;
- }
-
-
- return erreur;
- }
-
-
- /**
- *
- * @param colorStr
- * @return
- */
- public static Color hex2Rgb(String colorStr) {
- return new Color(
- Integer.valueOf( colorStr.substring( 1, 3 ), 16 ),
- Integer.valueOf( colorStr.substring( 3, 5 ), 16 ),
- Integer.valueOf( colorStr.substring( 5, 7 ), 16 ) );
- }
-
- /**
- *
- * @param couleur
- * @return
- */
- public static String Rgb2hex(Color couleur) {
- return String.format("#%02x%02x%02x", couleur.getRed(), couleur.getGreen(), couleur.getBlue());
- }
-
- /**
- * Mise à jour du test de couleur
- */
- private void miseAJourCouleurTest() {
- if(!erreurFormatHexCouleur()&&!erreurToleranceCouleur()) {
- Color couleurInit = hex2Rgb(textFieldTestCouleur.getText());
- btnCouleurInitTest.setBackground(couleurInit);
- btnCouleurInitTest.setText(textFieldTestCouleur.getText());
-
- int couleurMaxRouge = couleurInit.getRed()+ Integer.valueOf(textFieldRouge.getText());
- if(couleurMaxRouge>255) couleurMaxRouge=255;
- Color couleurRougeMaxi = new Color(couleurMaxRouge, couleurInit.getGreen(), couleurInit.getBlue());
- btnRougeMax.setBackground(couleurRougeMaxi);
- btnRougeMax.setText(Rgb2hex(couleurRougeMaxi));
-
- int couleurMiniRouge = couleurInit.getRed()- Integer.valueOf(textFieldRouge.getText());
- if(couleurMiniRouge<0) couleurMiniRouge=0;
- Color couleurRougeMini = new Color(couleurMiniRouge, couleurInit.getGreen(), couleurInit.getBlue());
- btnRougeMini.setBackground(couleurRougeMini);
- btnRougeMini.setText(Rgb2hex(couleurRougeMini));
-
- int couleurMaxVert = couleurInit.getGreen()+ Integer.valueOf(textFieldVert.getText());
- if(couleurMaxVert>255) couleurMaxVert=255;
- Color couleurVertMaxi = new Color(couleurInit.getRed(), couleurMaxVert, couleurInit.getBlue());
- btnVertMax.setBackground(couleurVertMaxi);
- btnVertMax.setText(Rgb2hex(couleurVertMaxi));
-
- int couleurMiniVert = couleurInit.getGreen()- Integer.valueOf(textFieldVert.getText());
- if(couleurMiniVert<0) couleurMiniVert=0;
- Color couleurVertMini = new Color(couleurInit.getRed(), couleurMiniVert, couleurInit.getBlue());
- btnVertMini.setBackground(couleurVertMini);
- btnVertMini.setText(Rgb2hex(couleurVertMini));
-
- int couleurMaxBleu = couleurInit.getBlue()+ Integer.valueOf(textFieldBleu.getText());
- if(couleurMaxBleu>255) couleurMaxBleu=255;
- Color couleurBleuMaxi = new Color(couleurInit.getRed(), couleurInit.getGreen(), couleurMaxBleu);
- btnBleuMax.setBackground(couleurBleuMaxi);
- btnBleuMax.setText(Rgb2hex(couleurBleuMaxi));
-
- int couleurMiniBleu = couleurInit.getBlue()- Integer.valueOf(textFieldBleu.getText());
- if(couleurMiniBleu<0) couleurMiniBleu=0;
- Color couleurBleuMini = new Color(couleurInit.getRed(), couleurInit.getGreen(), couleurMiniBleu);
- btnBleuMini.setBackground(couleurBleuMini);
- btnBleuMini.setText(Rgb2hex(couleurBleuMini));
-
- Color couleurMaxi = new Color(couleurMaxRouge, couleurMaxVert, couleurMaxBleu);
- btnCouleurMaxiTotal.setBackground(couleurMaxi);
- btnCouleurMaxiTotal.setText(Rgb2hex(couleurMaxi));
-
- Color couleurMini= new Color(couleurMiniRouge, couleurMiniVert, couleurMiniBleu);
- btnCouleurMiniTotal.setBackground(couleurMini);
- btnCouleurMiniTotal.setText(Rgb2hex(couleurMini));
-
-
- }
- }
-
-
-
-}
-
-
-
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterPasEvaluableAvecCodeEvaluateur.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterPasEvaluableAvecCodeEvaluateur.java
deleted file mode 100644
index e1d6730..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterPasEvaluableAvecCodeEvaluateur.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package list;
-
-public class listeAttributWriterPasEvaluableAvecCodeEvaluateur {
-
- public listeAttributWriterPasEvaluableAvecCodeEvaluateur(){
-
- }
-
- /**
- * Liste des attributs Writer qui ne peuvent pas être évaluer par un code évaluateurs
- * @param nameAttribut
- * @return
- */
- public static boolean isEvaluable(String nameAttribut) {
- if(nameAttribut.equals("style:page-layout-name")) return true;
- if(nameAttribut.equals("style:family")) return true;
- if(nameAttribut.equals("text:name")) return true;
- if(nameAttribut.equals("text:style-name")) return true;
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterValeurPasModifiable.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterValeurPasModifiable.java
deleted file mode 100644
index 91ae746..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributWriterValeurPasModifiable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package list;
-
-public class listeAttributWriterValeurPasModifiable {
-
- public listeAttributWriterValeurPasModifiable() {
-
- }
-
-
- public static boolean isModifiable(String nameAttribut) {
- if(nameAttribut.equals("style:name")) return true;
- if(nameAttribut.equals("style:display-name")) return true;
- if(nameAttribut.equals("style:next-style-name")) return true;
- if(nameAttribut.equals("style:parent-style-name")) return true;
- if(nameAttribut.equals("style:family")) return true;
- if(nameAttribut.equals("style:master-page-name")) return true;
- if(nameAttribut.equals("style:page_number"))return true;
- if(nameAttribut.equals("style:page-layout-name")) return true;
- if(nameAttribut.equals("numeroabsolue")) return true;
- if(nameAttribut.equals("numero")) return true;
- if(nameAttribut.equals("draw:style-name")) return true;
- if(nameAttribut.equals("text:style-name")) return true;
- if(nameAttribut.equals("text:name")) return true;
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributsAnalyseWriter.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributsAnalyseWriter.java
deleted file mode 100644
index 4635fcc..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeAttributsAnalyseWriter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package list;
-
-public class listeAttributsAnalyseWriter {
-
- public listeAttributsAnalyseWriter() {
-
- }
-
- /**
- *
- * retourne true si c'est un attribut utilisé par analyseWriter.
- * @param attribut
- * @return
- */
- public static boolean isAttributAnalyseWriter(String attribut) {
-
- if(attribut.equals("evaluer")) return true;
- if(attribut.equals("menu")) return true;
- if(attribut.equals("saut")) return true;
- if(attribut.equals("titre")) return true;
- if(attribut.equals("titre1")) return true;
- if(attribut.equals("titre2")) return true;
- if(attribut.equals("titre3")) return true;
- if(attribut.equals("poids")) return true;
- if(attribut.equals("analyseStyle")) return true;
- if(attribut.equals("allContent")) return true;
- if(attribut.equals("index")) return true;
- if(attribut.equals("recherche_index")) return true;
- if(attribut.equals("recherche_contenu_exact")) return true;
- if(attribut.equals("evalNameNode")) return true;
- if(attribut.equals("styletitre")) return true; //ancienne version, il faudra les supprimer au fur plus ajouter depuis la version v4.1.2
- if(attribut.equals("evalNameCreator")) return true;
- if(attribut.equals("evalNameInitialCreator")) return true;
- if(attribut.equals("recherche_anchor-page-number")) return true;
- if(attribut.equals("recherche_contenu_plus_proche_voisin")) return true;
-
-
- //Les attribut placer dans le node fichier du fichier d'analyse
- if(attribut.equals("analysis_filename")) return true;
- if(attribut.equals("auteur")) return true;
- if(attribut.equals("baremeABC")) return true;
- if(attribut.equals("controleDateCreation")) return true;
- if(attribut.equals("controle_Initial_Creator")) return true;
- if(attribut.equals("creationDate")) return true;
- if(attribut.equals("date")) return true;
- if(attribut.equals("dateModification")) return true;
- if(attribut.equals("dureeEdition")) return true;
- if(attribut.equals("filename")) return true;
- if(attribut.equals("hash")) return true;
- if(attribut.equals("historiquePresent")) return true;
- if(attribut.equals("link_help")) return true;
- if(attribut.equals("link_sujet")) return true;
- if(attribut.equals("metaSujet")) return true;
- if(attribut.equals("notefrom")) return true;
- if(attribut.equals("presenceMetaSujet")) return true;
- if(attribut.equals("producteur")) return true;
- if(attribut.equals("progression")) return true;
- if(attribut.equals("version")) return true;
-
-
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeEvalNameNode.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeEvalNameNode.java
deleted file mode 100644
index 45f1754..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeEvalNameNode.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package list;
-
-import nodeAC.nodeAC;
-
-public class listeEvalNameNode {
-
- /**
- * Les nodes ci-dessous peuvent avoir l'attribut evalNameNode.
- * @param nod
- * @return
- */
- public static boolean isNodeEvalNameNode(nodeAC nod) {
-
- if(nod.getNomElt().contains("meta:")) return true;
- if(nod.getNomElt().contains("dc:")) return true;
- if(nod.getNomElt().contains("text:")) return true;
-
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeAnalyseWriter.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeAnalyseWriter.java
deleted file mode 100644
index af81da7..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeAnalyseWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package list;
-
-public class listeNodeAnalyseWriter {
-
- /**
- * Liste des node de l'application analyseWriter.
- * @param nameNode
- * @return
- */
- public static boolean isNodeAnalyseWriter(String nameNode) {
-
- if(nameNode.equals("fichier")) return true;
- if(nameNode.equals("style:paragraph")) return true;
- if(nameNode.equals("section")) return true;
- if(nameNode.equals("page")) return true;
- if(nameNode.equals("structurepage")) return true;
- if(nameNode.equals("setting")) return true;
- if(nameNode.equals("office:meta")) return true;
- if(nameNode.equals("style:page")) return true;
- if(nameNode.equals("sequences")) return true;
- if(nameNode.equals("numerotationchapitre")) return true;
- if(nameNode.equals("frames")) return true;
- if(nameNode.equals("sections")) return true;
- if(nameNode.equals("tableaux")) return true;
- if(nameNode.equals("biblio")) return true;
- if(nameNode.equals("tablematieres")) return true;
- if(nameNode.equals("tableillustrations")) return true;
- if(nameNode.equals("structurepage")) return true;
- if(nameNode.equals("csv")) return true;
- if(nameNode.equals("zip")) return true;
- if(nameNode.equals("plagiarism")) return true;
- if(nameNode.equals("text:similarity")) return true;
- if(nameNode.equals("color")) return true;
- if(nameNode.equals("translation")) return true;
- if(nameNode.equals("import_moodle")) return true;
-
-
- return false;
-}
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeFormatageDirectDeWriter.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeFormatageDirectDeWriter.java
deleted file mode 100644
index 6476d57..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeNodeFormatageDirectDeWriter.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package list;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import nodeAC.nodeAC;
-
-public class listeNodeFormatageDirectDeWriter {
- /**
- * La liste des nodes qui peuvent avoir un formatage direct (pour évaluation uniquement avec le code évaluateur ‼.
- * ont comme parent le node "style:paragraph" et comme valeur de l'attribut "style:name" la lettre P ou T suivi d'un nombre.
- * @param nod
- * @return
- */
- public static boolean isFormatageDirect(nodeAC nod) {
-
- //** Si le nom du style est P1, P2, ...Pxx ou T1, T2, ..., Txx alors retourn true.
- if(nod.chemin().contains("style:paragraph")) {
-
- nodeAC nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
-
- String nomDuStle = nodStyleParent.getAttributs().get("style:name");
- Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$");
- Matcher m = p.matcher(nomDuStle);
- if(m.find()) return true;
- }
-
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeRechercheParAnchorPageNumber.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeRechercheParAnchorPageNumber.java
deleted file mode 100644
index 70a0e08..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/list/listeRechercheParAnchorPageNumber.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package list;
-
-import nodeAC.nodeAC;
-
-public class listeRechercheParAnchorPageNumber {
-
-
- public static boolean isRechercheParAnchorPageNumber(nodeAC nod) {
- if(nod.getNomElt().equals("draw:frame")) return true;
- return false;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Attributs.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Attributs.java
deleted file mode 100644
index f7d69df..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Attributs.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package nodeAC;
-
-import java.util.LinkedHashMap;
-
-public class Attributs extends LinkedHashMap{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- @Override
- public String put(String key, String value) {
- if(key!=null && value!=null) {
- return super.put(key, value);
- }
- return null;
- }
-
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Ecriture.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Ecriture.java
deleted file mode 100644
index c00b0ba..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/Ecriture.java
+++ /dev/null
@@ -1,558 +0,0 @@
-package nodeAC;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Set;
-
-
-
-
-
-
-public class Ecriture {
-
-
- public enum LocationFile {
- DansDossier,
- UniquementFichier,
- }
-
- public enum typeFichier {
- fichier_analyse,
- verification_etudiant,
- fichier_etudiant,
- }
-
-
-
- /**
- * Ecriture de node au format XML dans un StringBuilder.
- *
- * @param nod Le node à écire.
- * @param indent Le nombre d'indentation.
- * @return Un StringBuilder contenant le format XML du node.
- * @throws IOException Exception
- */
- public static StringBuilder ecritureNodeWithIndent(nodeAC nod,Integer indent) {
- if(nod!=null) {
-
- StringBuilder sb = new StringBuilder();
-
- String tab = "";
- String tab1 = "\t";
- for(int i = 0 ; i < indent ; i++) {
- tab = tab + tab1;
- }
-
- sb.append("\r\r"+tab + "<" + nod.getNomElt() );
- Set keys = nod.getAttributs().keySet();
- for (String key : keys) {
- sb.append(" " + key + "=\"" + nod.getAttributs().get(key)+"\"");
- }
- sb.append(">");
-
- int indexContenu = 0 ;
- if(nod.getContenu().size()>indexContenu) {
- sb.append(nod.getContenu().get(indexContenu));
- indexContenu++;
- }
-
-
- if(nod.getNodes().size()>0) {
- indent++;
-
- for(int i = 0 ; i < nod.getNodes().size(); i++) {
- sb.append(ecritureNodeWithIndent(nod.getNodes().get(i),indent));
-
- if(nod.getContenu().size()>indexContenu) {
- sb.append(nod.getContenu().get(indexContenu));
- indexContenu++;
- }
- }
-
- sb.append("\r\r" + tab +"" + nod.getNomElt() + ">");
-
- }else {
- sb.append("" + nod.getNomElt() + ">");
- }
-
- return sb;
- }
- return null;
-
- }
-
- /**
- * Ecriture de node au format XML dans un StringBuilder.
- *
- * @param nod Le node à écire.
- * @param indent Le nombre d'indentation.
- * @return Un StringBuilder contenant le format XML du node.
- * @throws IOException Exception
- */
- public static StringBuilder ecritureNode(nodeAC nod) {
- if(nod!=null) {
-
- StringBuilder sb = new StringBuilder();
-
-
-
- sb.append("\r\r<" + nod.getNomElt() );
- Set keys = nod.getAttributs().keySet();
- for (String key : keys) {
- sb.append(" " + key + "=\"" + nod.getAttributs().get(key)+"\"");
- }
- sb.append(">");
-
- int indexContenu = 0 ;
- if(nod.getContenu().size()>indexContenu) {
- sb.append(nod.getContenu().get(indexContenu));
- indexContenu++;
- }
-
-
- if(nod.getNodes().size()>0) {
-
- for(int i = 0 ; i < nod.getNodes().size(); i++) {
- sb.append(ecritureNode(nod.getNodes().get(i)));
-
- if(nod.getContenu().size()>indexContenu) {
- sb.append(nod.getContenu().get(indexContenu));
- indexContenu++;
- }
- }
-
- sb.append("\r\r" + nod.getNomElt() + ">");
-
- }else {
- sb.append("" + nod.getNomElt() + ">");
- }
-
- return sb;
- }
- return null;
-
- }
-
-
- /**
- * Ecriture du commentaire du fichier au format XML qui se place au début.
- * @return Le commentaire.
- */
- static public String ecritureCommentaireFichierAnalyse() {
-
-
-
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-// fichier.write("\r\r");
-
-
- return "\r\r";
- }
-
- /**
- * Ecriture commentaire du fichier de vérification.
- * @return
- */
- static private String ecritureCommentaireVerificationHistorique() {
- return "\r\n"+
- "";
- }
-
-
-
- /**
- * Ecriture d'un node dans un fichier au format XML.
- *
- * @param nod Le node à écrire dans un fichier.
- * @param filename Le nom du fichier.
- * @param pathDestination Le répertoire de destination qui sera inclus dans le répertoire courant de l'application.
- * @param fourniDestination Le répertoire courant de l'application.
- * @throws IOException Exception Input Output
- */
- static public void ecritureNodeEnXML(nodeAC nod, String filename, String pathDestination, Ecriture.typeFichier Type) throws IOException {
-
- if(nod==null) {
- System.out.println("Le node à écrire est null.");
- }
-
- if(filename.contains(".xml")) filename = filename.substring(0,filename.lastIndexOf(".xml"));
-
- Path outputFilePath = Paths.get(pathDestination +"/"+ filename + ".xml");
-
- BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
-
- if(Type == Ecriture.typeFichier.fichier_analyse) {
- // écriture de l'aide au début du fichier
- fichier.write(ecritureCommentaireFichierAnalyse());
-
- //Suppression de l'historique
- nodeAC n1 = nod.retourneFirstEnfantsByName("historique");
- if(n1!=null) nod.getNodes().remove(n1);
- }
-
- if(Type == Ecriture.typeFichier.verification_etudiant) {
- // écriture de l'aide au début du fichier
- fichier.write(ecritureCommentaireVerificationHistorique());
- }
-
-
- fichier.write(ecritureNodeWithIndent(nod, 0).toString());
-
-
-
-
- fichier.close();
-
- }
-
- /**
- * Ce node permet la configuration personnalisé de l'application.
- * Ajoute le node setting avec les différentes valeurs par défaut.
- *
- * @param sujet Le node du sujet.
- * @return Le node du sujet avec le node setting ajouté.
- */
- public static nodeAC addSetting(nodeAC sujet) {
- //nodeAC setting
- nodeAC setting = new nodeAC();
- setting.setNomElt("settings");
- setting.getAttributs().put("culture","FR");
-
-
- //nodeAC csv
- nodeAC csv = new nodeAC();
- csv.setNomElt("csv");
- csv.getAttributs().put("encoding", "UTF-8");
- csv.getAttributs().put("separator", ";");
- csv.setContenu("choose the encoding from this list : UTF-8 US-ASCII ISO-8859-1 UTF-16BE UTF-16LE UTF-16");
- csv.setClose(true);
-
- //nodeAC export du csv
- nodeAC export = new nodeAC();
- export.setNomElt("import_moodle");
- export.getAttributs().put("email", "adresse");
- export.getAttributs().put("id", "identification");
- export.getAttributs().put("firstname", "prenom");
- export.getAttributs().put("name", "nom");
- export.setClose(true);
-
- //nodeAC taille zip
- nodeAC zip = new nodeAC();
- zip.setNomElt("zip");
- zip.getAttributs().put("size", "48000000");
- zip.getAttributs().put("nameZip", "feedbackMoodle");
- zip.isClose();
-
- //nodeAC verif
- nodeAC plagiarism = new nodeAC();
- plagiarism.setNomElt("plagiarism");
- plagiarism.getAttributs().put("number_match", "2");
- plagiarism.getAttributs().put("mini_number_modification", "-1");
- plagiarism.getAttributs().put("nombres_modifications_simultané_maxi", "100");
- plagiarism.setClose(true);
-
- //construction nodeAC similitude
- nodeAC similarity = new nodeAC();
- similarity.setNomElt("text:similarity");
- similarity.getAttributs().put("tolerance_characters", "5");
- similarity.getAttributs().put("tolerance_text", "0.79");
- similarity.setClose(true);
-
- //nodeAC color
- nodeAC color = new nodeAC();
- color.setNomElt("color");
- color.getAttributs().put("tolerance_rouge", "30");
- color.getAttributs().put("tolerance_vert", "30");
- color.getAttributs().put("tolerance_bleu", "30");
- color.setClose(true);
-
- //construction du nodeAC setting
- csv.getNodes().add(export);
- setting.getNodes().add(csv);
- setting.getNodes().add(zip);
- setting.getNodes().add(plagiarism);
- setting.getNodes().add(similarity);
- setting.getNodes().add(color);
-
- //ajoute la nodeAC translation
- setting.getNodes().add(translation());
-
-
- // ajoute le nodeAC setting au nodeAC sujet
- sujet.getNodes().add(setting);
-
- //fermeture du nodeAC
- setting.setClose(true);
-
- return sujet;
- }
-
-
- /**
- * Retourne le node translation.
- * @return Le node translation.
- */
- public static nodeAC translation() {
- nodeAC translation = new nodeAC();
- translation.setNomElt("translation");
- translation.getAttributs().put("class", "tooltip1");
- translation.getAttributs().put("classtext", "tooltiptext1");
-
- //les champs
- translation.getNodes().add(nodeTranslation("text:initial-creator..name","La valeur du champ premier auteur","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("dc:subject..texte","Valeur de la méta donnée -!b!-Sujet-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Description","#111166","",false));
- translation.getNodes().add(nodeTranslation("dc:title..texte","Valeur de la méta donnée -!b!-Titre-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Description", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:title..name","Valeur de la méta donnée -!b!-Titre-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Description", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:editing-cycles..name","Valeur du champ révision","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:creator..name","Auteur des modifications","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("meta:initial-creator..texte","Premier auteur du fichier","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("meta:user-defined..Auteur2","La méta donnée -!b!-Auteur2-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Propriétés personnalisées-!br!-Cliquez sur le bouton "Ajouter une propriété" pour ajouter une méta données.-!br!--!br!--!b!--!u!-ATTENTION-!/u!--!/b!-: Vous devez tapez comme nom de la méta donnée -!b!-Auteur2-!b!--!br!-Exactement ces caractères, ne tapez pas d'espace après le dernier caractère.-!br!-Sinon vous aurez une valeur -!b!-null-!/b!-.", "#111166","",true));
- translation.getNodes().add(nodeTranslation("meta:user-defined..Date..du..contrôle","La méta donnée -!b!-Date du contrôle-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Propriétés personnalisées-!br!-Clique sur le bouton "Ajouter une propriété" pour ajouter une méta données.-!br!--!br!--!b!--!u!-ATTENTION-!/u!--!/b!-: Vous devez tapez comme nom de la méta donnée -!b!-Date du contrôle-!b!--!br!-Exactement ces caractères, ne tapez pas d'espace après le dernier caractère.-!br!-Sinon vous aurez une valeur -!b!-null-!/b!-.", "#111166","",true));
- translation.getNodes().add(nodeTranslation("meta:user-defined..Département","La méta donnée -!b!-Département-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Propriétés personnalisées-!br!-Cliquez sur le bouton "Ajouter une propriété" pour ajouter une méta données.-!br!--!br!--!b!--!u!-ATTENTION-!/u!--!/b!-: Vous devez tapez comme nom de la méta donnée -!b!-Département-!b!--!br!-Exactement ces caractères, ne tapez pas d'espace après le dernier caractère.-!br!-Sinon vous aurez une valeur -!b!-null-!/b!-.", "#111166","",true));
- translation.getNodes().add(nodeTranslation("meta:user-defined..Groupe","La méta donnée -!b!-Groupe-!/b!-","Menu Fichier/Propriétés-!br!-Onglet Propriétés personnalisées-!br!-Clique sur le bouton "Ajouter une propriété" pour ajouter une méta données.-!br!--!br!--!b!--!u!-ATTENTION-!/u!--!/b!-: Vous devez tapez comme nom de la méta donnée -!b!-Groupe-!b!--!br!-Exactement ces caractères, ne tapez pas d'espace après le dernier caractère.-!br!-Sinon vous aurez une valeur -!b!-null-!/b!-.", "#111166","",true));
- translation.getNodes().add(nodeTranslation("text:user-defined..text:name","La méta donnée personnalisée","Menu Fichier/Propriétés-!br!-Onglet Propriétés personnalisées-!br!-Clique sur le bouton "Ajouter une propriété" pour ajouter une méta données.", "#111166","",true));
- translation.getNodes().add(nodeTranslation("text:initial-creator..name","La valeur du champ premier auteur","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:creation-date..Nom..du..nodeAC","Champ date de création","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:creator..Nom..du..nodeAC","Champ auteur","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("text:date..Nom..du..nodeAC","Champ date de modification","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("dc:subject..Contenu..textuel","Champ sujet","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("dc:title..Contenu..textuel","Champ titre","", "#111166","",false));
- translation.getNodes().add(nodeTranslation("meta:user-defined..meta:name","Propriété personnalisée","", "#111166","",false));
-
-
-
-
- //style de paragraphe
- translation.getNodes().add(nodeTranslation("style:style..style:master-page-name","Enchaînement insère saut de page","Le style de paragraphe doit insérer un saut de page.", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:style..style:next-style-name","Style du paragraphe suivant","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:border-bottom","Bordure basse du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:border-top","Bordure haute du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:border-left","Bordure gauche du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:border-right","Bordure droite du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:keep-with-next","Conserver avec le paragraphe suivant","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:keep-together","Ne pas scinder le paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:margin-top","Espacement au dessus du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:margin-bottom","Espacement en dessous du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:orphans","Nombre de ligne d'orpheline","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:widows","Nombre de ligne de veuve","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:text-underline-color","Couleur de soulignement du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:text-underline-style","Style du soulignement du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:text-underline-width","Epaisseur du trait de soulignement du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:font-name","Police de caractère du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:font-size","Taille de la police de caractère du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:font-style-name","Style de la police de caractère du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:text-shadow","Effet de caractère ombré du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:text-align","Alignement du paragraphe","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:font-variant","Effet de caractère petite majuscule","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:line-height","Interligne","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:text-indent","Retrait de première ligne","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:style..style:parent-style-name","Hérite du style","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:text-indent","Retrait de première ligne","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:padding-top","Remplissage (espacement) en haut","Les padding sont des marges intérieures.", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:padding-left","Remplissage (espacement) à gauche","Les padding sont des marges intérieures.", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:padding-right","Remplissage (espacement) à droite","Les padding sont des marges intérieures.", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:padding-bottom","Remplissage (espacement) en bas","Les padding sont des marges intérieures.", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..style:text-underline-type","Style du trait de soulignage","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..style:tab-stop-distance","Distance du stop de la tabulation","", "#118811","https://moodle.univ-artois.fr/cours/",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:font-weight","Style texte GRAS","", "#000000","",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:font-style","Style texte italic","", "#000000","",false));
-
- //style de page
- translation.getNodes().add(nodeTranslation("style:master-page..style:name","Nom du style de page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:style..style:name","Nom du style de page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout..style:page-usage","Mise en page de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:page-width","Largeur de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:page-height","Hauteur de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:margin-right","Marge à droite de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:border","Les 4 bordures de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:margin-left","Marge à gauche de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:margin-bottom","Marge en bas de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:margin-top","Marge en haut de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:margin-right","Marge à droite de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..fo:padding","Remplissage (marges intéreures)","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:chapter..text:display","Champ chapitre","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:chapter..Contenu..textuel","Valeur du champ chapitre","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border-bottom","-!b!-Entête ou Pied de page-!/b!- : Bordure inférieure","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border-right","-!b!-Entête ou Pied de page-!/b!- : Bordure droite","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border-left","-!b!-Entête ou Pied de page-!/b!- : Bordure gauche","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border-top","-!b!-Entête ou Pied de page-!/b!- : Bordure haute","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:margin-bottom","-!b!-Entête ou Pied de page-!/b!- : Marge en dessous","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:margin-top","-!b!-Entête ou Pied de page-!/b!- : Marge au dessus","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:margin-top","-!b!-Entête ou Pied de page-!/b!- : Marge au dessus","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:margin-right","-!b!-Entête ou Pied de page-!/b!- : Marge à droite","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:margin-left","-!b!-Entête ou Pied de page-!/b!- : Marge à gauche","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:master-page..style:next-style-name","Style de la page suivante","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:bookmark-ref..text:ref-name","Nom du repère de texte","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:bookmark-ref..text:reference-format","Réfèrence du repère de texte","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:bookmark-ref..Contenu..textuel","Contenu textuel du repère de texte","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:columns..fo:column-count","Nombre de colonne","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:columns..fo:column-gap","Espacement entre les colonnes-!br!--!i!-Gouttière-!/i!-","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border","Les 4 bordures du pied de page-!br!--!i!-droite gauche bas haut-!/i!-","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:border","Les 4 bordures de l'entête-!br!--!i!-droite gauche bas haut-!/i!-","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:tab..name","Tabulation","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:tab..Contenu..textuel","Contenu textuel après tabulation","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:initial-creator..Contenu..textuel","Champ auteur (premier auteur)","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:creator..Contenu..textuel","Champ auteur (modifié)","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..style:num-format","Format de la numérotation","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("text:page-number..text:select-page","Champ numérotation de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:page-layout-properties..style:print-orientation","Orientation de la page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("style:header-footer-properties..fo:min-height","Hauteur minimal du pied de page","", "#995511","",false));
- translation.getNodes().add(nodeTranslation("page..style:page_number","Champ - numéro de la page","", "#000000","",false));
-
-
- //style structure
- translation.getNodes().add(nodeTranslation("page..style:master-page-name","Nom du style de page","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("page..numeroabsolue","Position (numéro) absolue de la page-!br!-par rapport à l'ensemble des pages","C'est l'ordre d'apparition de la page lorsque le mode "-!b!-Livre-!/b!-" est utilisé.-!br!-Dans le mode d'affichage "-!b!-Livre-!/b!-" toutes les pages s'affichent, y compris les pages vides.", "#903BA9","",true));
- translation.getNodes().add(nodeTranslation("text:title..Contenu..textuel","Valeur de la méta donnée "-!b!-Titre-!/b!-"","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:subject..Contenu..textuel","Valeur de la méta donnée "-!b!-Sujet-!/b!-"","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..draw:name","Nom de l'objet indiqué dans-!br!-l'onglet "-!b!-Options-!/b!-"-!br!-de la boite "-!b!--!u!-Propriétés-!/u!--!/b!-" de l'objet.","Si l'objet ne se nomme pas -!b!--!u!-EXACTEMENT-!/u!--!/b!- comme indiqué dans la consigne.-!br!--!br!-L'algorithme d'analyse ne pourra pas trouver l'objet.Vous aurez que des valeurs -!b!--!u!-NULL-!/u!--!/b!--!br!--!br!-Faites attention à la case (majuscule et minuscule). Ne tapez pas d'espace après le dernier caractère. Ne tapez pas de guillemet, etc.", "#903BA9","",true));
- translation.getNodes().add(nodeTranslation("text:description..Contenu..textuel","Champ -!b!-Commentaires-!/b!-","Pour insérer le champ "-!b!-Commentaires-!/b!-".-!br!-Sélectionner le menu Insertion/Champ/Autres champs...-!br!--!br!-Dans la boite de dialogue "Champ"-!br!-Onglet "Info document"", "#903BA9","",true));
- translation.getNodes().add(nodeTranslation("page..style:page-usage","Mise en page de la page","Dans les -!b!-Propriétés-!/b!- du style de page-!br!-Onglet -!b!-Page-!/b!--!br!--!b!-Mise en page-!/b!-", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:illustration-index-source..text:caption-sequence-name","Catégorie de la légende","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:index-title-template..Contenu..textuel","Titre de l'index","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:table-of-content..text:protected","Protection de l'index","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:table-of-content-source..text:outline-level","Niveau de plan de l'index-!br!-Type "Table des matières"", "", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:conditional-text..text:condition","La condition du texte conditionnel","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:conditional-text..text:string-value-if-true","Si la condition est -!b!-Vrai-!/b!- affiche le texte","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:conditional-text..text:string-value-if-false","Si la condition est -!b!-Fausse-!/b!- affiche le texte","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:date..text:fixed","La date est fixe","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:date..style:data-style-name","Style de la date","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:span..Contenu..textuel","Contenu textuel formatage local","-!b!--!u!-Attention formatage local:-!/u!--!/b!--!br!-Si le texte n'a pas été trouvé.-!br!-Vous devez savoir que l'application recherche le texte par son contenu.-!br!-Mais aussi par le type d'élément, ici un formatage local.-!br!-Il est probable que tous les autres attributs (propriétés) de ce formatage local soient "null".-!br!-Vérifier le contenu textuel, ou vérifier que vous avez formaté localement ce text.-!br!-N'oubliez pas d'effacer le format avant de reformater le texte.", "#000000","",true));
- translation.getNodes().add(nodeTranslation("text:p..Contenu..textuel","Contenu textuel (paragraphe)","-!b!--!u!-Attention paragraphe de texte:-!/u!--!/b!--!br!-Si le texte de ce paragraphe n'a pas été trouvé.-!br!-Vous devez savoir que l'application recherche le paragraphe par son contenu.-!br!-Mais aussi par le type de l'élément, ici un paragraphe.-!br!-Il est probable que tous les autres attributs (propriétés) de ce paragraphe soient "null".-!br!-Vérifier le contenu textuel de votre paragraphe, ou vérifier que c'est bien un paragraphe.-!br!-", "#000000","",true));
- translation.getNodes().add(nodeTranslation("text:date..text:date-value","La date","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:section..text:name","Nom de la section","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:section..text:condition","Condition de la section","-!b!--!u!-Attention :-!/u!--!/b!--!br!-Ne tapez pas d'espace après le dernier guillemet du texte.-!br!-Ne tapez pas d'espace après le dernier caractère de votre condition.", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:section..Contenu..textuel","Contenu textuel de la section","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:section..text:display","Masqué la section","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:break-before","Type de saut placé avant","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:padding","Remplissage (padding) du paragraphe","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:text-properties..fo:color","Couleur de la police","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:h..text:style-name","Nom du style du paragraphe Titre","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("text:change-start..Contenu..textuel","Insertion du texte","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:margin-right","Retrait après le paragraphe","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:margin-left","Retrait avant le paragraphe","", "#903BA9","",false));
- translation.getNodes().add(nodeTranslation("style:paragraph-properties..fo:border","Style des quatre bordures","", "#903BA9","",false));
-
-
- //frame
- translation.getNodes().add(nodeTranslation("draw:frame..text:anchor-type","Ancrage de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..text:anchor-page-number","Ancrage dans la page numéro","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..svg:y","Position (distance) verticale-!br!-de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..svg:x","Position (distance) horizontale-!br!-de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..svg:height","Hauteur de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..svg:width","Largeur de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:padding","Remplissage (marge)-!br!-avec les bords du cadre de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:vertical-pos","Position verticale de l'objet par rapport à ","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:horizontal-pos","Position horizontale de l'objet par rapport à ","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:border","Les 4 bordures de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:margin-bottom","Espacement en dessous de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:margin-top","Espacement au dessus de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:margin-right","Espacement à droite de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..fo:margin-left","Espacement à gauche de l'objet","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:horizontal-rel","Position horizontale par rapport à ","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:vertical-rel","Position verticale par rapport à ","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:wrap","Adaptation du texte","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:number-wrapped-paragraphs","Adaptation du texte-!br!-nombre de paragraphe adapté","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:wrap-contour","Adaptation du texte "-!b!-Contour-!/b!-"","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("text:sequence..text:name","Nom de la variable de -!b!-Séquence-!/b!- pour légender","Menu Insertion/Champ/Autres champs...-!br!-Onglet "-!b!-Variables-!/b!-"", "#FF5B00","",true));
- translation.getNodes().add(nodeTranslation("text:sequence..Contenu..textuel","La légende avec la variable de -!b!-Séquence-!/b!-","Pour légender une image, il faut un clic droite sur l'image et sélectionner -!b!-Insérer une légende...-!/b!--!br!-Cependant, il faut retirer la protection du contenu.", "#FF5B00","",true));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:protect","Protection de l'objet","Dans la boite de dialogue -!b!-Propriétés-!/b!--!br!-Onglet Option-!br!-Vou devez cocher les protections (case à cocher)", "#FF5B00","",true));
- translation.getNodes().add(nodeTranslation("style:graphic-properties..style:wrap-contour-mode","Mode contour du texte","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:text-box..fo:min-height","Hauteur du frame-!br!-(cadre de texte)","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("draw:frame..Contenu..textuel","Paragraphe d'ancrage","", "#FF5B00","",false));
-
- //numérotation hiérarchisée
- translation.getNodes().add(nodeTranslation("text:outline-level-style..style:num-suffix","Suffix (après la numérotation)","", "#C1BA00","",false));
- translation.getNodes().add(nodeTranslation("text:outline-level-style..style:num-prefix","Prefix (devant la numérotation)","-!b!--!u!-Attention :-!/u!--!/b!--!br!-Il peut y avoir devant la numération un espace.-!br!--!br!-Par exemple : -!b!-§[espace]-!/b!-", "#C1BA00","",true));
- translation.getNodes().add(nodeTranslation("text:outline-level-style..style:num-format","Format de la numérotation","", "#C1BA00","",false));
- translation.getNodes().add(nodeTranslation("text:outline-level-style..text:level","Niveau de la numérotation","", "#C1BA00","",false));
- translation.getNodes().add(nodeTranslation("style:list-level-properties..text:list-level-position-and-space-mode","Position, Espacement de la numérotation","", "#C1BA00","",false));
- translation.getNodes().add(nodeTranslation("style:list-level-label-alignment..text:label-followed-by","Numérotation suivi d'un(e)","Dans la boite de dialogue "Numérotation des chapitres"-!br!-Onglet Position-!br!-Numerotation suivi par.", "#C1BA00","",true));
- translation.getNodes().add(nodeTranslation("text:outline-level-style..text:display-levels","Nombre de niveau affiché par la numérotation","Dans la boite de dialogue "Numérotation des chapitre"-!br!-Afficher les sous-niveaux.", "#C1BA00","",true));
-
- //Table, index, bibliographie
- translation.getNodes().add(nodeTranslation("text:a..Contenu..textuel","Le texte du lien","Le texte du lien qui permet d'atteindre le paragraphe.", "#0000FF","",true));
- translation.getNodes().add(nodeTranslation("text:bibliography..Contenu..textuel","Tout le contenu textuel de la biliographie","", "#0000FF","",false));
- translation.getNodes().add(nodeTranslation("text:index-body..Contenu..textuel","Tout le contenu textuel de l'index","", "#0000FF","",false));
- translation.getNodes().add(nodeTranslation("text:table-of-content..Contenu..textuel","Tout le contenu textuel de la table","", "#0000FF","",false));
- translation.getNodes().add(nodeTranslation("text:illustration-index..Contenu..textuel","Tout le contenu textuel de la table des figures","", "#0000FF","",false));
-
- //Les tableaux
- translation.getNodes().add(nodeTranslation("table:table-row..Contenu..textuel","Tout le contenu textuel d'un ligne de la table","", "#0000FF","",false));
- translation.getNodes().add(nodeTranslation("table:table-cell..Contenu..textuel","Tout le contenu textuel d'une cellule de la table","", "#0000FF","",false));
-
- //database
- translation.getNodes().add(nodeTranslation("text:database-display..name","Base de données","", "#0000FF","",false));
- translation.getNodes().add(nodeTranslation("text:database-display..text:table-type","Type de la source de données","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("text:database-display..text:column-name","Nom du champ de données","Ne tapez pas d'espace à la fin du nom de la colonne, Sinon Null.", "#FF5B00","",true));
- translation.getNodes().add(nodeTranslation("text:database-display..text:database-name","Nom de la base de données","", "#FF5B00","",false));
- translation.getNodes().add(nodeTranslation("text:database-display..text:table-name","Nom de la table de données","", "#FF5B00","",false));
-
-
- //variable de séquence
- translation.getNodes().add(nodeTranslation("text:sequence-decl..text:name","Variable de séquence","La variable de séquence permet de légender et de créer des index.-!br!-Pour ajouter une variable de séquence, vous devez sélectionner le menu-!br!-Insertion/Champ/Autres champs...-!br!-Onglet "-!b!-Variables-!/b!-".", "#C1BA00","",true));
-
- //Retour à la ligne
- translation.getNodes().add(nodeTranslation("text:line-break..name","Retour à la ligne" ,"Retour à la ligne-!br!-Un retour à la ligne est différent d'un paragraphe.-!br!-Pour réaliser un retour à la ligne vous devez taper-!br!--!b!-SHIFT (majuscule) + ENTRÉE-!/b!-","#000000","",true));
- translation.getNodes().add(nodeTranslation("text:line-break..Contenu..textuel","Contenu textuel dans un retour à la ligne," ,"-!b!--!u!-Attention retour à la ligne:-!/u!--!/b!--!br!-Si le texte n'a pas été trouvé.-!br!-Vous devez savoir que l'application recherche le texte par son contenu.-!br!-Mais aussi par le type de l'élément, ici un retour à la ligne.-!br!-Il est probable que tous les autres attributs (propriétés) de ce paragraphe soient "null".-!br!-Vérifier le contenu textuel de votre paragraphe, ou vérifier que c'est bien un retour à la ligne.-!br!-", "#000000","",true));
- translation.getNodes().add(nodeTranslation("text:line-break..Nom..du..nodeAC","Retour à la ligne" ,"Retour à la ligne-!br!-Un retour à la ligne est différent d'un paragraphe.-!br!-Pour réaliser un retour à la ligne vous devez taper-!br!--!b!-SHIFT (majuscule) + ENTRÉE-!/b!-","#000000","",true));
-
- // tabulation
- translation.getNodes().add(nodeTranslation("text:tab..Nom..du..nodeAC","Tabulation" ,"Insertion d'un caractère tabulation","#000000","",true));
-
- // numérotation des pages
- translation.getNodes().add(nodeTranslation("text:page-number..Nom..du..nodeAC","Numéro de page" ,"Insertion du champ numéro de page","#000000","",true));
- translation.getNodes().add(nodeTranslation("text:page-count..Nom..du..nodeAC","Nombre de page" ,"Insertion du champ nombre de page","#000000","",true));
-
- //Paragraphe de texte
- translation.getNodes().add(nodeTranslation("text:p..name","Paragraphe de texte" ,"Paragraphe de texte-!br!-Un paragraphe de texte est créé avec la touche-!br!--!b!-ENTRÉE-!/b!-","#000000","",true));
- translation.getNodes().add(nodeTranslation("txt:p..Contenu..textuel","Contenu textuel dans un paragraphe de texte" ,"Paragraphe de texte-!br!-Un paragraphe de texte est créé avec la touche-!br!--!b!-ENTRÉE-!/b!-","#000000","",true));
- translation.getNodes().add(nodeTranslation("text:span..name","Texte formatage direct" ,"Le formatage direct des cacartères-!br!-Lorsque l'on modifie localement les attributs d'un texte (Gras, italic, taille, soulignage, etc.)","#000000","",true));
- translation.getNodes().add(nodeTranslation("text:span..Nom..du..nodeAC","Texte formatage direct des caractères" ,"Le formatage direct-!br!-Lorsque l'on modifie localement les attributs d'un texte (Gras, italic, taille, soulignage, etc.)","#000000","",true));
-
- //Espace
- translation.getNodes().add(nodeTranslation("text:s","Espace LO Writer","Un espace est inséré lorsque vous souhaitez un séparateur de mots à un endroit où un saut de ligne est acceptable.", "#000000","",true));
- translation.getNodes().add(nodeTranslation("text:s..name","Espace LO Writer","Un espace est inséré lorsque vous souhaitez un séparateur de mots à un endroit où un saut de ligne est acceptable.", "#000000","",true));
- translation.getNodes().add(nodeTranslation("text:s..Contenu..textuel","Espace suivi du texte","Un espace est inséré lorsque vous souhaitez un séparateur de mots à un endroit où un saut de ligne est acceptable.", "#000000","",true));
-
-
- return translation;
- }
-
-
- /**
- * Permet de réaliser les nodes de traduction.
- *
- * @param nameNode Le nom du nodeAC.
- * @param traduction La traduction qui s'affiche dans le feedback.
- * @param commentaire Le commentaire qui apparaît.
- * @return Le nodeAC traduction.
- */
- private static nodeAC nodeTranslation(String nameNode, String traduction, String commentaire, String color, String link, Boolean T) {
- nodeAC A = new nodeAC();
- A.setNomElt(nameNode);
- A.getAttributs().put("translate", traduction);
- A.setContenu(commentaire);
- A.getAttributs().put("color", color);
- if(T.equals(true)) A.getAttributs().put("image", "true");
- if(!link.isEmpty()) A.getAttributs().put("link", link);
- A.setClose(true);
- return A;
- }
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/EnsembleFichiers.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/EnsembleFichiers.java
deleted file mode 100644
index 333b7b7..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/EnsembleFichiers.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package nodeAC;
-
-import java.util.ArrayList;
-
-public class EnsembleFichiers {
- private static ArrayList ListeContentTableur = new ArrayList();
- private static ArrayList ListeNomDossier = new ArrayList();
- private static ArrayList ListeNomFichierFeedBack = new ArrayList();
- private static ArrayList ListeFichierods = new ArrayList();
- private static ArrayList ListeObjetGraphicTableur = new ArrayList();
- public static int size=0;
-
- public EnsembleFichiers() {
-
- }
-
- /**
- *
- */
- public void Initialise() {
- ListeNomDossier.clear();
- ListeNomFichierFeedBack.clear();
- ListeFichierods.clear();
- ListeObjetGraphicTableur.clear();
- }
-
- /**
- *
- * @param NomDossier
- * @param ContentWriter
- * @param contentT
- * @param contentB
- * @param fichierodt
- * @param fichierods
- * @param fichierodb
- * @param fichierObjectgraphicTableur
- * @param fichierFeedBack
- */
- public void AjouteEnsembleAnalyse(String NomDossier, String contentT,String fichierods,
- String fichierObjectgraphicTableur, String fichierFeedBack) {
- ListeContentTableur.add(contentT);
- ListeNomDossier.add(NomDossier);
- ListeObjetGraphicTableur.add(fichierObjectgraphicTableur);
- ListeFichierods.add(fichierods);
- ListeNomFichierFeedBack.add(fichierFeedBack);
- size++;
- }
-
-
- public ArrayList getListeNomDossier() {
- return ListeNomDossier;
- }
-
- public ArrayList getListeFichierods() {
- return ListeFichierods;
- }
-
-
- public int getSize() {
- return EnsembleFichiers.size;
- }
-
-
- public void setListeNomDossier(ArrayList listeNomDossier) {
- ListeNomDossier = listeNomDossier;
- }
-
- public void setListeFichierods(ArrayList listeFichierods) {
- ListeFichierods = listeFichierods;
- }
-
-
- public void setSize(int size) {
- EnsembleFichiers.size = size;
- }
-
- public ArrayList getListeObjetGraphicTableur() {
- return ListeObjetGraphicTableur;
- }
-
- public void setListeObjetGraphicTableur(ArrayList listeObjetGraphicTableur) {
- ListeObjetGraphicTableur = listeObjetGraphicTableur;
- }
-
- public ArrayList getListeNomFichierFeedBack() {
- return ListeNomFichierFeedBack;
- }
-
- public void setListeNomFichierFeedBack(ArrayList listeNomFichierFeedBack) {
- ListeNomFichierFeedBack = listeNomFichierFeedBack;
- }
-
- public ArrayList getListeContentTableur() {
- return ListeContentTableur;
- }
-
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/LecturesDossiers.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/LecturesDossiers.java
deleted file mode 100644
index 095b2cf..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/LecturesDossiers.java
+++ /dev/null
@@ -1,379 +0,0 @@
-package nodeAC;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.xml.sax.SAXException;
-
-import net.lingala.zip4j.core.ZipFile;
-import net.lingala.zip4j.model.FileHeader;
-
-public class LecturesDossiers {
-
-
- private static EnsembleFichiers EC = new EnsembleFichiers();
-
-
- public LecturesDossiers( Ecriture.LocationFile location, String patch) throws ParserConfigurationException, SAXException, IOException {
- String NomDossier = null;
- String leNomDuRepertoire = patch;
- String ContentT = null;
- String ContentObjectGraphicTableur = null;
-
- String fichierAnalyseods = null;
-
-
- File rep = new File(leNomDuRepertoire);
-
- if(location==Ecriture.LocationFile.DansDossier) {
- System.out.println();
-
- if(rep.isDirectory()) {
- File[] fichiers = rep.listFiles();
-
- for(int i=0; i fileHeaderList = (List) zipFile.getFileHeaders();
-
- for (int i = 0; i < fileHeaderList.size(); i++) {
- FileHeader fileHeader = (FileHeader) fileHeaderList.get(i);
- net.lingala.zip4j.io.ZipInputStream is = zipFile.getInputStream(fileHeader);
-
- if(fileHeader.getFileName().equals("content.xml")) {
- int uncompressedSize = (int) fileHeader.getUncompressedSize();
-
- OutputStream os = new ByteArrayOutputStream(uncompressedSize);
-
- int bytesRead;
-
- byte[] buffer = new byte[4096];
- while ((bytesRead = is.read(buffer)) != -1) {
- os.write(buffer, 0, bytesRead); // os le contenu du fichier
- }
- content = os.toString();
-
- }
- if(fileHeader.getFileName().equals("styles.xml")) {
- int uncompressedSize = (int) fileHeader.getUncompressedSize();
-
- OutputStream os = new ByteArrayOutputStream(uncompressedSize);
-
- int bytesRead;
-
- byte[] buffer = new byte[4096];
-
- while ((bytesRead = is.read(buffer)) != -1) {
- os.write(buffer, 0, bytesRead); // os le contenu du fichier
- }
- style = os.toString();
- }
- if(fileHeader.getFileName().equals("meta.xml")) {
- int uncompressedSize = (int) fileHeader.getUncompressedSize();
-
- OutputStream os = new ByteArrayOutputStream(uncompressedSize);
-
- int bytesRead;
-
- byte[] buffer = new byte[4096];
-
- while ((bytesRead = is.read(buffer)) != -1) {
- os.write(buffer, 0, bytesRead); // os le contenu du fichier
- }
- meta = os.toString();
- }
-
-
-
-
- }
- } catch (IOException ex) {
- ex.printStackTrace(System.err);
- } catch (net.lingala.zip4j.exception.ZipException e) {
- e.printStackTrace();
- }
-
- String tout = content + style + meta ;
-
-
- byte[] defaultBytes = tout.getBytes();
- //Charset def = Charset.defaultCharset();
- Charset utf8 = Charset.forName("utf-8");
- ByteBuffer bb = ByteBuffer.wrap(defaultBytes);
- CharBuffer cb = utf8.decode(bb);
- tout = cb.toString();
-
-
-
- return tout;
- }
-
- /**
- *
- * @param zipf
- * @return
- * @throws ParserConfigurationException
- * @throws SAXException
- * @throws IOException
- */
- private static String ContenuContentObject(File zipf) throws ParserConfigurationException, SAXException, IOException {
- String object= null;
-
- try {
- ZipFile zipFile = new ZipFile(zipf.getAbsolutePath());
-
- @SuppressWarnings("unchecked")
- List fileHeaderList = (List) zipFile.getFileHeaders();
-
-// int CompteurObject = 1;
-
- for (int i = 0; i < fileHeaderList.size(); i++) {
- FileHeader fileHeader = (FileHeader) fileHeaderList.get(i);
- net.lingala.zip4j.io.ZipInputStream is = zipFile.getInputStream(fileHeader);
-
- if(fileHeader.getFileName().contains("Object ") && fileHeader.getFileName().contains("/content.xml") ) {
- String num = fileHeader.getFileName();
- Pattern p = Pattern.compile("[a-zA-Z]");
- Matcher m = p.matcher(num);
- num = m.replaceAll("");
-
- p = Pattern.compile("/");
- m = p.matcher(num);
- num = m.replaceAll("");
-
- p = Pattern.compile(" ");
- m = p.matcher(num);
- num = m.replaceAll("");
-
- p = Pattern.compile("\\.");
- m = p.matcher(num);
- num = m.replaceAll("");
-
- int uncompressedSize = (int) fileHeader.getUncompressedSize();
-
- OutputStream os = new ByteArrayOutputStream(uncompressedSize);
-
- int bytesRead;
-
- byte[] buffer = new byte[4096];
-
- while ((bytesRead = is.read(buffer)) != -1) {
- os.write(buffer, 0, bytesRead); // os le contenu du fichier
- }
- object = "" + os.toString() + " " + object;
-
- }
-
-
- }
-
- } catch (IOException ex) {
- ex.printStackTrace(System.err);
- } catch (net.lingala.zip4j.exception.ZipException e) {
- e.printStackTrace();
- }
-
-
- String tout = object ;
- if(tout!=null) {
- byte[] defaultBytes = tout.getBytes();
- //Charset def = Charset.defaultCharset();
- Charset utf8 = Charset.forName("utf-8");
- ByteBuffer bb = ByteBuffer.wrap(defaultBytes);
- CharBuffer cb = utf8.decode(bb);
- tout = cb.toString();
- }
-
-
- return tout;
-}
-
- /**
- *
- * @return
- */
- public static EnsembleFichiers getEC() {
- return EC;
- }
-
- /**
- *
- * @param eC
- */
- public void setEC(EnsembleFichiers eC) {
- EC = eC;
- }
-
-
-
-
-
-}
diff --git a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/constructionNodeAvecString.java b/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/constructionNodeAvecString.java
deleted file mode 100644
index d763f0c..0000000
--- a/analyseCalc/analyseCalc/analyseCalc/analyseCalc/src/nodeAC/constructionNodeAvecString.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package nodeAC;
-
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-
-
-public class constructionNodeAvecString {
- private nodeAC nod;
-
-
- public constructionNodeAvecString() {
-
- }
-
- /**
- * Constructeur nodeAC à partir du fichier source ODF transformé en String.
- * @param code
- */
- public nodeAC NewNode(String code) {
- ArrayList suitenodes = new ArrayList();
-
- Pattern p3 = Pattern.compile("(<[.[^ /<]]{1,}>{1}|<[.[^ /<]]{1,}/>|<[.[^ /<]]{1,}\\p{Space}[.[^<]]{1,}(>|/>){1}|[[^< ].]{1,}>{1}|[.[^>\"<]]{1,})");
- Matcher m3 = p3.matcher(code);
- ArrayList nom = new ArrayList() ;
- while(m3.find()) {
- nom.add(code.substring(m3.start(), m3.end()));
- }
-
- String nomNode ="";
-
- for(int i =0; i < nom.size(); i++) {
-
- nodeAC No = new nodeAC();
- Attributs attributsNode = new Attributs();
- String codexml = nom.get(i);
-
-
- // Node sans attribut sans fermeture
- Pattern p = Pattern.compile("^<[.[^ /<]]{1,}>$");
- Matcher m = p.matcher(codexml);
- if(m.find()) {
- nomNode = codexml.substring(1, m.end()-1);
- if(nomNode.equals("?xml") || nomNode.equals("!--") ) continue;
- No.setNomElt(nomNode);
- suitenodes.add(No);
- continue;
- }
-
- // Node sans attribut avec fermeture
- p = Pattern.compile("^<[.[^ /<]]{1,}/>$");
- m = p.matcher(codexml);
- if(m.find()) {
- nomNode = codexml.substring(1, m.end()-2);
- if(nomNode.equals("?xml") || nomNode.equals("!--") ) continue;
- No.setNomElt(nomNode);
- suitenodes.add(No);
- No.setClose(true);
- continue;
- }
-
-
- // Node avec attribut sans fermeture
- p = Pattern.compile("^<[.[^ /<]]{1,}\\p{Space}[.[^<]]{1,}[^/]>$"); //^<[.[^ /<]]{1,}\\p{Space}[.[^<]]{1,}>$
- m = p.matcher(codexml);
- if(m.find()) {
- p = Pattern.compile("^<[.[^ /<]]{1,}\\p{Space}");
- m = p.matcher(codexml);
- if(m.find()) {
- nomNode = codexml.substring(1, m.end()-1);
- if(nomNode.equals("?xml") || nomNode.equals("!--") ) continue;
- No.setNomElt(nomNode);
- p = Pattern.compile("\\p{Space}[.[^ =]]{1,}=\"[.[^\"]]{1,}\"");
- m = p.matcher(codexml);
- while(m.find()) {
- String attr = codexml.substring(m.start()+1, m.end()).replace("\"", "");
- Pattern p2 = Pattern.compile("=");
- Matcher m2 = p2.matcher(attr);
- if(m2.find()) {
- attributsNode.put(attr.substring(0, m2.start()), attr.substring(m2.start()+1,attr.length()));
- }
- }
- No.setAttributs(attributsNode);
- }
- suitenodes.add(No);
- continue;
- }
-
-
- // Node avec attribut et avec fermeture
- p = Pattern.compile("^<[.[^ /<]]{1,}\\p{Space}[.[^<]]{1,}/>$");
- m = p.matcher(codexml);
- if(m.find()) {
- p = Pattern.compile("^<[.[^ /<]]{1,}\\p{Space}");
- m = p.matcher(codexml);
- if(m.find()) {
- nomNode = codexml.substring(1, m.end()-1);
- if(nomNode.equals("?xml") || nomNode.equals("!--") ) continue;
- No.setNomElt(nomNode);
- p = Pattern.compile("\\p{Space}[.[^ =]]{1,}=\"[.[^\"]]{1,}\"");
- m = p.matcher(codexml);
- while(m.find()) {
- String attr = codexml.substring(m.start()+1, m.end()).replace("\"", "");
- Pattern p2 = Pattern.compile("=");
- Matcher m2 = p2.matcher(attr);
- if(m2.find()) {
- attributsNode.put(attr.substring(0, m2.start()), attr.substring(m2.start()+1,attr.length()));
- }
- }
- No.setAttributs(attributsNode);
- }
- suitenodes.add(No);
- No.setClose(true);
- continue;
- }
-
- //contenu à ajouter au node
- codexml = codexml.replaceAll("(\n|\r)", "");
- p = Pattern.compile("^[.[^>\"<]]{1,}$");
- m = p.matcher(codexml);
- if(m.find()) {
- try {
- int index = suitenodes.size()-1;
- for(int j = index; index>=0; j--) {
- if(!suitenodes.get(j).isClose()) {
- if(suitenodes.get(j).getContenu().size()==index-j) {
- suitenodes.get(j).setContenu(codexml.substring(m.start(), m.end()));
- }else {
- int nbContenuVide = index-j-suitenodes.get(j).getContenu().size();
- for(int k = 0 ; k
- p = Pattern.compile("^[[^< ].]{1,}>{1}$");
- m = p.matcher(codexml);
- if(m.find()) {
- nomNode = codexml.substring(2, m.end()-1);
- ArrayList lesNodesEnfants = new ArrayList();
- int niveau = 0;
- for(int h=suitenodes.size()-1; h >=0;h--) {
- if(suitenodes.get(h).getNomElt().equals(nomNode) && !suitenodes.get(h).isClose()) {
- suitenodes.get(h).setNodes(lesNodesEnfants);
- suitenodes.get(h).setClose(true);
- suitenodes.get(h).setLevel(niveau);
- break;
- }else {
- if(!suitenodes.get(h).isClose()) {
- System.out.println("Erreur fatale ... le node " + suitenodes.get(h).getNomElt() +" n'est pas close.");
- System.out.println(codexml);
- System.exit(0);
- }
- lesNodesEnfants.add(suitenodes.get(h));
- }
- }
- for(int x=0; x< lesNodesEnfants.size();x++) {
- suitenodes.remove(lesNodesEnfants.get(x));
- }
- }
-
-
- }
-
- //remettre dans l'ordre les nodes de suitenode
- suitenodes = RemettreOrdreStructure(suitenodes);
- suitenodes = renverseOrdre(suitenodes);
-
- //initialisation du nodeAC;
- nod = new nodeAC();
-
- if(suitenodes.size()==1) {
- nod.setNomElt(suitenodes.get(0).getNomElt());
- nod.setAttributs(suitenodes.get(0).getAttributs());
- nod.setNodes(suitenodes.get(0).getNodes());
- nod.getContenu().addAll(suitenodes.get(0).getContenu());
- }
-
- if(suitenodes.size()>1) {
- nod.setNomElt("fichier");
- nod.setNodes(suitenodes);
-
- }
-
- setParentsAndLevel(nod,0);
-
- return nod;
- }
-
-
-
-
- /**
- * Très important car remet dans l'ordre le node.
- *
- * @param N
- * @return
- */
- private ArrayList RemettreOrdreStructure(ArrayList N) {
- ArrayList ordre = new ArrayList