diff --git a/.classpath b/.classpath
index 148593c..4b5675b 100644
--- a/.classpath
+++ b/.classpath
@@ -12,6 +12,6 @@
-
+
diff --git a/analyseWriter.exe b/analyseWriter.exe
index 65c2a8f..f419e99 100644
Binary files a/analyseWriter.exe and b/analyseWriter.exe differ
diff --git a/analyseWriter.jar b/analyseWriter.jar
index 2e17a21..faf8929 100644
Binary files a/analyseWriter.jar and b/analyseWriter.jar differ
diff --git a/bin/.gitignore b/bin/.gitignore
index 311fd9c..78b40c7 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -3,6 +3,3 @@
/evaluer/
/fenetres/
/list/
-/resources/
-/nocsvstudent.png
-/nocsvstudentmini.png
diff --git a/bin/evaluer/evaluation.class b/bin/evaluer/evaluation.class
index 84d0b6e..52bbb7e 100644
Binary files a/bin/evaluer/evaluation.class and b/bin/evaluer/evaluation.class differ
diff --git a/bin/evaluer/evaluationAttribut.class b/bin/evaluer/evaluationAttribut.class
index 67ddf6e..1a10e52 100644
Binary files a/bin/evaluer/evaluationAttribut.class and b/bin/evaluer/evaluationAttribut.class differ
diff --git a/bin/fenetres/afficheText.class b/bin/fenetres/afficheText.class
index b06db53..5f1e94c 100644
Binary files a/bin/fenetres/afficheText.class and b/bin/fenetres/afficheText.class differ
diff --git a/bin/fenetres/create$1.class b/bin/fenetres/create$1.class
index 70a716d..ec1dbc0 100644
Binary files a/bin/fenetres/create$1.class and b/bin/fenetres/create$1.class differ
diff --git a/bin/fenetres/create$10.class b/bin/fenetres/create$10.class
index 12df057..b2e5f0f 100644
Binary files a/bin/fenetres/create$10.class and b/bin/fenetres/create$10.class differ
diff --git a/bin/fenetres/create$11.class b/bin/fenetres/create$11.class
index c2c4888..b87d8bf 100644
Binary files a/bin/fenetres/create$11.class and b/bin/fenetres/create$11.class differ
diff --git a/bin/fenetres/create$12.class b/bin/fenetres/create$12.class
index c8f7ccd..0876afe 100644
Binary files a/bin/fenetres/create$12.class and b/bin/fenetres/create$12.class differ
diff --git a/bin/fenetres/create$13.class b/bin/fenetres/create$13.class
index 6ca8927..d4283dc 100644
Binary files a/bin/fenetres/create$13.class and b/bin/fenetres/create$13.class differ
diff --git a/bin/fenetres/create$14.class b/bin/fenetres/create$14.class
index 8ed3efd..f5b75e9 100644
Binary files a/bin/fenetres/create$14.class and b/bin/fenetres/create$14.class differ
diff --git a/bin/fenetres/create$2.class b/bin/fenetres/create$2.class
index 16bcbb5..08165d7 100644
Binary files a/bin/fenetres/create$2.class and b/bin/fenetres/create$2.class differ
diff --git a/bin/fenetres/create$3.class b/bin/fenetres/create$3.class
index c31f9e9..8e87cd6 100644
Binary files a/bin/fenetres/create$3.class and b/bin/fenetres/create$3.class differ
diff --git a/bin/fenetres/create$4.class b/bin/fenetres/create$4.class
index ce2b760..f9f18fa 100644
Binary files a/bin/fenetres/create$4.class and b/bin/fenetres/create$4.class differ
diff --git a/bin/fenetres/create$5.class b/bin/fenetres/create$5.class
index 6e581ce..8889cbe 100644
Binary files a/bin/fenetres/create$5.class and b/bin/fenetres/create$5.class differ
diff --git a/bin/fenetres/create$6.class b/bin/fenetres/create$6.class
index dafdf7c..42858e7 100644
Binary files a/bin/fenetres/create$6.class and b/bin/fenetres/create$6.class differ
diff --git a/bin/fenetres/create$7.class b/bin/fenetres/create$7.class
index 8875140..6b98f95 100644
Binary files a/bin/fenetres/create$7.class and b/bin/fenetres/create$7.class differ
diff --git a/bin/fenetres/create$8.class b/bin/fenetres/create$8.class
index a3f2b58..cde3bb7 100644
Binary files a/bin/fenetres/create$8.class and b/bin/fenetres/create$8.class differ
diff --git a/bin/fenetres/create$9.class b/bin/fenetres/create$9.class
index cf4ea4a..b57338f 100644
Binary files a/bin/fenetres/create$9.class and b/bin/fenetres/create$9.class differ
diff --git a/bin/fenetres/create.class b/bin/fenetres/create.class
index 6403623..02a7bdc 100644
Binary files a/bin/fenetres/create.class and b/bin/fenetres/create.class differ
diff --git a/bin/fenetres/createPopupMenu.class b/bin/fenetres/createPopupMenu.class
index 6030539..388964b 100644
Binary files a/bin/fenetres/createPopupMenu.class and b/bin/fenetres/createPopupMenu.class differ
diff --git a/bin/fenetres/create_act/actCoefficient.class b/bin/fenetres/create_act/actCoefficient.class
index 5ef8cce..53d368c 100644
Binary files a/bin/fenetres/create_act/actCoefficient.class and b/bin/fenetres/create_act/actCoefficient.class differ
diff --git a/bin/fenetres/create_act/actEvalEnteteActive.class b/bin/fenetres/create_act/actEvalEnteteActive.class
index b6f6bc0..5c12d94 100644
Binary files a/bin/fenetres/create_act/actEvalEnteteActive.class and b/bin/fenetres/create_act/actEvalEnteteActive.class differ
diff --git a/bin/fenetres/create_act/actEvalPlacementParagrapheOui.class b/bin/fenetres/create_act/actEvalPlacementParagrapheOui.class
index 9057c94..63ea218 100644
Binary files a/bin/fenetres/create_act/actEvalPlacementParagrapheOui.class and b/bin/fenetres/create_act/actEvalPlacementParagrapheOui.class differ
diff --git a/bin/fenetres/create_act/actTitre1.class b/bin/fenetres/create_act/actTitre1.class
index 95699bf..0c1deb1 100644
Binary files a/bin/fenetres/create_act/actTitre1.class and b/bin/fenetres/create_act/actTitre1.class differ
diff --git a/bin/fenetres/evaluate$1.class b/bin/fenetres/evaluate$1.class
index 95ccd5c..5ab59bc 100644
Binary files a/bin/fenetres/evaluate$1.class and b/bin/fenetres/evaluate$1.class differ
diff --git a/bin/fenetres/evaluate$10.class b/bin/fenetres/evaluate$10.class
index 8e5bc1b..9a45d7d 100644
Binary files a/bin/fenetres/evaluate$10.class and b/bin/fenetres/evaluate$10.class differ
diff --git a/bin/fenetres/evaluate$11.class b/bin/fenetres/evaluate$11.class
index 826cbea..cc168f7 100644
Binary files a/bin/fenetres/evaluate$11.class and b/bin/fenetres/evaluate$11.class differ
diff --git a/bin/fenetres/evaluate$12.class b/bin/fenetres/evaluate$12.class
index 5e8ea95..cdacbe8 100644
Binary files a/bin/fenetres/evaluate$12.class and b/bin/fenetres/evaluate$12.class differ
diff --git a/bin/fenetres/evaluate$13.class b/bin/fenetres/evaluate$13.class
index 45b1959..7a6d9ea 100644
Binary files a/bin/fenetres/evaluate$13.class and b/bin/fenetres/evaluate$13.class differ
diff --git a/bin/fenetres/evaluate$14.class b/bin/fenetres/evaluate$14.class
index 265cfba..931c038 100644
Binary files a/bin/fenetres/evaluate$14.class and b/bin/fenetres/evaluate$14.class differ
diff --git a/bin/fenetres/evaluate$15.class b/bin/fenetres/evaluate$15.class
index 2129c4c..a13b3ca 100644
Binary files a/bin/fenetres/evaluate$15.class and b/bin/fenetres/evaluate$15.class differ
diff --git a/bin/fenetres/evaluate$16.class b/bin/fenetres/evaluate$16.class
index 68ba207..a0f59b3 100644
Binary files a/bin/fenetres/evaluate$16.class and b/bin/fenetres/evaluate$16.class differ
diff --git a/bin/fenetres/evaluate$17.class b/bin/fenetres/evaluate$17.class
index 67e3f03..fec7c85 100644
Binary files a/bin/fenetres/evaluate$17.class and b/bin/fenetres/evaluate$17.class differ
diff --git a/bin/fenetres/evaluate$18.class b/bin/fenetres/evaluate$18.class
index 7cfc465..0ae89e6 100644
Binary files a/bin/fenetres/evaluate$18.class and b/bin/fenetres/evaluate$18.class differ
diff --git a/bin/fenetres/evaluate$19.class b/bin/fenetres/evaluate$19.class
index 577f07c..b4fe0e1 100644
Binary files a/bin/fenetres/evaluate$19.class and b/bin/fenetres/evaluate$19.class differ
diff --git a/bin/fenetres/evaluate$2.class b/bin/fenetres/evaluate$2.class
index 5114919..457e64b 100644
Binary files a/bin/fenetres/evaluate$2.class and b/bin/fenetres/evaluate$2.class differ
diff --git a/bin/fenetres/evaluate$20.class b/bin/fenetres/evaluate$20.class
index c3e43c2..95bfd9b 100644
Binary files a/bin/fenetres/evaluate$20.class and b/bin/fenetres/evaluate$20.class differ
diff --git a/bin/fenetres/evaluate$21.class b/bin/fenetres/evaluate$21.class
index 9faf43f..5a03177 100644
Binary files a/bin/fenetres/evaluate$21.class and b/bin/fenetres/evaluate$21.class differ
diff --git a/bin/fenetres/evaluate$22.class b/bin/fenetres/evaluate$22.class
index 057a67f..a7a9072 100644
Binary files a/bin/fenetres/evaluate$22.class and b/bin/fenetres/evaluate$22.class differ
diff --git a/bin/fenetres/evaluate$23.class b/bin/fenetres/evaluate$23.class
index d690178..8bcf7c3 100644
Binary files a/bin/fenetres/evaluate$23.class and b/bin/fenetres/evaluate$23.class differ
diff --git a/bin/fenetres/evaluate$24.class b/bin/fenetres/evaluate$24.class
index d456644..f9512e1 100644
Binary files a/bin/fenetres/evaluate$24.class and b/bin/fenetres/evaluate$24.class differ
diff --git a/bin/fenetres/evaluate$25.class b/bin/fenetres/evaluate$25.class
index 8088d1c..5736c87 100644
Binary files a/bin/fenetres/evaluate$25.class and b/bin/fenetres/evaluate$25.class differ
diff --git a/bin/fenetres/evaluate$26.class b/bin/fenetres/evaluate$26.class
index fe6c3b4..f861f89 100644
Binary files a/bin/fenetres/evaluate$26.class and b/bin/fenetres/evaluate$26.class differ
diff --git a/bin/fenetres/evaluate$27.class b/bin/fenetres/evaluate$27.class
index 6875810..2d84b4b 100644
Binary files a/bin/fenetres/evaluate$27.class and b/bin/fenetres/evaluate$27.class differ
diff --git a/bin/fenetres/evaluate$28.class b/bin/fenetres/evaluate$28.class
index 52a3630..aea5d48 100644
Binary files a/bin/fenetres/evaluate$28.class and b/bin/fenetres/evaluate$28.class differ
diff --git a/bin/fenetres/evaluate$29.class b/bin/fenetres/evaluate$29.class
index 0236f4c..b20438d 100644
Binary files a/bin/fenetres/evaluate$29.class and b/bin/fenetres/evaluate$29.class differ
diff --git a/bin/fenetres/evaluate$3.class b/bin/fenetres/evaluate$3.class
index 2a15245..d89bcf3 100644
Binary files a/bin/fenetres/evaluate$3.class and b/bin/fenetres/evaluate$3.class differ
diff --git a/bin/fenetres/evaluate$30.class b/bin/fenetres/evaluate$30.class
index 313c24b..a44ddcd 100644
Binary files a/bin/fenetres/evaluate$30.class and b/bin/fenetres/evaluate$30.class differ
diff --git a/bin/fenetres/evaluate$31.class b/bin/fenetres/evaluate$31.class
index 155f8f2..35d448f 100644
Binary files a/bin/fenetres/evaluate$31.class and b/bin/fenetres/evaluate$31.class differ
diff --git a/bin/fenetres/evaluate$32.class b/bin/fenetres/evaluate$32.class
index 592d7fd..5562647 100644
Binary files a/bin/fenetres/evaluate$32.class and b/bin/fenetres/evaluate$32.class differ
diff --git a/bin/fenetres/evaluate$33.class b/bin/fenetres/evaluate$33.class
index 88e89a9..b2a329e 100644
Binary files a/bin/fenetres/evaluate$33.class and b/bin/fenetres/evaluate$33.class differ
diff --git a/bin/fenetres/evaluate$4.class b/bin/fenetres/evaluate$4.class
index 172f0b5..757e80d 100644
Binary files a/bin/fenetres/evaluate$4.class and b/bin/fenetres/evaluate$4.class differ
diff --git a/bin/fenetres/evaluate$5.class b/bin/fenetres/evaluate$5.class
index c837297..d0f2e3d 100644
Binary files a/bin/fenetres/evaluate$5.class and b/bin/fenetres/evaluate$5.class differ
diff --git a/bin/fenetres/evaluate$6.class b/bin/fenetres/evaluate$6.class
index 37bff84..c17fed1 100644
Binary files a/bin/fenetres/evaluate$6.class and b/bin/fenetres/evaluate$6.class differ
diff --git a/bin/fenetres/evaluate$7.class b/bin/fenetres/evaluate$7.class
index 3c3bef7..7396b7a 100644
Binary files a/bin/fenetres/evaluate$7.class and b/bin/fenetres/evaluate$7.class differ
diff --git a/bin/fenetres/evaluate$8.class b/bin/fenetres/evaluate$8.class
index 2091954..d64f686 100644
Binary files a/bin/fenetres/evaluate$8.class and b/bin/fenetres/evaluate$8.class differ
diff --git a/bin/fenetres/evaluate$9.class b/bin/fenetres/evaluate$9.class
index 159486c..915335b 100644
Binary files a/bin/fenetres/evaluate$9.class and b/bin/fenetres/evaluate$9.class differ
diff --git a/bin/fenetres/evaluate.class b/bin/fenetres/evaluate.class
index f471e15..c826571 100644
Binary files a/bin/fenetres/evaluate.class and b/bin/fenetres/evaluate.class differ
diff --git a/bin/nocsvstudent.png b/bin/nocsvstudent.png
new file mode 100644
index 0000000..9346758
Binary files /dev/null and b/bin/nocsvstudent.png differ
diff --git a/bin/nocsvstudentmini.png b/bin/nocsvstudentmini.png
new file mode 100644
index 0000000..5ec3170
Binary files /dev/null and b/bin/nocsvstudentmini.png differ
diff --git a/bin/resources/csvstudent.png b/bin/resources/csvstudent.png
new file mode 100644
index 0000000..101bbf3
Binary files /dev/null and b/bin/resources/csvstudent.png differ
diff --git a/bin/resources/csvstudentmini.png b/bin/resources/csvstudentmini.png
new file mode 100644
index 0000000..0e6d2f0
Binary files /dev/null and b/bin/resources/csvstudentmini.png differ
diff --git a/bin/resources/informationmultiple.png b/bin/resources/informationmultiple.png
new file mode 100644
index 0000000..2d50cb1
Binary files /dev/null and b/bin/resources/informationmultiple.png differ
diff --git a/bin/resources/informationmultiplemini.png b/bin/resources/informationmultiplemini.png
new file mode 100644
index 0000000..5f9d0e6
Binary files /dev/null and b/bin/resources/informationmultiplemini.png differ
diff --git a/bin/resources/nocsvstudent.png b/bin/resources/nocsvstudent.png
new file mode 100644
index 0000000..9346758
Binary files /dev/null and b/bin/resources/nocsvstudent.png differ
diff --git a/bin/resources/nocsvstudentmini.png b/bin/resources/nocsvstudentmini.png
new file mode 100644
index 0000000..5ec3170
Binary files /dev/null and b/bin/resources/nocsvstudentmini.png differ
diff --git a/src/evaluer/evaluation.java b/src/evaluer/evaluation.java
index 70517e2..d6d4b3b 100644
--- a/src/evaluer/evaluation.java
+++ b/src/evaluer/evaluation.java
@@ -123,6 +123,17 @@ public class evaluation {
if(pointEnJeu==0) return "Optionnel";
+ //Méthode de comparaison avec calcul de Levenshtein
+ if(Sujet!=null) if(Sujet.contains("╬")) {
+ if(A==null) return "Erreur : -" + pointString;
+ Sujet = Sujet.replace("╬", "");
+ if(TraitementDistanceDeLevenstein(A,Sujet).equals("Correct : ")) {
+ IncrementPointClass(pointEnJeu);
+ return "Correct : +" + pointString;
+ }
+ return "Erreur : -" + pointString;
+ }
+
// autre chose que null, none ou vide (analyse très simple) toutes les autres fonctions sont ignorées
if(Sujet!=null) if(Sujet.contains("†")) {
if(A==null) return "Erreur : -" + pointString;
@@ -314,7 +325,7 @@ public class evaluation {
point = Integer.valueOf(B.substring(B.indexOf("‽")+1,B.length()));
}catch (Exception e) {
commandes.message.append("
** ERREUR sur la ventillation des points : " + B + " **
");
- System.out.println("ERREUR sur la ventillation des points : " +B);
+ System.out.println("ERREUR sur la ventillation des points : " + B);
e.getMessage();
}
}else {
@@ -667,6 +678,19 @@ public class evaluation {
return "Erreur : ";
}
+ /**
+ *
+ * @param A
+ * @param Sujet
+ * @return
+ */
+ private static String TraitementDistanceDeLevenstein(String A, String Sujet) {
+ if(cXML.StringSimilarity.similarity(A, Sujet)>commandes.tolerance_text) {
+ return "Correct : ";
+ }
+ return "Erreur : ";
+ }
+
/**
* Fonction OU contenant des ET contient le texte du node Sujet
* @param A
diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java
index d5e5526..d1f2515 100644
--- a/src/evaluer/evaluationAttribut.java
+++ b/src/evaluer/evaluationAttribut.java
@@ -579,9 +579,9 @@ public class evaluationAttribut {
if(!A.isEmpty() && !B.isEmpty()) if(cXML.StringSimilarity.similarity(A, B)>0.92) calcul++;
if(calcul==1) {
- retour = evaluationPlacement(retour,nodeStudent, sujet.retourneLesContenusEnfants(""), sujet.getAttributs().get("evalPlacement"),"Placement");
+ retour = evaluationPlacement(retour,B, A , sujet.getAttributs().get("evalPlacement"),"Placement");
}else {
- retour = evaluationPlacement(retour,null, sujet.retourneLesContenusEnfants(""), sujet.getAttributs().get("evalPlacement"),"Placement");
+ retour = evaluationPlacement(retour,null, A , sujet.getAttributs().get("evalPlacement"),"Placement");
}
}else {
node nodeSujetAvant = sujet.retourneLeNodeFrereAvant();
@@ -894,14 +894,14 @@ public class evaluationAttribut {
* @param nameElt
* @return
*/
- private static node evaluationPlacement(node retour, node nodStudent, String contenuParagraph, String point, String nameElt) {
+ private static node evaluationPlacement(node retour, String contenuParagraphStudentAvant, String contenuParagraphSujetAvant, String point, String nameElt) {
node item = null;
- if(nodStudent!=null) {
+ if(contenuParagraphStudentAvant!=null) {
//compare la même valeur "contenuParagraph" pour obtenir les points mais si un voisinage du contenu.
- item = retourneNoteAvecResultatsAnalyse("Placement","avant", "Oui","Oui" + "‽" +point, nameElt );
+ item = retourneNoteAvecResultatsAnalyse("Placement","avant", contenuParagraphStudentAvant , contenuParagraphSujetAvant + "╬‽" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
- item = new node("Placement", "Erreur : -"+ point, "avant" , "null", "non", 2, evaluation.getPointEnJeu(),nameElt);
+ item = new node("Placement", "Erreur : -"+ point, "avant" , "null", contenuParagraphSujetAvant , 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java
index ac7ff84..b456a00 100644
--- a/src/fenetres/afficheText.java
+++ b/src/fenetres/afficheText.java
@@ -8,7 +8,10 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
+
import javax.swing.JEditorPane;
+import javax.swing.text.DefaultCaret;
+
import MEPTL.commandes;
import cXML.node;
import calcul.calculIntervalleBaremeABCDE;
@@ -25,12 +28,17 @@ public class afficheText extends JEditorPane {
private static final long serialVersionUID = 1L;
+
/**
* Raffraichie l'affichage de la fenête create lorsque selection d'un node.
* @param nod
*/
public void refreshAffichage(node nod) {
+ //Important pour l'affichage car affiche le texte toujours au début en haut de l'affichage.
+ DefaultCaret caret = (DefaultCaret) this.getCaret();
+ caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
+
if(nod!=null) {
setContentType("text/html");
node nodeParent = nod.getParent();
@@ -323,11 +331,12 @@ public class afficheText extends JEditorPane {
setText(""+sb.toString()+"");
- }
- if(nod==null) {
+
+
+ }else {
setText("");
}
-
+
}
/**
diff --git a/src/fenetres/create.java b/src/fenetres/create.java
index ad87a80..e01fa40 100644
--- a/src/fenetres/create.java
+++ b/src/fenetres/create.java
@@ -90,7 +90,6 @@ public final class create extends JFrame {
private static JToggleButton tglbtnTousLesNodes;
private JPanel panelPrincipal;
private static create instance;
-
/**
* Création de la fenêtre.
@@ -176,7 +175,9 @@ public final class create extends JFrame {
}
this.setExtendedState(MAXIMIZED_BOTH);
-
+ rightScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
+// orig = (Point) rightScrollPane.getViewport().getViewPosition().clone();
+
ListenerAction();
}
@@ -704,7 +705,7 @@ public final class create extends JFrame {
}
tree.collapsePath(new TreePath(N.getPath()));
}
-
+
diff --git a/src/fenetres/createPopupMenu.java b/src/fenetres/createPopupMenu.java
index 4e57f50..7a2082d 100644
--- a/src/fenetres/createPopupMenu.java
+++ b/src/fenetres/createPopupMenu.java
@@ -114,6 +114,8 @@ if(nod!=null) {
JPopupMenu mnPopupTree = new JPopupMenu();
mnPopupTree.add( mnEvaluer());
if(nod.getLevel()==1 ) {
+ mnPopupTree.addSeparator();
+ mnPopupTree.add(new actCoefficient());
mnPopupTree.addSeparator();
mnPopupTree.add(mnNiveau1());
}
@@ -606,8 +608,6 @@ if(nod!=null) {
private JMenu mnNiveau1 () {
JMenu mnNiveau1 = new JMenu("Pour représentation & coefficient");
mnNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/feedbackmini.png"))); ///resources/attributanalysewritermini.png
- mnNiveau1.add(new actCoefficient());
- mnNiveau1.addSeparator();
mnNiveau1.add(mnSautNiveau1());
mnNiveau1.addSeparator();
mnNiveau1.add(mnTitreNiveau1());
diff --git a/src/fenetres/create_act/actCoefficient.java b/src/fenetres/create_act/actCoefficient.java
index a3d210d..28ad3ed 100644
--- a/src/fenetres/create_act/actCoefficient.java
+++ b/src/fenetres/create_act/actCoefficient.java
@@ -4,8 +4,12 @@ import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
+import javax.swing.Box;
import javax.swing.ImageIcon;
+import javax.swing.JLabel;
import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
import cXML.node;
import fenetres.baliseStyle;
@@ -34,24 +38,32 @@ public class actCoefficient extends AbstractAction{
}
}
- 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));
+
+ JTextField poidsField = new JTextField(8);
+ poidsField.setText(String.valueOf(poids));
+ JPanel myPanel = new JPanel();
+ myPanel.add(new JLabel("Coef. :"));
+ myPanel.add(Box.createHorizontalStrut(2)); // a spacer
+ myPanel.add(poidsField);
+
+
+ int result = JOptionPane.showConfirmDialog(null, myPanel, "Saisissez le coefficient", JOptionPane.OK_CANCEL_OPTION);
+ if (result == JOptionPane.OK_OPTION) {
+ try {
+ poids = Double.valueOf(poidsField.getText());
+ 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 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);
+ fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier.
La valeur n'a pas été modifiée.
");
}
- } 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/src/fenetres/create_act/actEvalEnteteActive.java b/src/fenetres/create_act/actEvalEnteteActive.java
index 88bc636..d73416d 100644
--- a/src/fenetres/create_act/actEvalEnteteActive.java
+++ b/src/fenetres/create_act/actEvalEnteteActive.java
@@ -32,7 +32,7 @@ public class actEvalEnteteActive extends AbstractAction{
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
- if(!a.isEmpty()) {
+ if(a!=null)if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
@@ -47,6 +47,7 @@ public class actEvalEnteteActive extends AbstractAction{
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/src/fenetres/create_act/actEvalPlacementParagrapheOui.java b/src/fenetres/create_act/actEvalPlacementParagrapheOui.java
index 32cc9a9..e8ff054 100644
--- a/src/fenetres/create_act/actEvalPlacementParagrapheOui.java
+++ b/src/fenetres/create_act/actEvalPlacementParagrapheOui.java
@@ -34,7 +34,7 @@ public class actEvalPlacementParagrapheOui extends AbstractAction{
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
- if(!a.isEmpty()) {
+ if(a!=null) if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java
index aefed43..4f6e363 100644
--- a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java
+++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java
@@ -33,7 +33,7 @@ public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
- if(!a.isEmpty()) {
+ if(a!=null) if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
diff --git a/src/fenetres/create_act/actNewFichierAnalyse.java b/src/fenetres/create_act/actNewFichierAnalyse.java
index 9434bee..cbbf557 100644
--- a/src/fenetres/create_act/actNewFichierAnalyse.java
+++ b/src/fenetres/create_act/actNewFichierAnalyse.java
@@ -122,7 +122,7 @@ public class actNewFichierAnalyse extends AbstractAction{
commandes.sujetSauvegarde = commandes.sujet.clone();
fenetres.create.getTree().setVisible(true);
fenetres.create.constructionTree();
- fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
+ fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
}else {
fenetres.create.getTextNodeSelect().setText("Le fichier n'est pas valide
");
}
diff --git a/src/fenetres/create_act/actTitre1.java b/src/fenetres/create_act/actTitre1.java
index 6cf39f8..bffc3d8 100644
--- a/src/fenetres/create_act/actTitre1.java
+++ b/src/fenetres/create_act/actTitre1.java
@@ -30,17 +30,17 @@ public class actTitre1 extends AbstractAction{
titre = nod.getAttributs().get("titre1");
}
- JTextField xField = new JTextField(30);
- xField.setText(titre);
+ JTextField titreField = new JTextField(30);
+ titreField.setText(titre);
JPanel myPanel = new JPanel();
myPanel.add(new JLabel("Titre :"));
myPanel.add(Box.createHorizontalStrut(2)); // a spacer
- myPanel.add(xField);
-
+ myPanel.add(titreField);
+
int result = JOptionPane.showConfirmDialog(null, myPanel, "Saisissez votre titre 1 ", JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION) {
- nod.titre1(xField.getText());
+ nod.titre1(titreField.getText());
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
diff --git a/src/fenetres/evaluate.java b/src/fenetres/evaluate.java
index e799206..be5d506 100644
--- a/src/fenetres/evaluate.java
+++ b/src/fenetres/evaluate.java
@@ -130,10 +130,6 @@ public class evaluate extends JFrame {
lblImageDossierEtudiant = new JLabel(imgDossierEtudiant);
panelWest.add(lblImageDossierEtudiant, "flowx,cell 0 2,alignx center,aligny center");
-
-
-
-
chckbxfichiersEtudiants = new JCheckBox("Les fichiers des étudiants
ne sont pas dans des dossiers nominatifs");
chckbxfichiersEtudiants.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
@@ -390,8 +386,10 @@ public class evaluate extends JFrame {
public static evaluate getInstance() {
if (instance == null) {
instance = new evaluate();
+ }else {
+ instance.setVisible(true);
}
- instance.setVisible(true);
+
if(commandes.fichierAnalyseValide) {
txtpnmessages.afficheChargementFichierAnalyse();
}else {