diff --git a/bin/.gitignore b/bin/.gitignore
index f13ae4e..ea6304a 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -1 +1,12 @@
/app/
+/attributmini.png
+/saut.svg
+/sautmini.png
+/titre.svg
+/titremini.png
+/voir.svg
+/voirmini.png
+/what.svg
+/whatmini.png
+/MEPTL/
+/resources/
diff --git a/bin/app/create$1.class b/bin/app/create$1.class
index 469cf89..5c38a40 100644
Binary files a/bin/app/create$1.class and b/bin/app/create$1.class differ
diff --git a/bin/app/create$10.class b/bin/app/create$10.class
index 7852cb7..e0c595f 100644
Binary files a/bin/app/create$10.class and b/bin/app/create$10.class differ
diff --git a/bin/app/create$11.class b/bin/app/create$11.class
index c13f512..f8014c3 100644
Binary files a/bin/app/create$11.class and b/bin/app/create$11.class differ
diff --git a/bin/app/create$12.class b/bin/app/create$12.class
index 9246b20..c544648 100644
Binary files a/bin/app/create$12.class and b/bin/app/create$12.class differ
diff --git a/bin/app/create$13.class b/bin/app/create$13.class
index 8739c4f..564b7c3 100644
Binary files a/bin/app/create$13.class and b/bin/app/create$13.class differ
diff --git a/bin/app/create$14.class b/bin/app/create$14.class
index de2e3d3..4f6b8ae 100644
Binary files a/bin/app/create$14.class and b/bin/app/create$14.class differ
diff --git a/bin/app/create$15.class b/bin/app/create$15.class
index 4ab4260..c2f30be 100644
Binary files a/bin/app/create$15.class and b/bin/app/create$15.class differ
diff --git a/bin/app/create$16.class b/bin/app/create$16.class
index 05da56a..ad49bfa 100644
Binary files a/bin/app/create$16.class and b/bin/app/create$16.class differ
diff --git a/bin/app/create$17.class b/bin/app/create$17.class
index 5791eaf..97068d2 100644
Binary files a/bin/app/create$17.class and b/bin/app/create$17.class differ
diff --git a/bin/app/create$18.class b/bin/app/create$18.class
index dbe5785..f52e08a 100644
Binary files a/bin/app/create$18.class and b/bin/app/create$18.class differ
diff --git a/bin/app/create$19.class b/bin/app/create$19.class
index dd5a1ad..e2071e6 100644
Binary files a/bin/app/create$19.class and b/bin/app/create$19.class differ
diff --git a/bin/app/create$2.class b/bin/app/create$2.class
index ee4a3ef..ba46f0f 100644
Binary files a/bin/app/create$2.class and b/bin/app/create$2.class differ
diff --git a/bin/app/create$20.class b/bin/app/create$20.class
index e29d598..07ecbfa 100644
Binary files a/bin/app/create$20.class and b/bin/app/create$20.class differ
diff --git a/bin/app/create$21.class b/bin/app/create$21.class
index 9000f7d..6df719d 100644
Binary files a/bin/app/create$21.class and b/bin/app/create$21.class differ
diff --git a/bin/app/create$22.class b/bin/app/create$22.class
index 92369db..8359d6f 100644
Binary files a/bin/app/create$22.class and b/bin/app/create$22.class differ
diff --git a/bin/app/create$23.class b/bin/app/create$23.class
index c08951f..823da26 100644
Binary files a/bin/app/create$23.class and b/bin/app/create$23.class differ
diff --git a/bin/app/create$3.class b/bin/app/create$3.class
index 0d55b16..9e3e189 100644
Binary files a/bin/app/create$3.class and b/bin/app/create$3.class differ
diff --git a/bin/app/create$4.class b/bin/app/create$4.class
index c34d2f6..5300392 100644
Binary files a/bin/app/create$4.class and b/bin/app/create$4.class differ
diff --git a/bin/app/create$5.class b/bin/app/create$5.class
index 71a0cf0..3b81f07 100644
Binary files a/bin/app/create$5.class and b/bin/app/create$5.class differ
diff --git a/bin/app/create$6.class b/bin/app/create$6.class
index 90f3efa..7464512 100644
Binary files a/bin/app/create$6.class and b/bin/app/create$6.class differ
diff --git a/bin/app/create$7.class b/bin/app/create$7.class
index d55ba4a..b3bad16 100644
Binary files a/bin/app/create$7.class and b/bin/app/create$7.class differ
diff --git a/bin/app/create$8.class b/bin/app/create$8.class
index ae5bb94..844838b 100644
Binary files a/bin/app/create$8.class and b/bin/app/create$8.class differ
diff --git a/bin/app/create$9.class b/bin/app/create$9.class
index 98b690a..0c8c792 100644
Binary files a/bin/app/create$9.class and b/bin/app/create$9.class differ
diff --git a/bin/app/create.class b/bin/app/create.class
index 890d53e..e13e9af 100644
Binary files a/bin/app/create.class and b/bin/app/create.class differ
diff --git a/bin/app/evaluate$1.class b/bin/app/evaluate$1.class
index 65e0929..baf70ba 100644
Binary files a/bin/app/evaluate$1.class and b/bin/app/evaluate$1.class differ
diff --git a/bin/app/evaluate$10.class b/bin/app/evaluate$10.class
index c12c0c4..a381919 100644
Binary files a/bin/app/evaluate$10.class and b/bin/app/evaluate$10.class differ
diff --git a/bin/app/evaluate$11.class b/bin/app/evaluate$11.class
index d7ad2d4..d2f2d6f 100644
Binary files a/bin/app/evaluate$11.class and b/bin/app/evaluate$11.class differ
diff --git a/bin/app/evaluate$12.class b/bin/app/evaluate$12.class
index 84ad983..a477cc0 100644
Binary files a/bin/app/evaluate$12.class and b/bin/app/evaluate$12.class differ
diff --git a/bin/app/evaluate$13.class b/bin/app/evaluate$13.class
index e76898b..472b02b 100644
Binary files a/bin/app/evaluate$13.class and b/bin/app/evaluate$13.class differ
diff --git a/bin/app/evaluate$14.class b/bin/app/evaluate$14.class
index 0c8d69d..47696b3 100644
Binary files a/bin/app/evaluate$14.class and b/bin/app/evaluate$14.class differ
diff --git a/bin/app/evaluate$15.class b/bin/app/evaluate$15.class
index e220828..3033574 100644
Binary files a/bin/app/evaluate$15.class and b/bin/app/evaluate$15.class differ
diff --git a/bin/app/evaluate$16.class b/bin/app/evaluate$16.class
index 8693f12..06c2de3 100644
Binary files a/bin/app/evaluate$16.class and b/bin/app/evaluate$16.class differ
diff --git a/bin/app/evaluate$17.class b/bin/app/evaluate$17.class
index d4cbd67..6cae3f6 100644
Binary files a/bin/app/evaluate$17.class and b/bin/app/evaluate$17.class differ
diff --git a/bin/app/evaluate$2.class b/bin/app/evaluate$2.class
index 34b8a6b..07d8cf4 100644
Binary files a/bin/app/evaluate$2.class and b/bin/app/evaluate$2.class differ
diff --git a/bin/app/evaluate$3.class b/bin/app/evaluate$3.class
index 103ca40..a1da93e 100644
Binary files a/bin/app/evaluate$3.class and b/bin/app/evaluate$3.class differ
diff --git a/bin/app/evaluate$4.class b/bin/app/evaluate$4.class
index f0148ae..03f009f 100644
Binary files a/bin/app/evaluate$4.class and b/bin/app/evaluate$4.class differ
diff --git a/bin/app/evaluate$5.class b/bin/app/evaluate$5.class
index 2255356..120f86e 100644
Binary files a/bin/app/evaluate$5.class and b/bin/app/evaluate$5.class differ
diff --git a/bin/app/evaluate$6.class b/bin/app/evaluate$6.class
index 3957292..d4d5904 100644
Binary files a/bin/app/evaluate$6.class and b/bin/app/evaluate$6.class differ
diff --git a/bin/app/evaluate$7.class b/bin/app/evaluate$7.class
index cbee3d2..c4cadd9 100644
Binary files a/bin/app/evaluate$7.class and b/bin/app/evaluate$7.class differ
diff --git a/bin/app/evaluate$8.class b/bin/app/evaluate$8.class
index 8974b21..b50f57d 100644
Binary files a/bin/app/evaluate$8.class and b/bin/app/evaluate$8.class differ
diff --git a/bin/app/evaluate$9.class b/bin/app/evaluate$9.class
index a589d98..34a2d44 100644
Binary files a/bin/app/evaluate$9.class and b/bin/app/evaluate$9.class differ
diff --git a/bin/app/evaluate.class b/bin/app/evaluate.class
index f31f0a8..d0dfa95 100644
Binary files a/bin/app/evaluate.class and b/bin/app/evaluate.class differ
diff --git a/icons/savepreference.png b/icons/savepreference.png
new file mode 100644
index 0000000..a605973
Binary files /dev/null and b/icons/savepreference.png differ
diff --git a/icons/savepreference.svg b/icons/savepreference.svg
new file mode 100644
index 0000000..0b91d0b
--- /dev/null
+++ b/icons/savepreference.svg
@@ -0,0 +1,167 @@
+
+
diff --git a/icons/savepreferencemini.png b/icons/savepreferencemini.png
new file mode 100644
index 0000000..1cf341d
Binary files /dev/null and b/icons/savepreferencemini.png differ
diff --git a/src/MEPTL/meptl.java b/src/MEPTL/meptl.java
index 3b3bd8d..8085329 100644
--- a/src/MEPTL/meptl.java
+++ b/src/MEPTL/meptl.java
@@ -3277,7 +3277,7 @@ public class meptl {
/**
- * Analyse le nom du node
+ * Evalue le nom du node
*
* @param retour : le node retour qui contient l'item ajouté
* @param nodStudent : le node Student qui peut être null
@@ -3299,7 +3299,7 @@ public class meptl {
}
/**
- *
+ * Evalue le champ auteur (éditeur).
* @param retour
* @param nodStudent
* @param nameCreator
@@ -3321,7 +3321,7 @@ public class meptl {
/**
- *
+ * Evalue le nom de l'auteur (créteur ou premier auteur)
* @param retour
* @param nodStudent
* @param nameCreator
diff --git a/src/app/ProgressBar.java b/src/app/ProgressBar.java
new file mode 100644
index 0000000..aaf113c
--- /dev/null
+++ b/src/app/ProgressBar.java
@@ -0,0 +1,72 @@
+package app;
+import java.awt.BorderLayout;
+import java.awt.Container;
+
+import javax.swing.JFrame;
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
+
+public class ProgressBar extends JFrame implements Runnable{
+
+ @Override
+ public void run() {
+ ProgressBar myProgressBar = new ProgressBar();
+ int i = 0;
+ while (i <= 100) {
+ System.out.println("" + i + "%");
+ myProgressBar.setValue(i);
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ break;
+ }
+ i = i + 5;
+ }
+ }
+
+ private JProgressBar bar;
+
+ public ProgressBar() {
+ super("loading");
+ setSize(200, 100);
+ Container content = getContentPane();
+ content.setLayout(new BorderLayout());
+ bar = new JProgressBar();
+ bar.setMinimum(0);
+ bar.setMaximum(100);
+ bar.setStringPainted(true);
+ bar.setBorder(null);
+ content.add(bar, BorderLayout.SOUTH);
+ setVisible(true);
+ }
+
+ void updateProgress(final int newValue) {
+ bar.setValue(newValue);
+ }
+
+ public void setValue(final int j) {
+ SwingUtilities.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ updateProgress(j);
+ }
+ });
+ }
+
+ public static void main(final String Args[]) {
+ ProgressBar myProgressBar = new ProgressBar();
+ int i = 0;
+ while (i <= 100) {
+ System.out.println("" + i + "%");
+ myProgressBar.setValue(i);
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ break;
+ }
+ i = i + 5;
+ }
+ }
+}
diff --git a/src/app/attributs.java b/src/app/attributs.java
index 6607b9b..98bea34 100644
--- a/src/app/attributs.java
+++ b/src/app/attributs.java
@@ -14,6 +14,8 @@ import java.util.Enumeration;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
import java.awt.Font;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
@@ -35,6 +37,7 @@ public class attributs extends JFrame {
/**
* Create the frame.
*/
+ @SuppressWarnings("unlikely-arg-type")
public attributs(node nod) {
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setBounds(100, 100, 727, 669);
@@ -96,35 +99,39 @@ public class attributs extends JFrame {
Enumeration key = nod.getAttributs().keys();
while(key.hasMoreElements()) {
+
String k = key.nextElement();
- 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("‼"));
+ 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);
+ txtFielPoints.setColumns(2);
+ checkEval.setSelected(evaluer);
+
+ Leslabels.add(new JLabel(k));
+ Lesvaleurs.add(new JTextField(value));
+ Lespoints.add(txtFielPoints);
+ Lesevaluer.add(checkEval);
}
- JTextField txtFielPoints = new JTextField(point);
- txtFielPoints.setColumns(2);
- checkEval.setSelected(evaluer);
-
- Leslabels.add(new JLabel(k));
- Lesvaleurs.add(new JTextField(value));
- Lespoints.add(txtFielPoints);
- Lesevaluer.add(checkEval);
}
-
+ //Placement dans le panel des informations
for(int i = 0 ; i"
+ + "h1 {margin-bottom: 0.25cm;font-size: 18pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
+ + "h2 {color:red;margin-bottom: 0.25cm;font-size: 18pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
+ + "h4 {text-align:left;font-family: \"Arial\"; font-size: 16pt; font-weight: bold; line-height: 110%;}"
+ + "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}"
+ + "p.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;}"
+ + "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.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%}"
+ + "";
+ }
+
+}
diff --git a/src/app/create.java b/src/app/create.java
index 4ec97b6..21c15ef 100644
--- a/src/app/create.java
+++ b/src/app/create.java
@@ -5,41 +5,36 @@ import java.awt.Color;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Font;
-import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.stream.Collectors;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
import javax.swing.JEditorPane;
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.JPopupMenu;
import javax.swing.JScrollPane;
-import javax.swing.JSeparator;
import javax.swing.JSplitPane;
-import javax.swing.JTabbedPane;
-import javax.swing.JTextField;
import javax.swing.JToolBar;
import javax.swing.JTree;
import javax.swing.KeyStroke;
-import javax.swing.SwingConstants;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.tree.DefaultMutableTreeNode;
@@ -59,7 +54,6 @@ import cXML.Run;
import cXML.node;
import java.awt.event.InputEvent;
-import javax.swing.tree.DefaultTreeModel;
@@ -71,51 +65,7 @@ public class create extends JFrame {
private JEditorPane textNodeSelect = new JEditorPane();
private JToolBar toolBar = new JToolBar();
private JMenuBar menuBar = new JMenuBar();
-
-
- private JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
-
- // les éléments de l'évaluation
- private JTextField textFieldTitreAvantLeSaut = new JTextField();
- private JComboBox comboBoxAttribut = new JComboBox();
- private JEditorPane editorPaneInformationNode = new JEditorPane();
- private JEditorPane editorPaneInfosAttribut = new JEditorPane();
- private JEditorPane editorPaneInfosNode = new JEditorPane();
- private JCheckBox chckbxEvaluerNode = new JCheckBox("Evaluer un ou des éléments de ce node.");
- private JCheckBox chckbxSautApresTitre = new JCheckBox("Insérer un titre puis un saut avant l'évaluation de ce node.");
- private JCheckBox chckbxEvaluerPresenceDeCeNode = new JCheckBox("Evaluer la présence de ce node.");
- private JTextField textField_NombrePointEvalThisNode = new JTextField();
- private JCheckBox chckbxEvaluerAttribut = new JCheckBox("Evaluer l'attribut");
- private JTextField textField_NombrePointAttribut = new JTextField();
- private JEditorPane editorPaneAttribut = new JEditorPane();
- private JEditorPane editorPaneContenuNode = new JEditorPane();
- private JCheckBox chckbxEvaluerContenuDuNode = new JCheckBox("Evaluer le contenu du node ci-dessous");
- private JTextField textFieldNombrePointContenuNode = new JTextField();
- private JButton btnEtendu = new JButton("→ Tolérance");
- private JButton btnOuExact = new JButton("¦ OU");
- private JButton btnContient = new JButton("{ Contient }");
- private JButton btnColor = new JButton("# Couleur");
- private JButton btnBordure = new JButton("Bordure");
- private String messg = "Valeur de l'attribut - fonctions - évaluateur et point";
- private JLabel lblType = new JLabel(messg);
- private JEditorPane editorPaneContenuEnfant = new JEditorPane();
- private JTextField textField_DistanceSimilitude = new JTextField();
- private JTextField textFieldNbrPointContenuEnfant = new JTextField();
- private JCheckBox chckbxEvaluerSimilitude = new JCheckBox("Evaluer le contenu complet avec les nodes enfants (Similitude)");
- private JCheckBox chckbxIgnoreValeurNumerique = new JCheckBox("Ignorer les valeurs numériques");
- private JCheckBox chckbxIgnoreLaCasse = new JCheckBox("Ignore la casse");
- private JCheckBox chckbxIgnoreLesCaracteresSpeciaux = new JCheckBox("Ignore les caractères spéciaux");
- private final JPanel panelStyleStructure = new JPanel();
- private String messg2 = "Le style du paragraphe est : ";
- private JLabel lblLeStyleDeParagrapheDuParagraphe = new JLabel(messg2);
- private final JLabel lblAttribut_analyseStyle = new JLabel("Sélectionner l'attribut");
- private final JComboBox comboBoxAttribut_analyseStyle = new JComboBox();
- private JCheckBox chckbx_EvaluateStyleDeParagraphe = new JCheckBox("Evaluer le style de paragraphe");
- private JTextField textField_evaluateStyleParagrapheAttributNbrPoint = new JTextField();
- private JEditorPane editorPane_evaluateStyleParagrapheAttribut = new JEditorPane();
- private JLabel lbl_NombrePointAttributEvaluationStyleParagraphe = new JLabel("Nombre point");
- private JScrollPane scrollPane_evaluationAttributStyleParagraphe = new JScrollPane();
/**
* Create the application.
@@ -142,10 +92,10 @@ public class create extends JFrame {
/*Chargement des images*/
- ImageIcon img1 = new ImageIcon(getClass().getResource("/attribut.png") );
- ImageIcon img3 = new ImageIcon(getClass().getResource("/property.png") );
- ImageIcon img4 = new ImageIcon(getClass().getResource("/content.png") );
- ImageIcon img2 = new ImageIcon(getClass().getResource("/structurepage.png") );
+// ImageIcon img1 = new ImageIcon(getClass().getResource("/attribut.png") );
+// ImageIcon img3 = new ImageIcon(getClass().getResource("/property.png") );
+// ImageIcon img4 = new ImageIcon(getClass().getResource("/content.png") );
+// ImageIcon img2 = new ImageIcon(getClass().getResource("/structurepage.png") );
//frame = new JFrame();
@@ -164,24 +114,6 @@ public class create extends JFrame {
// Construction et injection de la barre de menu
setJMenuBar( this.createMenuBar() );
- tree.setModel(new DefaultTreeModel(
- new DefaultMutableTreeNode("Charger un fichier d'analyse") {
- {
- DefaultMutableTreeNode node_1;
- add(new DefaultMutableTreeNode("node fichier"));
- node_1 = new DefaultMutableTreeNode("node style");
- node_1.add(new DefaultMutableTreeNode("paragraphe"));
- node_1.add(new DefaultMutableTreeNode("caractère"));
- add(node_1);
- node_1 = new DefaultMutableTreeNode("strcturepage");
- node_1.add(new DefaultMutableTreeNode("page"));
- node_1.add(new DefaultMutableTreeNode("page"));
- node_1.add(new DefaultMutableTreeNode("page"));
- node_1.add(new DefaultMutableTreeNode("page"));
- add(node_1);
- }
- }
- ));
tree.setVisibleRowCount(30);
// Ajoute le menu contextuel de la tree
@@ -193,6 +125,10 @@ public class create extends JFrame {
this.createPopupMenuTree(null);
getContentPane().setLayout(new BorderLayout(2, 2));
contentPane.add( toolBar, BorderLayout.NORTH );
+ toolBar.addSeparator();
+
+ JButton button_2 = toolBar.add( actExit );
+ button_2.setHideActionText( true );
// The content of the window
if(commandes.fichierAnalyseValide) tree = commandes.tree;
@@ -204,260 +140,12 @@ public class create extends JFrame {
getContentPane().add(panel, BorderLayout.CENTER);
panel.setLayout(null);
- tabbedPane.setBounds(816, 10, 600, 785);
- panel.add(tabbedPane);
-
- JPanel panelProperties = new JPanel();
- panelProperties.setLayout(null);
- tabbedPane.addTab("Propriétés", img3, panelProperties, null);
-
- chckbxEvaluerNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxEvaluerNode.setBounds(6, 144, 285, 23);
- panelProperties.add(chckbxEvaluerNode);
-
- chckbxSautApresTitre.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxSautApresTitre.setBounds(6, 342, 461, 23);
- panelProperties.add(chckbxSautApresTitre);
-
- textFieldTitreAvantLeSaut.setFont(new Font("Tahoma", Font.PLAIN, 12));
- textFieldTitreAvantLeSaut.setColumns(10);
- textFieldTitreAvantLeSaut.setBounds(10, 395, 536, 33);
- panelProperties.add(textFieldTitreAvantLeSaut);
-
- JLabel lblNewLabel_1 = new JLabel("Texte à insérer avant l'évaluation de ce node. (Si un saut est inséré)");
- lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel_1.setBounds(6, 372, 511, 23);
- panelProperties.add(lblNewLabel_1);
-
- chckbxEvaluerPresenceDeCeNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxEvaluerPresenceDeCeNode.setBounds(6, 458, 226, 23);
- panelProperties.add(chckbxEvaluerPresenceDeCeNode);
-
- JScrollPane scrollPane_1 = new JScrollPane();
- scrollPane_1.setBounds(10, 11, 536, 125);
- panelProperties.add(scrollPane_1);
- editorPaneInfosNode.setEditable(false);
-
-
- scrollPane_1.setViewportView(editorPaneInfosNode);
- editorPaneInfosNode.setText((String) null);
-
- JScrollPane scrollPane_2 = new JScrollPane();
- scrollPane_2.setBounds(10, 235, 536, 100);
- panelProperties.add(scrollPane_2);
-
-
- scrollPane_2.setViewportView(editorPaneInformationNode);
- editorPaneInformationNode.setText((String) null);
- editorPaneInformationNode.setEditable(false);
-
- textField_NombrePointEvalThisNode.setText("1");
- textField_NombrePointEvalThisNode.setHorizontalAlignment(SwingConstants.CENTER);
- textField_NombrePointEvalThisNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- textField_NombrePointEvalThisNode.setColumns(10);
- textField_NombrePointEvalThisNode.setBounds(360, 459, 45, 20);
- panelProperties.add(textField_NombrePointEvalThisNode);
-
- JLabel lblNbrePointsPourEvaluerCeNode = new JLabel("Nbre point");
- lblNbrePointsPourEvaluerCeNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrePointsPourEvaluerCeNode.setBounds(271, 462, 79, 14);
- panelProperties.add(lblNbrePointsPourEvaluerCeNode);
-
- JPanel panelAttributs = new JPanel();
- panelAttributs.setLayout(null);
- tabbedPane.addTab("Attributs", img1, panelAttributs, null);
- comboBoxAttribut.setToolTipText("Les attributs présents dans ce node.");
- comboBoxAttribut.setMaximumRowCount(10);
-
- comboBoxAttribut.setFont(new Font("Tahoma", Font.PLAIN, 14));
- comboBoxAttribut.setBounds(10, 31, 510, 31);
- panelAttributs.add(comboBoxAttribut);
-
- JScrollPane scrollPane_3 = new JScrollPane();
- scrollPane_3.setBounds(10, 201, 536, 135);
- panelAttributs.add(scrollPane_3);
-
- scrollPane_3.setViewportView(editorPaneAttribut);
- editorPaneAttribut.setFont(new Font("Tahoma", Font.BOLD, 16));
-
- JLabel lblAttribut = new JLabel("Sélectionner l'attribut");
- lblAttribut.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblAttribut.setBounds(10, 11, 149, 22);
- panelAttributs.add(lblAttribut);
-
- textField_NombrePointAttribut.setText("0");
- textField_NombrePointAttribut.setHorizontalAlignment(SwingConstants.CENTER);
- textField_NombrePointAttribut.setFont(new Font("Tahoma", Font.BOLD, 12));
- textField_NombrePointAttribut.setColumns(10);
- textField_NombrePointAttribut.setBounds(114, 126, 57, 31);
- panelAttributs.add(textField_NombrePointAttribut);
-
- JLabel lblNewLabel = new JLabel("Nombre point");
- lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNewLabel.setBounds(16, 134, 94, 14);
- panelAttributs.add(lblNewLabel);
-
- chckbxEvaluerAttribut.setFont(new Font("Tahoma", Font.BOLD, 14));
- chckbxEvaluerAttribut.setBounds(10, 97, 269, 23);
- panelAttributs.add(chckbxEvaluerAttribut);
-
- JLabel lblAvertissement = new JLabel("");
- lblAvertissement.setVerticalAlignment(SwingConstants.TOP);
- lblAvertissement.setForeground(Color.RED);
- lblAvertissement.setBounds(153, 11, 393, 22);
- panelAttributs.add(lblAvertissement);
-
- lblType.setVerticalAlignment(SwingConstants.TOP);
- lblType.setHorizontalAlignment(SwingConstants.LEFT);
- lblType.setBounds(10, 168, 547, 22);
- panelAttributs.add(lblType);
-
- JScrollPane scrollPane_3_1 = new JScrollPane();
- scrollPane_3_1.setBounds(10, 389, 536, 323);
- panelAttributs.add(scrollPane_3_1);
-
- scrollPane_3_1.setViewportView(editorPaneInfosAttribut);
-
- btnEtendu.setBounds(10, 347, 100, 31);
- panelAttributs.add(btnEtendu);
-
- btnOuExact.setBounds(120, 347, 90, 30);
- panelAttributs.add(btnOuExact);
-
- btnContient.setBounds(220, 347, 100, 30);
- panelAttributs.add(btnContient);
-
- btnColor.setBounds(330, 347, 90, 30);
- panelAttributs.add(btnColor);
-
- btnBordure.setBounds(430, 347, 90, 30);
- panelAttributs.add(btnBordure);
-
- JPanel panelContenu = new JPanel();
- panelContenu.setLayout(null);
- tabbedPane.addTab("Contenu", img4, panelContenu, null);
-
- JScrollPane scrollPane = new JScrollPane();
- scrollPane.setBounds(10, 67, 530, 86);
- panelContenu.add(scrollPane);
- editorPaneContenuNode.setEditable(false);
-
- scrollPane.setViewportView(editorPaneContenuNode);
-
- chckbxEvaluerContenuDuNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxEvaluerContenuDuNode.setBounds(6, 25, 304, 23);
- panelContenu.add(chckbxEvaluerContenuDuNode);
-
- JLabel lblNbrPointContenuNode = new JLabel("Nbre point contenu node");
- lblNbrPointContenuNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrPointContenuNode.setBounds(316, 27, 155, 19);
- panelContenu.add(lblNbrPointContenuNode);
-
- textFieldNombrePointContenuNode.setText("0");
- textFieldNombrePointContenuNode.setHorizontalAlignment(SwingConstants.CENTER);
- textFieldNombrePointContenuNode.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldNombrePointContenuNode.setColumns(10);
- textFieldNombrePointContenuNode.setBounds(481, 22, 59, 30);
- panelContenu.add(textFieldNombrePointContenuNode);
-
- JScrollPane scrollPane_4 = new JScrollPane();
- scrollPane_4.setBounds(10, 258, 530, 242);
- panelContenu.add(scrollPane_4);
- editorPaneContenuEnfant.setEditable(false);
- scrollPane_4.setViewportView(editorPaneContenuEnfant);
-
- JLabel lblNbrePointContenu = new JLabel("Nbre point contenu complet avec ceux des nodes enfants");
- lblNbrePointContenu.setFont(new Font("Tahoma", Font.BOLD, 12));
- lblNbrePointContenu.setBounds(10, 222, 389, 19);
- panelContenu.add(lblNbrePointContenu);
- textFieldNbrPointContenuEnfant.setToolTipText("Nombre de point si le contenu est similaire
(distance Levenshtein inférieure ou égale)");
-
- textFieldNbrPointContenuEnfant.setText("0");
- textFieldNbrPointContenuEnfant.setHorizontalAlignment(SwingConstants.CENTER);
- textFieldNbrPointContenuEnfant.setFont(new Font("Tahoma", Font.BOLD, 12));
- textFieldNbrPointContenuEnfant.setColumns(10);
- textFieldNbrPointContenuEnfant.setBounds(481, 217, 59, 30);
- panelContenu.add(textFieldNbrPointContenuEnfant);
- textField_DistanceSimilitude.setToolTipText("Distance de Levenshtein");
-
- textField_DistanceSimilitude.setHorizontalAlignment(SwingConstants.CENTER);
- textField_DistanceSimilitude.setText("2");
- textField_DistanceSimilitude.setBounds(490, 183, 50, 23);
- panelContenu.add(textField_DistanceSimilitude);
- textField_DistanceSimilitude.setColumns(10);
- chckbxEvaluerSimilitude.setToolTipText("Comparaison des différents mots du contenu.");
-
- chckbxEvaluerSimilitude.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxEvaluerSimilitude.setBounds(10, 182, 474, 23);
- panelContenu.add(chckbxEvaluerSimilitude);
-
- chckbxIgnoreValeurNumerique.setToolTipText("Le texte sera nettoyé de toutes les valeurs numériques
avant la comparaison avec le fichier de l'étudiant.");
- chckbxIgnoreValeurNumerique.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxIgnoreValeurNumerique.setBounds(10, 532, 285, 23);
- panelContenu.add(chckbxIgnoreValeurNumerique);
-
- JSeparator separator = new JSeparator();
- separator.setForeground(SystemColor.activeCaption);
- separator.setBounds(10, 164, 530, 11);
- panelContenu.add(separator);
-
- chckbxIgnoreLaCasse.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxIgnoreLaCasse.setBounds(10, 568, 228, 23);
- panelContenu.add(chckbxIgnoreLaCasse);
-
- JSeparator separator_1 = new JSeparator();
- separator_1.setForeground(SystemColor.activeCaption);
- separator_1.setBounds(10, 511, 530, 2);
- panelContenu.add(separator_1);
-
- chckbxIgnoreLesCaracteresSpeciaux.setFont(new Font("Tahoma", Font.BOLD, 12));
- chckbxIgnoreLesCaracteresSpeciaux.setBounds(302, 533, 238, 23);
- panelContenu.add(chckbxIgnoreLesCaracteresSpeciaux);
-
- tabbedPane.addTab("Style", img2, panelStyleStructure, null);
- panelStyleStructure.setLayout(null);
- lblAttribut_analyseStyle.setBounds(10, 96, 135, 15);
- lblAttribut_analyseStyle.setFont(new Font("Tahoma", Font.BOLD, 12));
-
- panelStyleStructure.add(lblAttribut_analyseStyle);
- comboBoxAttribut_analyseStyle.setToolTipText("Les attributs présents dans ce node.");
- comboBoxAttribut_analyseStyle.setMaximumRowCount(10);
- comboBoxAttribut_analyseStyle.setFont(new Font("Tahoma", Font.PLAIN, 14));
- comboBoxAttribut_analyseStyle.setBounds(10, 122, 519, 31);
-
- panelStyleStructure.add(comboBoxAttribut_analyseStyle);
-
- lblLeStyleDeParagrapheDuParagraphe.setHorizontalAlignment(SwingConstants.LEFT);
- lblLeStyleDeParagrapheDuParagraphe.setVerticalAlignment(SwingConstants.TOP);
- lblLeStyleDeParagrapheDuParagraphe.setBounds(10, 11, 536, 24);
- panelStyleStructure.add(lblLeStyleDeParagrapheDuParagraphe);
- chckbx_EvaluateStyleDeParagraphe.setFont(new Font("Tahoma", Font.BOLD, 14));
-
- chckbx_EvaluateStyleDeParagraphe.setBounds(6, 42, 540, 23);
- panelStyleStructure.add(chckbx_EvaluateStyleDeParagraphe);
-
- scrollPane_evaluationAttributStyleParagraphe.setBounds(10, 192, 519, 97);
- panelStyleStructure.add(scrollPane_evaluationAttributStyleParagraphe);
-
- scrollPane_evaluationAttributStyleParagraphe.setViewportView(editorPane_evaluateStyleParagrapheAttribut);
-
- lbl_NombrePointAttributEvaluationStyleParagraphe.setFont(new Font("Tahoma", Font.BOLD, 12));
- lbl_NombrePointAttributEvaluationStyleParagraphe.setBounds(10, 164, 94, 14);
- panelStyleStructure.add(lbl_NombrePointAttributEvaluationStyleParagraphe);
-
- textField_evaluateStyleParagrapheAttributNbrPoint.setText("0");
- textField_evaluateStyleParagrapheAttributNbrPoint.setHorizontalAlignment(SwingConstants.CENTER);
- textField_evaluateStyleParagrapheAttributNbrPoint.setFont(new Font("Tahoma", Font.BOLD, 12));
- textField_evaluateStyleParagrapheAttributNbrPoint.setColumns(10);
- textField_evaluateStyleParagrapheAttributNbrPoint.setBounds(114, 156, 57, 31);
- panelStyleStructure.add(textField_evaluateStyleParagrapheAttributNbrPoint);
-
JScrollPane leftScrollPane = new JScrollPane( );
leftScrollPane.setPreferredSize( new Dimension( 200, 0 ) );
JScrollPane rightScrollPane = new JScrollPane( );
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftScrollPane, rightScrollPane );
- splitPane.setBounds(10, 10, 800, 783);
+ splitPane.setBounds(10, 10, 1364, 783);
panel.add(splitPane);
rightScrollPane.setViewportView(textNodeSelect);
textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));
@@ -515,50 +203,64 @@ public class create extends JFrame {
sb.append("
Nom du node : " + nod.getNomElt() + "
");
sb.append("
");
+
+ if(nod.getAttributs().size()>0) {
+ if(nod.getAttributs().size()==1) sb.append("
ATTRIBUT DU NODE
");
+ if(nod.getAttributs().size()>1) sb.append("
ATTRIBUTS DU NODE
");
+ }
Enumeration key = nod.getAttributs().keys();
- if(nod.getAttributs().size()>0) sb.append("
Attribut(s)
");
- sb.append("");
+ List Lesattributsdunode = new ArrayList();
while(key.hasMoreElements()) {
- String k = key.nextElement();
-// boolean ecrit =false;
- if(nod.getAttributs().get("evaluer")!=null) {
- if(nod.getAttributs().get("evaluer").equals("true")) {
-
- sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
-
-// switch(k) {
-// case ("evalContenu"):
-// sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
-// ecrit=true;
-// break;
-// case("evaluer"):
-// sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
-// ecrit=true;
-// break;
-// }
-//
-// if(nod.getAttributs().get(k).contains("‽") && !ecrit) {
-// sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
-// ecrit=true;
-// }else {
-// sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
-// ecrit=true;
-// }
-
- }else {
- sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
- if(nod.getAttributs().get(k).contains("‽")) sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
+ String K = key.nextElement();
+ Lesattributsdunode.add(K);
+ }
+ //permet le tri par ordre alphabétique des clés du dictionnaire
+ Lesattributsdunode = Lesattributsdunode.stream().sorted().collect(Collectors.toList());
+
+ if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")) {
+ sb.append("
");
+ sb.append("");
+ sb.append("- Les attributs d'analyseWriter
");
+ for(int i=0; i < Lesattributsdunode.size();i++) {
+ if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
+ sb.append("- " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
");
}
}
-
-
- if(nod.getAttributs().get("evaluer")==null) {
- sb.append("- " + k + "=\"" + nod.getAttributs().get(k)+"\"
");
+ sb.append("
");
+ sb.append("
");
+ sb.append("");
+ sb.append("- Les attributs de Writer
");
+ for(int i=0; i < Lesattributsdunode.size();i++) {
+ if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
+ sb.append("- " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
");
+ }
}
-
-
+ sb.append("
");
}
- sb.append("
");
+
+ if(nod.getAttributs().get("evaluer")!=null) if(!nod.getAttributs().get("evaluer").equalsIgnoreCase("true")) {
+ sb.append("
");
+ sb.append("");
+ sb.append("- Les attributs d'analyseWriter
");
+ for(int i=0; i < Lesattributsdunode.size();i++) {
+ if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
+ sb.append("- " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
");
+ }
+ }
+ sb.append("
");
+ sb.append("
");
+ sb.append("");
+ sb.append("- Les attributs de Writer
");
+ for(int i=0; i < Lesattributsdunode.size();i++) {
+ if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
+ sb.append("- " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
");
+ }
+ }
+ sb.append("
");
+ }
+
+
+
if(!nod.retourneLesContenusEnfants("").trim().isEmpty()) {
sb.append("
Contenu
" + nod.retourneLesContenusEnfants("") );
@@ -567,9 +269,10 @@ public class create extends JFrame {
textNodeSelect.setText(""+sb.toString()+"");
createPopupMenuTree(nod);
-
+ }
}
- }
+
+
/**
@@ -722,7 +425,6 @@ public class create extends JFrame {
// Définition du menu déroulant "Edit" et de son contenu
JMenu mnuExercice = new JMenu( "Création évaluation" );
mnuExercice.setMnemonic( 'N' );
- mnuExercice.add(actConfiguration);
mnuExercice.add(actEvaluer);
menuBar.add(mnuExercice);
@@ -761,7 +463,7 @@ public class create extends JFrame {
toolBar.addSeparator();
-
+
JButton btnAbout = toolBar.add( actAbout );
btnAbout.setIcon(new ImageIcon(create.class.getResource("/resources/apropos.png")));
btnAbout.setHideActionText( true );
@@ -773,11 +475,6 @@ public class create extends JFrame {
toolBar.add(btnDocumentation);
toolBar.addSeparator();
-
- toolBar.add( actExit ).setHideActionText( true );
- toolBar.addSeparator();
-
- toolBar.add( actConfiguration );
JButton button = toolBar.add( actEvaluer );
button.setIcon(new ImageIcon(create.class.getResource("/resources/evaluate.png")));
@@ -1697,30 +1394,7 @@ public class create extends JFrame {
};
- /**
- *
- */
- private AbstractAction actConfiguration = new AbstractAction() {
-
- private static final long serialVersionUID = 1L;
-
- {
- putValue( Action.NAME, "Configuration" );
- putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/configuration.png") ) );
- putValue( Action.MNEMONIC_KEY, KeyEvent.VK_W );
- putValue( Action.SHORT_DESCRIPTION, "Configurer le fichier pour l'évaluation" );
- putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.ALT_DOWN_MASK) );
- }
-
- @Override public void actionPerformed( ActionEvent e ) {
- if(commandes.fichierAnalyseValide) {
-
- }else {
- JOptionPane.showMessageDialog(null, "Charger un fichier Writer (.odt) ou un fichier d'évaluaton (.xml).");
- }
- System.out.println( "Configuration" );
- }
- };
+
/**
diff --git a/src/app/evaluate.java b/src/app/evaluate.java
index 331486f..999db7a 100644
--- a/src/app/evaluate.java
+++ b/src/app/evaluate.java
@@ -73,7 +73,7 @@ public class evaluate extends JFrame {
private JCheckBox chckbxVerif;
private JCheckBox chckbxNewLogo;
private JEditorPane txtpnmessages;
- public JProgressBar progressBarre;
+
/**
@@ -175,9 +175,6 @@ public class evaluate extends JFrame {
JScrollPane scrollPane = new JScrollPane();
panelCentre.add(scrollPane);
- progressBarre = new JProgressBar();
- progressBarre.setEnabled(true);
- panelCentre.add(progressBarre, BorderLayout.NORTH);
txtpnmessages = new JEditorPane();
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 14));
@@ -192,22 +189,7 @@ public class evaluate extends JFrame {
}
-
-
- private void Pro() {
-// progressBarre = new JProgressBar();
- progressBarre.setMaximum(100000000);
- progressBarre.setStringPainted(true);
- for(int i = 0 ; i < 1000; i++) {
- progressBarre.setValue(i);
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
+
private void createMenu() {
@@ -421,7 +403,6 @@ public class evaluate extends JFrame {
text.append("\nFichier d'analyse :");
text.append("\n"+commandes.PathFilenameAnalysis+"\n");
- progressBarre.setVisible(false);
txtpnmessages.setText(text.toString());
}
@@ -434,67 +415,93 @@ public class evaluate extends JFrame {
}
+ 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 t1 = new Thread(new ProgressBar());
+
+ Thread t2 = new Thread(new evaluerLesFichiersEtudiants(chckbxfichiersEtudaints.isSelected(), chckbxZipfeedback.isSelected(),chckbxnoFeedback.isSelected(),
+ chckbxNoNote.isSelected(), chckCSVNotes.isSelected(), chckbxNewLogo.isSelected(), chckbxNoLogo.isSelected(), chckbxVerif.isSelected(), txtpnmessages));
+
+// t1.start();
+ t2.start();
+
+// evaluerLesFichiersEtudiants E = new evaluerLesFichiersEtudiants(chckbxfichiersEtudaints.isSelected(), chckbxZipfeedback.isSelected(),chckbxnoFeedback.isSelected(),
+// chckbxNoNote.isSelected(), chckCSVNotes.isSelected(), chckbxNewLogo.isSelected(), chckbxNoLogo.isSelected(), chckbxVerif.isSelected(), txtpnmessages);
+//
+// E.run();
+
+ }
+ };
/**
* Evaluer et analayser les 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 ) {
- if(commandes.fichierAnalyseValide) {
-// JOptionPane.showMessageDialog(null, "Je boss", "Je travaille", JOptionPane.PLAIN_MESSAGE, null);
-// new msgBox("Je travaille dure.",true,false,"Attendez");
-
-
-
-
- evaluerLesFichiersEtudiants E = new evaluerLesFichiersEtudiants(chckbxfichiersEtudaints.isSelected(), chckbxZipfeedback.isSelected(),chckbxnoFeedback.isSelected(),
- chckbxNoNote.isSelected(), chckCSVNotes.isSelected(), chckbxNewLogo.isSelected(), chckbxNoLogo.isSelected(), chckbxVerif.isSelected(),
- progressBarre, txtpnmessages);
-
- E.run();
-
-
-
-
-
-
-
-
-
-// try {
-// t1.join();
-// t2.join();
-//
-// } catch (InterruptedException e1) {
-// // TODO Auto-generated catch block
-// e1.printStackTrace();
-// }
-
-
-
-
- }else {
- txtpnmessages.setText("*** Veuillez charger un fichier d'analyse ***");
- new msgBox("Le fichier d'analyse n'est pas valide.",true,false,"Avertissement");
- }
- }
- };
+// 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 ) {
+// if(commandes.fichierAnalyseValide) {
+//// JOptionPane.showMessageDialog(null, "Je boss", "Je travaille", JOptionPane.PLAIN_MESSAGE, null);
+//// new msgBox("Je travaille dure.",true,false,"Attendez");
+//
+//
+//
+//
+// evaluerLesFichiersEtudiants E = new evaluerLesFichiersEtudiants(chckbxfichiersEtudaints.isSelected(), chckbxZipfeedback.isSelected(),chckbxnoFeedback.isSelected(),
+// chckbxNoNote.isSelected(), chckCSVNotes.isSelected(), chckbxNewLogo.isSelected(), chckbxNoLogo.isSelected(), chckbxVerif.isSelected(), txtpnmessages);
+//
+// E.run();
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//// try {
+//// t1.join();
+//// t2.join();
+////
+//// } catch (InterruptedException e1) {
+//// // TODO Auto-generated catch block
+//// e1.printStackTrace();
+//// }
+//
+//
+// }else {
+// txtpnmessages.setText("*** Veuillez charger un fichier d'analyse ***");
+// new msgBox("Le fichier d'analyse n'est pas valide.",true,false,"Avertissement");
+// }
+// }
+// };
/**
@@ -856,23 +863,52 @@ public class evaluate extends JFrame {
}
};
- 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 ) {
-
-
-
- }
- };
+
+
+ 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 ) {
+
+
+
+ }
+ };
+ /**
+ *
+ */
+ 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(commandes.fichierAnalyseValide) {
+
+ }else {
+ JOptionPane.showMessageDialog(null, "Charger un fichier Writer (.odt) ou un fichier d'évaluaton (.xml).");
+ }
+ System.out.println( "Configuration" );
+ }
+ };
+
+
/**
* Affiche la fenêtre d'information sur analyseWriter
*/
diff --git a/src/app/evaluerLesFichiersEtudiants.java b/src/app/evaluerLesFichiersEtudiants.java
index bacc50d..9a7fa9f 100644
--- a/src/app/evaluerLesFichiersEtudiants.java
+++ b/src/app/evaluerLesFichiersEtudiants.java
@@ -3,7 +3,6 @@ package app;
import java.io.IOException;
import javax.swing.JEditorPane;
-import javax.swing.JProgressBar;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
@@ -18,12 +17,11 @@ import net.lingala.zip4j.exception.ZipException;
public class evaluerLesFichiersEtudiants implements Runnable{
- private final JProgressBar progressBarre;
private final JEditorPane txt;
public evaluerLesFichiersEtudiants(boolean listeEtudiantCSV, boolean zipfeedback, boolean nofeedback, boolean nonote
- , boolean notedansunCSV, boolean newlogo, boolean nologo, boolean verifhisto2uniquement, JProgressBar progressBar, JEditorPane txt) {
+ , boolean notedansunCSV, boolean newlogo, boolean nologo, boolean verifhisto2uniquement, JEditorPane txt) {
commandes.analyse=true;
@@ -35,8 +33,8 @@ public class evaluerLesFichiersEtudiants implements Runnable{
if(newlogo) commandes.newLogo=true;
if(nologo) commandes.noLogo = true;
if(verifhisto2uniquement) commandes.verifHisto2 = true;
- this.progressBarre=progressBar;
this.txt=txt;
+// this.txt.setContentType("text/html");
}
@@ -77,9 +75,6 @@ public class evaluerLesFichiersEtudiants implements Runnable{
//*****************************************
int nbFichierWriter = a.getLectDossiers().getEC().getListeContentWriter().size();
commandes.analyse_Nbre_Fichier_Student = nbFichierWriter;
- progressBarre.setMaximum(nbFichierWriter);
- progressBarre.setVisible(true);
- progressBarre.setStringPainted(true);
commandes.message.append("\nNombre de fichier à analyser et évaluer : " + Integer.valueOf(nbFichierWriter) + "\n");
@@ -92,11 +87,14 @@ public class evaluerLesFichiersEtudiants implements Runnable{
verification.setNomElt("verification");
verification.getAttributs().put("nombre_fichier", String.valueOf(a.getLectDossiers().getEC().getListeFichierodt().size()));
for(int i = 0 ; i < nbFichierWriter ; i++) {
+ txt.setText("\nChargement de l'historique du fichier n° " + String.valueOf(i) +" par comparaison avec les "+ String.valueOf(nbFichierWriter-1) + " autres fichiers");
node nod = Run.XMLContent(a.getLectDossiers().getEC().getListeContentWriter().get(i));
node nodStudent = meptl.LectureFichierEtudiantPourVerification(nod,a,i);
verification.getNodes().add(nodStudent);
}
//a.ecritureNodeEnXML(verification, "VerificationHistorique","",false); //écriture du node de l'étudiant
+ txt.setText("\nRecherche des concordances temporelles et d'auteur dans l'historique des modifications des " + nbFichierWriter + " fichiers."
+ + "\nPatientez, cela peut prendre quelques secondes ou minutes.");
verif = meptl.verificationHistorique(verification, a); // vérification des correspondances entre les fichiers
//********************************
@@ -126,8 +124,7 @@ public class evaluerLesFichiersEtudiants implements Runnable{
//** Parcours l'ensemble des fichiers des étudiants ***
//*****************************************************
for(int i = 0 ; i < nbFichierWriter ; i++) {
- progressBarre.setValue(i);
- txt.setText(String.valueOf(i) +"/"+ String.valueOf(nbFichierWriter-1));
+ txt.setText("\nEvaluation du fichier n° " + String.valueOf(i) +"/"+ String.valueOf(nbFichierWriter-1) + " fichier(s)");
//index de l'étudiant
commandes.analyse_index_Fichier_Student = i;
diff --git a/src/app/listeAttributsAnalyseWriter.java b/src/app/listeAttributsAnalyseWriter.java
new file mode 100644
index 0000000..d438dbe
--- /dev/null
+++ b/src/app/listeAttributsAnalyseWriter.java
@@ -0,0 +1,34 @@
+package app;
+
+public class listeAttributsAnalyseWriter {
+
+ public listeAttributsAnalyseWriter() {
+
+ }
+
+ public static boolean isAttributAnalyseWriter(String attribut) {
+
+ if(attribut.equals("evaluer")) return true;
+ if(attribut.equals("addmenu")) 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;
+ if(attribut.equals("evalNameCreator")) return true;
+ if(attribut.equals("evalNameInitialCreator")) return true;
+ if(attribut.equals("evalNameInitialCreator")) return true;
+ if(attribut.equals("recherche_anchor-page-number")) return true;
+
+ return false;
+ }
+
+}
diff --git a/src/app/savePreferences.java b/src/app/savePreferences.java
new file mode 100644
index 0000000..a16cdf7
--- /dev/null
+++ b/src/app/savePreferences.java
@@ -0,0 +1,14 @@
+package app;
+
+import javax.swing.JEditorPane;
+
+public class savePreferences {
+ private JEditorPane txt;
+
+ savePreferences(JEditorPane txt){
+ this.txt=txt;
+
+ }
+
+
+}
diff --git a/src/resources/savepreference.png b/src/resources/savepreference.png
new file mode 100644
index 0000000..a605973
Binary files /dev/null and b/src/resources/savepreference.png differ
diff --git a/src/resources/savepreferencemini.png b/src/resources/savepreferencemini.png
new file mode 100644
index 0000000..1cf341d
Binary files /dev/null and b/src/resources/savepreferencemini.png differ