diff --git a/analyseWriter.exe b/analyseWriter.exe index ee86277..58c88e0 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/analyseWriter.jar b/analyseWriter.jar index 473c933..ed708a8 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/.gitignore b/bin/.gitignore index 67493bc..f6621de 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,10 @@ /MEPTL/ /app/ /calcul/ +/resources/ +/entetenon.png +/entetenon.svg +/entetenonmini.png +/piedpagenon.png +/piedpagenon.svg +/piedpagenonmini.png diff --git a/bin/MEPTL/ecritureSujet.class b/bin/MEPTL/ecritureSujet.class index 643e475..631c450 100644 Binary files a/bin/MEPTL/ecritureSujet.class and b/bin/MEPTL/ecritureSujet.class differ diff --git a/bin/MEPTL/meptl.class b/bin/MEPTL/meptl.class index 534fb60..07288b7 100644 Binary files a/bin/MEPTL/meptl.class and b/bin/MEPTL/meptl.class differ diff --git a/bin/app/afficheText.class b/bin/app/afficheText.class index 1b5b0a0..70e0e98 100644 Binary files a/bin/app/afficheText.class and b/bin/app/afficheText.class differ diff --git a/bin/app/create$1.class b/bin/app/create$1.class index f2acfe3..6760f46 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 bff57fd..52d489c 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 eb8c029..134b42e 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 9d5aba5..7e63529 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 a1c10b6..35dd2aa 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 8b37558..af2b272 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 dd68cdf..4726e4a 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 c7496c0..1dcad15 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 e144bf3..0113ef1 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 d47f54c..f28af8e 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 e314fba..4b5bc73 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 30c3180..b08490d 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 ffd3dfe..60f9260 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 d2bdb8a..0d01618 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 79820eb..fb303c2 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 1c801e9..8f5f07f 100644 Binary files a/bin/app/create$23.class and b/bin/app/create$23.class differ diff --git a/bin/app/create$24.class b/bin/app/create$24.class index cbe8de4..b2dff06 100644 Binary files a/bin/app/create$24.class and b/bin/app/create$24.class differ diff --git a/bin/app/create$25.class b/bin/app/create$25.class index 6271a39..64e7953 100644 Binary files a/bin/app/create$25.class and b/bin/app/create$25.class differ diff --git a/bin/app/create$26.class b/bin/app/create$26.class index 9cf8879..f2f5234 100644 Binary files a/bin/app/create$26.class and b/bin/app/create$26.class differ diff --git a/bin/app/create$27.class b/bin/app/create$27.class index 1cd5e5f..7ea9023 100644 Binary files a/bin/app/create$27.class and b/bin/app/create$27.class differ diff --git a/bin/app/create$28.class b/bin/app/create$28.class index 71fa1c2..f233561 100644 Binary files a/bin/app/create$28.class and b/bin/app/create$28.class differ diff --git a/bin/app/create$29.class b/bin/app/create$29.class index fdbc13d..c6b3b4d 100644 Binary files a/bin/app/create$29.class and b/bin/app/create$29.class differ diff --git a/bin/app/create$3.class b/bin/app/create$3.class index e94fcad..b1aedaf 100644 Binary files a/bin/app/create$3.class and b/bin/app/create$3.class differ diff --git a/bin/app/create$30.class b/bin/app/create$30.class index a5e241f..39f54a5 100644 Binary files a/bin/app/create$30.class and b/bin/app/create$30.class differ diff --git a/bin/app/create$31.class b/bin/app/create$31.class index 46fbda3..0efe959 100644 Binary files a/bin/app/create$31.class and b/bin/app/create$31.class differ diff --git a/bin/app/create$32.class b/bin/app/create$32.class index 0f6e43e..7954ec8 100644 Binary files a/bin/app/create$32.class and b/bin/app/create$32.class differ diff --git a/bin/app/create$33.class b/bin/app/create$33.class index d4bd972..9f79bb0 100644 Binary files a/bin/app/create$33.class and b/bin/app/create$33.class differ diff --git a/bin/app/create$34.class b/bin/app/create$34.class index 0ee41bb..4e3e3d9 100644 Binary files a/bin/app/create$34.class and b/bin/app/create$34.class differ diff --git a/bin/app/create$35.class b/bin/app/create$35.class index b97d4c1..966136c 100644 Binary files a/bin/app/create$35.class and b/bin/app/create$35.class differ diff --git a/bin/app/create$36.class b/bin/app/create$36.class index ebbf91b..139e688 100644 Binary files a/bin/app/create$36.class and b/bin/app/create$36.class differ diff --git a/bin/app/create$37.class b/bin/app/create$37.class index 2f7efe5..fe16409 100644 Binary files a/bin/app/create$37.class and b/bin/app/create$37.class differ diff --git a/bin/app/create$38.class b/bin/app/create$38.class index ded676a..336fba4 100644 Binary files a/bin/app/create$38.class and b/bin/app/create$38.class differ diff --git a/bin/app/create$39.class b/bin/app/create$39.class index 18a2b01..11bd87f 100644 Binary files a/bin/app/create$39.class and b/bin/app/create$39.class differ diff --git a/bin/app/create$4.class b/bin/app/create$4.class index 1af0574..dba69ff 100644 Binary files a/bin/app/create$4.class and b/bin/app/create$4.class differ diff --git a/bin/app/create$40.class b/bin/app/create$40.class index d29a3eb..1cb28ce 100644 Binary files a/bin/app/create$40.class and b/bin/app/create$40.class differ diff --git a/bin/app/create$41.class b/bin/app/create$41.class index e8a7bc3..d41fe76 100644 Binary files a/bin/app/create$41.class and b/bin/app/create$41.class differ diff --git a/bin/app/create$42.class b/bin/app/create$42.class index 413b38c..e6a732c 100644 Binary files a/bin/app/create$42.class and b/bin/app/create$42.class differ diff --git a/bin/app/create$43.class b/bin/app/create$43.class index 38d5491..64cdabe 100644 Binary files a/bin/app/create$43.class and b/bin/app/create$43.class differ diff --git a/bin/app/create$44.class b/bin/app/create$44.class index 2e0c4eb..723e75f 100644 Binary files a/bin/app/create$44.class and b/bin/app/create$44.class differ diff --git a/bin/app/create$45.class b/bin/app/create$45.class index 6ff6e2f..673e6af 100644 Binary files a/bin/app/create$45.class and b/bin/app/create$45.class differ diff --git a/bin/app/create$46.class b/bin/app/create$46.class index 4fbaa20..55291bf 100644 Binary files a/bin/app/create$46.class and b/bin/app/create$46.class differ diff --git a/bin/app/create$47.class b/bin/app/create$47.class index d4a54b0..2c14025 100644 Binary files a/bin/app/create$47.class and b/bin/app/create$47.class differ diff --git a/bin/app/create$48.class b/bin/app/create$48.class index 3fac1bd..8076713 100644 Binary files a/bin/app/create$48.class and b/bin/app/create$48.class differ diff --git a/bin/app/create$49.class b/bin/app/create$49.class index 868035d..cc40695 100644 Binary files a/bin/app/create$49.class and b/bin/app/create$49.class differ diff --git a/bin/app/create$5.class b/bin/app/create$5.class index be881d2..bd71523 100644 Binary files a/bin/app/create$5.class and b/bin/app/create$5.class differ diff --git a/bin/app/create$50.class b/bin/app/create$50.class index 9f9a573..c1a7d88 100644 Binary files a/bin/app/create$50.class and b/bin/app/create$50.class differ diff --git a/bin/app/create$51.class b/bin/app/create$51.class index abb8089..e7dc694 100644 Binary files a/bin/app/create$51.class and b/bin/app/create$51.class differ diff --git a/bin/app/create$52.class b/bin/app/create$52.class index 13e162d..776ca71 100644 Binary files a/bin/app/create$52.class and b/bin/app/create$52.class differ diff --git a/bin/app/create$53.class b/bin/app/create$53.class index 44798a6..9abe815 100644 Binary files a/bin/app/create$53.class and b/bin/app/create$53.class differ diff --git a/bin/app/create$54.class b/bin/app/create$54.class index 2785a58..851db49 100644 Binary files a/bin/app/create$54.class and b/bin/app/create$54.class differ diff --git a/bin/app/create$55.class b/bin/app/create$55.class index 0d059b1..af50fe8 100644 Binary files a/bin/app/create$55.class and b/bin/app/create$55.class differ diff --git a/bin/app/create$56.class b/bin/app/create$56.class index 3e3c797..ce86e4e 100644 Binary files a/bin/app/create$56.class and b/bin/app/create$56.class differ diff --git a/bin/app/create$57.class b/bin/app/create$57.class index fd5356c..0153441 100644 Binary files a/bin/app/create$57.class and b/bin/app/create$57.class differ diff --git a/bin/app/create$58.class b/bin/app/create$58.class index 1523ec8..c35d794 100644 Binary files a/bin/app/create$58.class and b/bin/app/create$58.class differ diff --git a/bin/app/create$59.class b/bin/app/create$59.class index d067650..b3d3341 100644 Binary files a/bin/app/create$59.class and b/bin/app/create$59.class differ diff --git a/bin/app/create$6.class b/bin/app/create$6.class index 4d09d26..cfa34ea 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 0da8876..28e0acf 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 bc5d64b..cd35796 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 ceacc6b..4fc9ef1 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 b7bd5c2..e80ff56 100644 Binary files a/bin/app/create.class and b/bin/app/create.class differ diff --git a/bin/calcul/listeAttributsAnalyseWriter.class b/bin/calcul/listeAttributsAnalyseWriter.class index 8631313..13692d5 100644 Binary files a/bin/calcul/listeAttributsAnalyseWriter.class and b/bin/calcul/listeAttributsAnalyseWriter.class differ diff --git a/icons/entetenon.png b/icons/entetenon.png new file mode 100644 index 0000000..dd7755d Binary files /dev/null and b/icons/entetenon.png differ diff --git a/icons/entetenon.svg b/icons/entetenon.svg new file mode 100644 index 0000000..adb2462 --- /dev/null +++ b/icons/entetenon.svg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/icons/entetenonmini.png b/icons/entetenonmini.png new file mode 100644 index 0000000..4cdefdd Binary files /dev/null and b/icons/entetenonmini.png differ diff --git a/icons/piedpagenon.png b/icons/piedpagenon.png new file mode 100644 index 0000000..6b360ec Binary files /dev/null and b/icons/piedpagenon.png differ diff --git a/icons/piedpagenon.svg b/icons/piedpagenon.svg new file mode 100644 index 0000000..52e57d6 --- /dev/null +++ b/icons/piedpagenon.svg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/icons/piedpagenonmini.png b/icons/piedpagenonmini.png new file mode 100644 index 0000000..7609921 Binary files /dev/null and b/icons/piedpagenonmini.png differ diff --git a/src/MEPTL/ecritureSujet.java b/src/MEPTL/ecritureSujet.java index dcbbe20..ad9fcd9 100644 --- a/src/MEPTL/ecritureSujet.java +++ b/src/MEPTL/ecritureSujet.java @@ -72,7 +72,6 @@ public class ecritureSujet { no.get(j).getAttributs().put("saut", "false"); no.get(j).getAttributs().put("evaluer", "false"); no.get(j).getAttributs().put("titre", ""); - no.get(j).getAttributs().put("styletitre", "nostyle"); no.get(j).getAttributs().put("evalNameNode", "0"); if(no.get(j).getNomElt().equals("dc:creator")) no.get(j).getAttributs().put("evalNameCreator", "0"); if(no.get(j).getNomElt().equals("meta:initial-creator")) no.get(j).getAttributs().put("evalNameInitialCreator", "0"); @@ -207,7 +206,6 @@ public class ecritureSujet { nodbiblio.getAttributs().put("addmenu", "false"); nodbiblio.getAttributs().put("poids", "1"); nodbiblio.getAttributs().put("titre", "La bibliographie"); - //nodbiblio.getAttributs().put("styletitre", "H1"); nodbiblio = addAttributsAnalyseWriter(nodbiblio, "text:bibliography"); nod.getNodes().add(nodbiblio); @@ -284,7 +282,6 @@ public class ecritureSujet { no.get(j).getAttributs().put("saut", "false"); no.get(j).getAttributs().put("evaluer", "false"); no.get(j).getAttributs().put("titre", ""); - no.get(j).getAttributs().put("styletitre", "nostyle"); if(!no.get(j).getNodes().isEmpty()) { nextNodesEnfants(no.get(j).getNodes()); } diff --git a/src/MEPTL/meptl.java b/src/MEPTL/meptl.java index 9b385b8..298e3ca 100644 --- a/src/MEPTL/meptl.java +++ b/src/MEPTL/meptl.java @@ -30,6 +30,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; import cXML.node; +import calcul.listeAttributsAnalyseWriter; import cXML.Run; import cXML.Run.UserStatus; import net.lingala.zip4j.exception.ZipException; @@ -1916,6 +1917,7 @@ public class meptl { } } + // evaluer avec evalNameNode, evalNameCreator, evalNameInitialCreator, evalEntetePasActive, evalPiedPagePasActive if(!sujet.getAttributs().get(k).equals("0")) { if(k.equals("evalNameNode") && !sujet.getAttributs().get(k).equals("0")) { if(nodeStudent!=null) { @@ -1929,7 +1931,7 @@ public class meptl { if(nodeStudent!=null) { retour = evaluNameCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameCreator"),"Editeur"); }else { - retour = evaluNameCreator(retour,null, "Pas trouvé le champ auteur", sujet.getAttributs().get("evalNameCreator"),"Editeur"); + retour = evaluNameCreator(retour,null, "Pas trouvé l'auteur", sujet.getAttributs().get("evalNameCreator"),"Editeur"); } } @@ -1937,14 +1939,65 @@ public class meptl { if(nodeStudent!=null) { retour = evalNameInitialCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameInitialCreator"),"Créateur"); }else { - retour = evalNameInitialCreator(retour,null, "Créateur inconnu", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur"); + retour = evalNameInitialCreator(retour,null, "Pas trouvé le créateur", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur"); } } + if(k.equals("evalEntetePasActive") && sujet.getNomElt().equals("style:header-style")) { + if(nodeStudent!=null) { + int nbA=0; + int nbAs=0; + String reponseSujet = "oui"; + String reponseStudent = "oui"; + Enumeration key1 = sujet.getAttributs().keys(); + while(key1.hasMoreElements()) { + String k1 = key1.nextElement(); + if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbA++; + } + if(nbA==0) reponseSujet = "non"; + key1 = nodeStudent.getAttributs().keys(); + while(key1.hasMoreElements()) { + String k1 = key1.nextElement(); + if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbAs++; + } + if(nbAs==0)reponseStudent = "non"; + retour = evaluEntetePasActive(retour,reponseStudent,reponseSujet,sujet.getAttributs().get("evalEntetePasActive"),"Entete"); + }else { + retour = evaluEntetePasActive(retour,null, "Pas trouvé le node de l'étudiant", sujet.getAttributs().get("evalEntetePasActive"),"Entete"); + } + } + + if(k.equals("evalPiedPagePasActive") && sujet.getNomElt().equals("style:footer-style")) { + if(nodeStudent!=null) { + int nbA=0; + int nbAs=0; + String reponseSujet = "oui"; + String reponseStudent = "oui"; + Enumeration key1 = sujet.getAttributs().keys(); + while(key1.hasMoreElements()) { + String k1 = key1.nextElement(); + if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbA++; + } + if(nbA==0) reponseSujet = "non"; + key1 = nodeStudent.getAttributs().keys(); + while(key1.hasMoreElements()) { + String k1 = key1.nextElement(); + if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbAs++; + } + if(nbAs==0)reponseStudent = "non"; + retour = evaluPiedPagePasActive(retour,reponseStudent,reponseSujet , sujet.getAttributs().get("evalEntetePasActive"),"Pied page"); + }else { + retour = evaluPiedPagePasActive(retour,null, "Pas trouvé le node de l'étudiant", sujet.getAttributs().get("evalEntetePasActive"),"Pied page"); + } + } + + + } } - //avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1" alors analyse tout le contenu du node + //avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1" + // il faut ajouter une méthode pour ignorer la casse if(sujet.getAttributs().get("allContent")!=null) if(!sujet.getAttributs().get("allContent").isEmpty()){ String points ="‽0"; if(sujet.getAttributs().get("allContent").contains("strict")) points = sujet.getAttributs().get("allContent").replace("strict", "‽"); @@ -3188,6 +3241,42 @@ public class meptl { return retour; } + /** + * Si le node style:header-style ne possède pas d'attribut alors l'entete n'est pas activé.
+ * Le nombre d'attribut est null. + * @param retour + * @param nodStudent + * @param nameNode + * @param point + * @param nameElt + * @return + */ + private static node evaluEntetePasActive(node retour, String nbAttributStudent, String nbAttribut, String point, String nameElt) { + node item = null; + if(nbAttributStudent!=null) { + item = retourneNoteAvecResultatsAnalyse(nbAttribut,"active", nbAttributStudent,nbAttribut + "‽" +point, nameElt ); + }else { + outils.IncrementPointTotal(Integer.valueOf(point)); + item = new node(nbAttribut, "Erreur", "active" , "null", nbAttribut, 2, outils.getPointEnJeu(),nameElt); + } + retour.getNodes().add(item); + return retour; + } + + + private static node evaluPiedPagePasActive(node retour, String nbAttributStudent, String nbAttribut, String point, String nameElt) { + node item = null; + if(nbAttributStudent!=null) { + item = retourneNoteAvecResultatsAnalyse(nbAttribut,"active", nbAttributStudent,nbAttribut + "‽" +point, nameElt ); + }else { + outils.IncrementPointTotal(Integer.valueOf(point)); + item = new node(nbAttribut, "Erreur", "active" , "null", nbAttribut, 2, outils.getPointEnJeu(),nameElt); + } + retour.getNodes().add(item); + return retour; + } + + /** * Evalue le champ auteur (éditeur). * @param retour diff --git a/src/app/afficheText.java b/src/app/afficheText.java index af775c4..64bbc0e 100644 --- a/src/app/afficheText.java +++ b/src/app/afficheText.java @@ -49,6 +49,8 @@ public class afficheText extends JEditorPane { String imagerePremierAuteur= ""; String imagereDernierEditeur= ""; String imageAtraversAnalyseStyle= ""; + String imageEntetePasActive= ""; + String imagePiedPagePasActive= ""; StringBuilder sb = new StringBuilder(); @@ -158,6 +160,12 @@ public class afficheText extends JEditorPane { if(Lesattributsdunode.get(i).equals("EvaluerATraversAnalyseStyle") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) { sb.append("
  • "+imageAtraversAnalyseStyle + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } + if(Lesattributsdunode.get(i).equals("evalEntetePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { + sb.append("
  • "+imageEntetePasActive + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); + } + if(Lesattributsdunode.get(i).equals("evalPiedPagePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { + sb.append("
  • "+imagePiedPagePasActive + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); + } diff --git a/src/app/create.java b/src/app/create.java index 4766f1b..3f2b2cf 100644 --- a/src/app/create.java +++ b/src/app/create.java @@ -186,7 +186,6 @@ public class create extends JFrame { boolean nodeSetting = false; boolean nodeFormatageDirectePasDeTitrePasAddMenu = false; - if(nod.chemin().contains("setting")) nodeSetting=true; node nodStyleParent = nod.retourneParentAyantLAttribut("style:name"); if(nodStyleParent!=null) { @@ -292,6 +291,18 @@ public class create extends JFrame { mnAnalyseStyle.addSeparator(); mnAnalyseStyle.add(actEvaluerStyleFalse); + //Menu evalEntetePasActive (pour les style:header-style) + JMenu mnevalEntetePasActive = new JMenu("Entête pas activé"); + mnevalEntetePasActive.setIcon(new ImageIcon(create.class.getResource("/resources/entetenonmini.png"))); + mnevalEntetePasActive.add(actEvalEntetePasActive); + mnevalEntetePasActive.add(actEvalEnteteActive); + + //Menu evalPiedPagePasActive (pour les style:footer-style) + JMenu mnevalPiedPagePasActive = new JMenu("Pied page pas activé"); + mnevalPiedPagePasActive.setIcon(new ImageIcon(create.class.getResource("/resources/piedpagenonmini.png"))); + mnevalPiedPagePasActive.add(actEvalPiedPagePasActive); + mnevalPiedPagePasActive.add(actEvalPiedPageActive); + //Menu Evaluer présence d'un node pour les nodes de niveau > 1 JMenu mnEvalNameNode = new JMenu("Evaluer la présence du node"); mnEvalNameNode.setIcon(new ImageIcon(create.class.getResource("/resources/evalnodemini.png"))); @@ -360,6 +371,14 @@ public class create extends JFrame { mnNiveauSup1.addSeparator(); mnNiveauSup1.add(mnRechercheParNumeroPageAncrer); } + if(nod.getNomElt().equals("style:header-style")) { + mnNiveauSup1.addSeparator(); + mnNiveauSup1.add(mnevalEntetePasActive); + } + if(nod.getNomElt().equals("style:footer-style")) { + mnNiveauSup1.addSeparator(); + mnNiveauSup1.add(mnevalPiedPagePasActive); + } //**Menu setting @@ -1075,8 +1094,135 @@ public class create extends JFrame { } }; + /** + * Evalue l'absence de l'entête avec l'attribut evalEntetePasActive. + */ + private AbstractAction actEvalEntetePasActive = new AbstractAction() { + + private static final long serialVersionUID = 1L; + + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer l'absence d'attribut du node" ); + } + + @Override public void actionPerformed( ActionEvent e ) { + DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); + + node nod = (node) selectNode.getUserObject(); + int point = 0; + if(nod.getAttributs().get("evalEntetePasActive")!=null) { + point = Integer.valueOf(nod.getAttributs().get("evalEntetePasActive")); + } + + 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("evalEntetePasActive", String.valueOf(0)); + textNodeSelect.setText(balisestyles()); + textNodeSelect.setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalEntetePasActive=0.

    "); + }else { + nod.getAttributs().put("evalEntetePasActive", String.valueOf(point)); + } + } catch (Exception e2) { + textNodeSelect.setText(balisestyles()); + textNodeSelect.setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + textNodeSelect.refreshAffichage(nod); + } + }; + + /** + * Evalue l'absence du pied de page avec l'attribut evalPiedPagePasActive. + */ + private AbstractAction actEvalPiedPagePasActive = new AbstractAction() { + + private static final long serialVersionUID = 1L; + + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer l'absence d'attribut du node" ); + } + + @Override public void actionPerformed( ActionEvent e ) { + DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); + + node nod = (node) selectNode.getUserObject(); + int point = 0; + if(nod.getAttributs().get("evalPiedPagePasActive")!=null) { + point = Integer.valueOf(nod.getAttributs().get("evalPiedPagePasActive")); + } + + 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("evalPiedPagePasActive", String.valueOf(0)); + textNodeSelect.setText(balisestyles()); + textNodeSelect.setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalPiedPagePasActive=0.

    "); + }else { + nod.getAttributs().put("evalPiedPagePasActive", String.valueOf(point)); + } + } catch (Exception e2) { + textNodeSelect.setText(balisestyles()); + textNodeSelect.setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + textNodeSelect.refreshAffichage(nod); + } + }; + /** + * Supprime l'attribut evalEntetePasActive + */ + private AbstractAction actEvalEnteteActive = new AbstractAction() { + + private static final long serialVersionUID = 1L; + + { + putValue( Action.NAME, "Supprime entête pas active" ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'absence d'attribut du node." ); + } + + @Override public void actionPerformed( ActionEvent e ) { + DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); + + node nod = (node) selectNode.getUserObject(); + nod.supprimeAttribut("evalEntetePasActive"); + textNodeSelect.refreshAffichage(nod); +// refeshNodeSelected(); + + } + }; + + /** + * Supprime l'attribut evalPiedPagePasActive + */ + private AbstractAction actEvalPiedPageActive = new AbstractAction() { + + private static final long serialVersionUID = 1L; + + { + putValue( Action.NAME, "Supprime pied page pas active" ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'absence d'attribut du node." ); + } + + @Override public void actionPerformed( ActionEvent e ) { + DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); + + node nod = (node) selectNode.getUserObject(); + nod.supprimeAttribut("evalPiedPagePasActive"); + textNodeSelect.refreshAffichage(nod); + } + }; + /** * Evalue la présence de ce node */ @@ -1204,8 +1350,7 @@ public class create extends JFrame { textNodeSelect.refreshAffichage(nod); } }; - - + /** * Evalue la présence de ce node */ @@ -1228,8 +1373,6 @@ public class create extends JFrame { } }; - - /** * Evalue la présence de ce node */ diff --git a/src/calcul/listeAttributsAnalyseWriter.java b/src/calcul/listeAttributsAnalyseWriter.java index d8c4627..f002529 100644 --- a/src/calcul/listeAttributsAnalyseWriter.java +++ b/src/calcul/listeAttributsAnalyseWriter.java @@ -30,6 +30,8 @@ public class listeAttributsAnalyseWriter { if(attribut.equals("numero")) return true; if(attribut.equals("numeroabsolue")) return true; if(attribut.equals("EvaluerATraversAnalyseStyle")) return true; + if(attribut.equals("evalEntetePasActive")) return true; + if(attribut.equals("evalPiedPagePasActive")) return true; if(attribut.equals("analysis_filename")) return true; diff --git a/src/resources/entetenon.png b/src/resources/entetenon.png new file mode 100644 index 0000000..dd7755d Binary files /dev/null and b/src/resources/entetenon.png differ diff --git a/src/resources/entetenonmini.png b/src/resources/entetenonmini.png new file mode 100644 index 0000000..4cdefdd Binary files /dev/null and b/src/resources/entetenonmini.png differ diff --git a/src/resources/piedpagenon.png b/src/resources/piedpagenon.png new file mode 100644 index 0000000..6b360ec Binary files /dev/null and b/src/resources/piedpagenon.png differ diff --git a/src/resources/piedpagenonmini.png b/src/resources/piedpagenonmini.png new file mode 100644 index 0000000..7609921 Binary files /dev/null and b/src/resources/piedpagenonmini.png differ