diff --git a/analyseWriter.exe b/analyseWriter.exe index 1bb69d4..062aee4 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/analyseWriter.jar b/analyseWriter.jar index f895659..3750431 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/.gitignore b/bin/.gitignore index 08f04d9..02fe7a3 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,2 +1,4 @@ /MEPTL/ /fenetres/ +/list/ +/resources/ diff --git a/bin/fenetres/allContent$2.class b/bin/fenetres/allContent$2.class index 6fd810b..91a0c08 100644 Binary files a/bin/fenetres/allContent$2.class and b/bin/fenetres/allContent$2.class differ diff --git a/bin/fenetres/allContent.class b/bin/fenetres/allContent.class index 4645ef4..b425195 100644 Binary files a/bin/fenetres/allContent.class and b/bin/fenetres/allContent.class differ diff --git a/bin/fenetres/createPopupMenu.class b/bin/fenetres/createPopupMenu.class index ab3acc3..a5a46b3 100644 Binary files a/bin/fenetres/createPopupMenu.class and b/bin/fenetres/createPopupMenu.class differ diff --git a/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.class b/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.class index 317e5f2..193fdfd 100644 Binary files a/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.class and b/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.class differ diff --git a/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.class b/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.class index 8173c5e..c627dbf 100644 Binary files a/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.class and b/bin/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.class differ diff --git a/bin/list/listeDesNodesAllContent.class b/bin/list/listeDesNodesAllContent.class index 3663849..5de0118 100644 Binary files a/bin/list/listeDesNodesAllContent.class and b/bin/list/listeDesNodesAllContent.class differ diff --git a/icons/menuEvalTousParagraphe.png b/icons/menuEvalTousParagraphe.png new file mode 100644 index 0000000..e95af97 Binary files /dev/null and b/icons/menuEvalTousParagraphe.png differ diff --git a/icons/menuEvalTousParagraphe.svg b/icons/menuEvalTousParagraphe.svg new file mode 100644 index 0000000..fd70472 --- /dev/null +++ b/icons/menuEvalTousParagraphe.svg @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/menuEvalTousParagraphemini.png b/icons/menuEvalTousParagraphemini.png new file mode 100644 index 0000000..c0556e3 Binary files /dev/null and b/icons/menuEvalTousParagraphemini.png differ diff --git a/src/fenetres/allContent.java b/src/fenetres/allContent.java index f8c4697..c14eee8 100644 --- a/src/fenetres/allContent.java +++ b/src/fenetres/allContent.java @@ -45,7 +45,7 @@ public class allContent extends JFrame { * Evaluation de tous les contenu d'un node. * @param nod : Le node à évaluer. * @param J : Affichage du texte - * @param Childs : Si TRUE alors évaluation de tous les contenu des nodes enfants. + * @param Childs : Si TRUE alors évaluation de tous les contenus des nodes enfants. */ public allContent(node nod, afficheText J,boolean Childs) { this.nod=nod; @@ -160,15 +160,21 @@ public class allContent extends JFrame { int point = Integer.valueOf(textFieldPoint.getText()); if(point<0) point =0; if(!Childs) { - nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point)); + nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem().toString() + String.valueOf(point)); nod.evaluerAllChildTrue(); J.refreshAffichage(nod); }else { - for(int i = 0 ; i < nod.getNodes().size(); i++) { - if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ - nod.getNodes().get(i).getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point)); - nod.getNodes().get(i).evaluerAllChildTrue(); } + if(nod.getNomElt().equals("page")) { + placeAtrtibutAllContentDansLesNodesDeLaPage(nod,comboBoxValeur.getSelectedItem().toString(),point); } + if(nod.getNomElt().equals("structurepage")) { + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if(nod.getNodes().get(i).getNomElt().equals("page")) { + placeAtrtibutAllContentDansLesNodesDeLaPage(nod.getNodes().get(i),comboBoxValeur.getSelectedItem().toString(),point); + } + } + } + J.refreshAffichage(nod); } @@ -193,10 +199,18 @@ public class allContent extends JFrame { }); - - - setVisible(true); } + + + private void placeAtrtibutAllContentDansLesNodesDeLaPage(node nodePage,String methode, Integer point) { + for(int i = 0 ; i < nodePage.getNodes().size(); i++) { + if( listeDesNodesAllContent.isAllContent(nodePage.getNodes().get(i))){ + nodePage.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point)); + nodePage.getNodes().get(i).evaluerAllChildTrue(); } + } + } + + } diff --git a/src/fenetres/createPopupMenu.java b/src/fenetres/createPopupMenu.java index 0a5c282..5e44a26 100644 --- a/src/fenetres/createPopupMenu.java +++ b/src/fenetres/createPopupMenu.java @@ -112,6 +112,22 @@ public class createPopupMenu extends JPopupMenu { } } + + + /** + * menu pour le node structure pour evaluer tous les nodes text:p (paragraphe). + * @return + */ + private JMenu mnEvalTousParagraphes() { + JMenu mnEvalTousParagraphes = new JMenu("Tous les paragraphes de texte"); + mnEvalTousParagraphes.setIcon( new ImageIcon(create.class.getResource("/resources/menuEvalTousParagraphemini.png"))); + mnEvalTousParagraphes.add(new actAllContentChilds()); + mnEvalTousParagraphes.addSeparator(); + mnEvalTousParagraphes.add(mnEvalNameLegacyStyleTousLesNodes()); + return mnEvalTousParagraphes; + } + + /** * Menu permettant ajouter des titre1 à toutes les pages.
* @return @@ -698,7 +714,7 @@ public class createPopupMenu extends JPopupMenu { * @return */ private JMenu mnEvalNameLegacyStyleTousLesNodes() { - JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous des styles hérités, de tous les nodes"); + JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous les styles Parents"); mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestyletouslesnodesmini.png"))); mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTousLesNodesTrue()); mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteTousLesNodesFalse()); @@ -740,7 +756,7 @@ public class createPopupMenu extends JPopupMenu { } /** - * + * Menu permettant d'évaluer les nodes.
* @param nod * @return */ @@ -750,7 +766,7 @@ public class createPopupMenu extends JPopupMenu { //Imag pour evaluer le node mnGroupeMethodeEvaluer.setIcon( new ImageIcon(create.class.getResource("/resources/evaluatemini.png"))); - + // Pour le node structure if(nod.getNomElt().equals("structurepage")) { mnGroupeMethodeEvaluer.addSeparator(); mnGroupeMethodeEvaluer.add(mnEvalNombreDePageMaxi()); @@ -884,6 +900,8 @@ public class createPopupMenu extends JPopupMenu { mnGroupeMethodeEvaluerMultiple.add(mnEvalNumeroPage()); mnGroupeMethodeEvaluerMultiple.addSeparator(); mnGroupeMethodeEvaluerMultiple.add(mnEvalNumeroAbsoluePage()); + mnGroupeMethodeEvaluerMultiple.addSeparator(); + mnGroupeMethodeEvaluerMultiple.add(mnEvalTousParagraphes()); } diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java index 41286c2..f71aa0a 100644 --- a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java @@ -24,12 +24,25 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesFalse extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - for(int i = 0 ; i < nod.getNodes().size();i++) { - if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) { - nod.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle"); + if(nod.getNomElt().equals("page")) { + supprimeAttribut(nod); + } + if(nod.getNomElt().equals("structurepage")) { + for(int i = 0 ; i < nod.getNodes().size();i++) { + if(nod.getNodes().get(i).getNomElt().equals("page")) { + supprimeAttribut(nod.getNodes().get(i)); + } } } fenetres.create.getTextNodeSelect().refreshAffichage(nod); } + + private void supprimeAttribut(node nodePage) { + for(int i = 0 ; i < nodePage.getNodes().size();i++) { + if(listeDesNodesAnalyseStyle.isAnalyseStyle(nodePage.getNodes().get(i))) { + nodePage.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle"); + } + } + } } diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java index 7e3f61c..fb2f3cf 100644 --- a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java @@ -39,14 +39,17 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{ 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.
evalNameLegacyStyle=0.

"); }else { - - for(int i = 0 ; i < nod.getNodes().size(); i++) { - if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) { - nod.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", String.valueOf(point)); + String pointString = String.valueOf(point); + if(nod.getNomElt().equals("page")) { + ajouteAttribut(nod,pointString); + } + if(nod.getNomElt().equals("structurepage")) { + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if(nod.getNodes().get(i).getNomElt().equals("page")) { + ajouteAttribut(nod.getNodes().get(i),pointString); + } } } - - } } catch (Exception e2) { fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); @@ -56,5 +59,12 @@ public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{ fenetres.create.getTextNodeSelect().refreshAffichage(nod); } - + private void ajouteAttribut(node nodePage, String pointString) { + for(int i = 0 ; i < nodePage.getNodes().size(); i++) { + if(listeDesNodesAnalyseStyle.isAnalyseStyle(nodePage.getNodes().get(i))) { + nodePage.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", pointString); + } + } + } + } diff --git a/src/list/listeDesNodesAllContent.java b/src/list/listeDesNodesAllContent.java index 9cb7695..9cb90a7 100644 --- a/src/list/listeDesNodesAllContent.java +++ b/src/list/listeDesNodesAllContent.java @@ -35,6 +35,7 @@ public class listeDesNodesAllContent { case "style:paragraph-properties":return false; case "style:style":return false; case "style:default-style\"":return false; + case "saut:automatique":return false; default: return true; } diff --git a/src/resources/menuEvalTousParagraphe.png b/src/resources/menuEvalTousParagraphe.png new file mode 100644 index 0000000..e95af97 Binary files /dev/null and b/src/resources/menuEvalTousParagraphe.png differ diff --git a/src/resources/menuEvalTousParagraphemini.png b/src/resources/menuEvalTousParagraphemini.png new file mode 100644 index 0000000..c0556e3 Binary files /dev/null and b/src/resources/menuEvalTousParagraphemini.png differ