diff --git a/.classpath b/.classpath index 869a31d..033eb86 100644 --- a/.classpath +++ b/.classpath @@ -12,6 +12,6 @@ - + diff --git a/Menu/menucontextuel/MnGroupeMethodeEvaluerMultiple.java b/Menu/menucontextuel/MnGroupeMethodeEvaluerMultiple.java index debea82..f8a976a 100644 --- a/Menu/menucontextuel/MnGroupeMethodeEvaluerMultiple.java +++ b/Menu/menucontextuel/MnGroupeMethodeEvaluerMultiple.java @@ -3,7 +3,6 @@ package menucontextuel; import javax.swing.ImageIcon; import javax.swing.JMenu; -import action.actAllContentChilds; import cXML.node; import fenetres.create; import list.listeDesNodesPourEvaluerPage; @@ -33,8 +32,6 @@ public class MnGroupeMethodeEvaluerMultiple { mnGroupeMethodeEvaluerMultiple.setIcon( new ImageIcon(create.class.getResource("/resources/evaluatemultiplemini.png"))); if(nod.getNomElt().equals("structurepage")) { - mnGroupeMethodeEvaluerMultiple.addSeparator(); - mnGroupeMethodeEvaluerMultiple.add(new actAllContentChilds()); mnGroupeMethodeEvaluerMultiple.addSeparator(); mnGroupeMethodeEvaluerMultiple.add(mnEvalNamePage.menu()); mnGroupeMethodeEvaluerMultiple.addSeparator(); @@ -51,8 +48,6 @@ public class MnGroupeMethodeEvaluerMultiple { if(nod.getNomElt().equals("text:p") || nod.getNomElt().equals("text:h") || nod.getNomElt().equals("text:list") || nod.getNomElt().equals("text:list-item") || nod.getNomElt().equals("text:index-body") ) { mnGroupeMethodeEvaluerMultiple.addSeparator(); - mnGroupeMethodeEvaluerMultiple.add(new actAllContentChilds()); - mnGroupeMethodeEvaluerMultiple.addSeparator(); mnGroupeMethodeEvaluerMultiple.add(mnEvalNameNodeEnfants.menu()); mnGroupeMethodeEvaluerMultiple.addSeparator(); mnGroupeMethodeEvaluerMultiple.add(mnEvalPlacementDesEnfants.menu()); @@ -60,8 +55,6 @@ public class MnGroupeMethodeEvaluerMultiple { if(listeDesNodesPourEvaluerPage.isPage(nod)) { - mnGroupeMethodeEvaluerMultiple.addSeparator(); - mnGroupeMethodeEvaluerMultiple.add(new actAllContentChilds()); mnGroupeMethodeEvaluerMultiple.addSeparator(); mnGroupeMethodeEvaluerMultiple.add(mnEvalNameNodeEnfants.menu()); mnGroupeMethodeEvaluerMultiple.addSeparator(); diff --git a/Menu/sousmenuEvaluation/mnEvalFormatageDirect.java b/Menu/sousmenuEvaluation/mnEvalFormatageDirect.java index 418cd81..45b0c6e 100644 --- a/Menu/sousmenuEvaluation/mnEvalFormatageDirect.java +++ b/Menu/sousmenuEvaluation/mnEvalFormatageDirect.java @@ -3,7 +3,7 @@ package sousmenuEvaluation; import javax.swing.ImageIcon; import javax.swing.JMenu; -import action.actEvalFormatageDirectOui; +import action.actEvalFormatageDirect; import fenetres.create; /** @@ -17,8 +17,8 @@ public class mnEvalFormatageDirect{ public static JMenu menu() { JMenu mnEvalFormatageDirect = new JMenu("Evaluer l'absence ou la présence du formatage direct"); - mnEvalFormatageDirect.setIcon( new ImageIcon(create.class.getResource("/resources/sautpagecolonnemini.png"))); - mnEvalFormatageDirect.add(new actEvalFormatageDirectOui()); + mnEvalFormatageDirect.setIcon( new ImageIcon(create.class.getResource("/resources/evalformatagedirectmini.png"))); + mnEvalFormatageDirect.add(new actEvalFormatageDirect()); return mnEvalFormatageDirect; } } diff --git a/Menu/sousmenuEvaluation/mnEvalTousParagraphes.java b/Menu/sousmenuEvaluation/mnEvalTousParagraphes.java index 86096c6..d45d19e 100644 --- a/Menu/sousmenuEvaluation/mnEvalTousParagraphes.java +++ b/Menu/sousmenuEvaluation/mnEvalTousParagraphes.java @@ -3,7 +3,6 @@ package sousmenuEvaluation; import javax.swing.ImageIcon; import javax.swing.JMenu; -import action.actAllContentChilds; import fenetres.create; /** @@ -15,8 +14,6 @@ public class mnEvalTousParagraphes { public static JMenu menu() { 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.menu()); mnEvalTousParagraphes.addSeparator(); mnEvalTousParagraphes.add(mnEvalFormatageDirectTousLesNodes.menu()); diff --git a/analyseWriter.exe b/analyseWriter.exe index 5d1e831..f33012d 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/bin/.gitignore b/bin/.gitignore index 067a124..b76e7e4 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,159 +1,8 @@ /MEPTL/ /OnLineVersions/ /action/ -/auteurcreateurmini.png -/auteurediteur.png -/auteurediteur.svg -/auteurediteurmini.png /baseEvaluations/ -/biblio.png -/biblio.svg /calcul/ -/chargehistoriqueevaluation.png -/chargehistoriqueevaluationmini.png -/collapseAll.svg -/collapseNode.svg -/collapseallmini.png -/collapsenodemini.png -/configuration.png -/configuration.svg -/content.png -/content.svg -/copy.png -/couleur.png -/couleur.svg -/couleurmini.png -/csvstudent.png -/csvstudent.svg -/csvstudentmini.png -/cut.png -/defautBaseEvaluation.png -/defautBaseEvaluation.svg -/dernierenfant.png -/dernierenfant.svg -/dernierenfantmini.png -/dessin.svgparamètres évaluation et feedback.svg -/detailfeedback.png -/detailfeedbackmini.png -/documentation.pdf -/documentation.png -/documentation.svg -/documentationmax.png -/documentationmini.png -/dossieretudiant.png -/dossieretudiant.svg -/dossieretudiantmin.png -/dossieretudiantmini.png -/downnode.png -/downnode.svg -/downnodemini.png -/entetenon.png -/entetenon.svg -/entetenonmini.png -/enteteoui.png -/enteteoui.svg -/enteteouimini.png -/et.png -/et.svg -/etmini.png -/evalFirstChildfalse.png -/evalFirstChildfalsemini.png -/evalFirstChildtrue.png -/evalFirstChildtruemini.png -/evalLastChildfalse.png -/evalLastChildfalsemini.png -/evalLastChildtrue.png -/evalLastChildtruemini.png -/evalPiedPageActivefalse.png -/evalPiedPageActivefalsemini.png -/evalPiedPageActiveoui.png -/evalPiedPageActiveouimini.png -/evalPiedPageActivetrue.png -/evalPiedPageActivetruemini.png -/evalPiedPagePasActivefalse.png -/evalPiedPagePasActivefalsemini.png -/evalPiedPagePasActivetrue.png -/evalPiedPagePasActivetruemini.png -/evalcalc.png -/evalformatagedirect.png -/evalformatagedirect.svg -/evalformatagedirectfalse.png -/evalformatagedirectfalsemini.png -/evalformatagedirectmini.png -/evalformatagedirecttrue.png -/evalformatagedirecttruemini.png -/evalnamepage.png -/evalnamepage.svg -/evalnamepagefalse.png -/evalnamepagefalsemini.png -/evalnamepagemini.png -/evalnamepagetrue.png -/evalnamepagetruemini.png -/evalnamesequence.png -/evalnamesequence.svg -/evalnamesequencemini.png -/evalnode.svg -/evalnodefalse.png -/evalnodefalsemini.png -/evalnodemini.png -/evalnodetrue.png -/evalnodetruemini.png -/evalnombredepagemaxi.png -/evalnombredepagemaxi.svg -/evalnombredepagemaximini.png -/evalnombredepagemini.png -/evalnombredepageminimini.png -/evalnumeroabsoluepage.png -/evalnumeroabsoluepage.svg -/evalnumeroabsoluepagefalse.png -/evalnumeroabsoluepagefalsemini.png -/evalnumeroabsoluepagemini.png -/evalnumeroabsoluepagetrue.png -/evalnumeroabsoluepagetruemini.png -/evalnumeropage.png -/evalnumeropage.svg -/evalnumeropageancrage.png -/evalnumeropageancrage.svg -/evalnumeropageancragefalse.png -/evalnumeropageancragefalsemini.png -/evalnumeropageancragemini.png -/evalnumeropageancragetrue.png -/evalnumeropageancragetruemini.png -/evalnumeropagefalse.png -/evalnumeropagefalsemini.png -/evalnumeropagemini.png -/evalnumeropagetrue.png -/evalnumeropagetruemini.png -/evalpasparagraphevide.png -/evalpasparagraphevide.svg -/evalpasparagraphevidefalse.png -/evalpasparagraphevidefalsemini.png -/evalpasparagraphevidemini.png -/evalpasparagraphevidetrue.png -/evalpasparagraphevidetruemini.png -/evalplacementparagraphefalse.png -/evalplacementparagraphefalsemini.png -/evalplacementparagraphetrue.png -/evalplacementparagraphetruemini.png -/evaltabalgngauche.png -/evaltabalgngauchefalse.png -/evaltabalgngauchefalsemini.png -/evaltabalgngauchemini.png -/evaltabalgngauchetrue.png -/evaltabalgngauchetruemini.png -/evaltabaligngauche.svg -/evaltabstyleleader.png -/evaltabstyleleader.svg -/evaltabstyleleadermini.png -/evaltextuserdefined.png -/evaltextuserdefined.svg -/evaltextuserdefinedmini.png -/evaluate.png -/evaluate.svg -/evaluatemax.png -/evaluatemini.png -/evaluatemultiple.png -/evaluatemultiple.svg /evaluatemultiplemax.png /evaluatemultiplemini.png /evaluer.png @@ -466,6 +315,9 @@ /styleparagraphe.png /styleparagraphe.svg /supprime.svg +/supprimeAttribut.png +/supprimeAttribut.svg +/supprimeAttributmini.png /supprimemini.png /textclean.png /textclean.svg @@ -528,15 +380,3 @@ /zipstudent.png /zipstudent.svg /zipstudentmini.png -/resources/ -/EvalTabDefautStyleLeaderfalse.png -/EvalTabDefautStyleLeaderfalsemini.png -/EvalTabDefautStyleLeadertrue.png -/EvalTabDefautStyleLeadertruemini.png -/supprimeAttribut.png -/supprimeAttribut.svg -/supprimeAttributmini.png -/atraversanalysestylefalse.png -/atraversanalysestylefalsemini.png -/atraversanalysestyletrue.png -/atraversanalysestyletruemini.png diff --git a/bin/EvalTabDefautStyleLeaderfalse.png b/bin/EvalTabDefautStyleLeaderfalse.png new file mode 100644 index 0000000..1482d65 Binary files /dev/null and b/bin/EvalTabDefautStyleLeaderfalse.png differ diff --git a/bin/EvalTabDefautStyleLeaderfalsemini.png b/bin/EvalTabDefautStyleLeaderfalsemini.png new file mode 100644 index 0000000..ebb47dc Binary files /dev/null and b/bin/EvalTabDefautStyleLeaderfalsemini.png differ diff --git a/bin/EvalTabDefautStyleLeadertrue.png b/bin/EvalTabDefautStyleLeadertrue.png new file mode 100644 index 0000000..dc6bf18 Binary files /dev/null and b/bin/EvalTabDefautStyleLeadertrue.png differ diff --git a/bin/EvalTabDefautStyleLeadertruemini.png b/bin/EvalTabDefautStyleLeadertruemini.png new file mode 100644 index 0000000..52ec5f1 Binary files /dev/null and b/bin/EvalTabDefautStyleLeadertruemini.png differ diff --git a/bin/atraversanalysestylefalse.png b/bin/atraversanalysestylefalse.png new file mode 100644 index 0000000..2ac6c5a Binary files /dev/null and b/bin/atraversanalysestylefalse.png differ diff --git a/bin/atraversanalysestylefalsemini.png b/bin/atraversanalysestylefalsemini.png new file mode 100644 index 0000000..b7ffb6e Binary files /dev/null and b/bin/atraversanalysestylefalsemini.png differ diff --git a/bin/atraversanalysestyletrue.png b/bin/atraversanalysestyletrue.png new file mode 100644 index 0000000..c0e52b3 Binary files /dev/null and b/bin/atraversanalysestyletrue.png differ diff --git a/bin/atraversanalysestyletruemini.png b/bin/atraversanalysestyletruemini.png new file mode 100644 index 0000000..3099742 Binary files /dev/null and b/bin/atraversanalysestyletruemini.png differ diff --git a/bin/evalPiedPageActivefalse.png b/bin/evalPiedPageActivefalse.png new file mode 100644 index 0000000..a61525c Binary files /dev/null and b/bin/evalPiedPageActivefalse.png differ diff --git a/bin/evalPiedPageActivefalsemini.png b/bin/evalPiedPageActivefalsemini.png new file mode 100644 index 0000000..c12e566 Binary files /dev/null and b/bin/evalPiedPageActivefalsemini.png differ diff --git a/bin/evalPiedPageActiveoui.png b/bin/evalPiedPageActiveoui.png new file mode 100644 index 0000000..e236b93 Binary files /dev/null and b/bin/evalPiedPageActiveoui.png differ diff --git a/bin/evalPiedPageActiveouimini.png b/bin/evalPiedPageActiveouimini.png new file mode 100644 index 0000000..280a629 Binary files /dev/null and b/bin/evalPiedPageActiveouimini.png differ diff --git a/bin/evalPiedPageActivetrue.png b/bin/evalPiedPageActivetrue.png new file mode 100644 index 0000000..e236b93 Binary files /dev/null and b/bin/evalPiedPageActivetrue.png differ diff --git a/bin/evalPiedPageActivetruemini.png b/bin/evalPiedPageActivetruemini.png new file mode 100644 index 0000000..280a629 Binary files /dev/null and b/bin/evalPiedPageActivetruemini.png differ diff --git a/bin/evalPiedPagePasActivefalse.png b/bin/evalPiedPagePasActivefalse.png new file mode 100644 index 0000000..42457a7 Binary files /dev/null and b/bin/evalPiedPagePasActivefalse.png differ diff --git a/bin/evalPiedPagePasActivefalsemini.png b/bin/evalPiedPagePasActivefalsemini.png new file mode 100644 index 0000000..a9e5e5e Binary files /dev/null and b/bin/evalPiedPagePasActivefalsemini.png differ diff --git a/bin/evalPiedPagePasActivetrue.png b/bin/evalPiedPagePasActivetrue.png new file mode 100644 index 0000000..4f4414f Binary files /dev/null and b/bin/evalPiedPagePasActivetrue.png differ diff --git a/bin/evalPiedPagePasActivetruemini.png b/bin/evalPiedPagePasActivetruemini.png new file mode 100644 index 0000000..7da61bc Binary files /dev/null and b/bin/evalPiedPagePasActivetruemini.png differ diff --git a/bin/evalnode.png b/bin/evalnode.png new file mode 100644 index 0000000..bee3ec2 Binary files /dev/null and b/bin/evalnode.png differ diff --git a/bin/evaltabalgngauchefalse.png b/bin/evaltabalgngauchefalse.png new file mode 100644 index 0000000..114e245 Binary files /dev/null and b/bin/evaltabalgngauchefalse.png differ diff --git a/bin/evaltabalgngauchefalsemini.png b/bin/evaltabalgngauchefalsemini.png new file mode 100644 index 0000000..270a6e2 Binary files /dev/null and b/bin/evaltabalgngauchefalsemini.png differ diff --git a/bin/evaltabalgngauchetrue.png b/bin/evaltabalgngauchetrue.png new file mode 100644 index 0000000..f88191f Binary files /dev/null and b/bin/evaltabalgngauchetrue.png differ diff --git a/bin/evaltabalgngauchetruemini.png b/bin/evaltabalgngauchetruemini.png new file mode 100644 index 0000000..4cf3a99 Binary files /dev/null and b/bin/evaltabalgngauchetruemini.png differ diff --git a/bin/resources/evalnode.png b/bin/resources/evalnode.png new file mode 100644 index 0000000..bee3ec2 Binary files /dev/null and b/bin/resources/evalnode.png differ diff --git a/bin/resources/supprimeAttributmini.png b/bin/resources/supprimeAttributmini.png new file mode 100644 index 0000000..9198ac5 Binary files /dev/null and b/bin/resources/supprimeAttributmini.png differ diff --git a/src/action/actAllContent.java b/src/action/actAllContent.java index 988ed01..c6f0b94 100644 --- a/src/action/actAllContent.java +++ b/src/action/actAllContent.java @@ -31,7 +31,7 @@ public class actAllContent extends AbstractAction{ public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); if(listeDesNodesAllContent.isAllContent(nod)) { - new allContent(nod,fenetres.create.getTextNodeSelect(),false); + new allContent(nod,fenetres.create.getTextNodeSelect()); } } } diff --git a/src/action/actAllContentChilds.java b/src/action/actAllContentChilds.java deleted file mode 100644 index 3cfa180..0000000 --- a/src/action/actAllContentChilds.java +++ /dev/null @@ -1,30 +0,0 @@ -package action; - -import java.awt.event.ActionEvent; - -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.ImageIcon; - -import cXML.node; -import fenetres.allContent; -import fenetres.create; - -public class actAllContentChilds extends AbstractAction{ - { - putValue( Action.NAME, "Evaluer le contenu de tous les nodes enfants" ); - putValue( Action.SHORT_DESCRIPTION, "Evaluer le contenu de tous les nodes enfants" ); - putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/allcontentchildsmini.png")) ); - } - /** - * - */ - private static final long serialVersionUID = 1L; - - @Override - public void actionPerformed(ActionEvent e) { - node nod = (node) fenetres.create.getSelectNode().getUserObject(); - new allContent(nod,fenetres.create.getTextNodeSelect(),true); - } - -} diff --git a/src/action/actEvalAncrageNumeroAbsoluePageOui.java b/src/action/actEvalAncrageNumeroAbsoluePageOui.java index e82d818..070e85d 100644 --- a/src/action/actEvalAncrageNumeroAbsoluePageOui.java +++ b/src/action/actEvalAncrageNumeroAbsoluePageOui.java @@ -28,7 +28,7 @@ public class actEvalAncrageNumeroAbsoluePageOui extends AbstractAction{ "

Si le node dans le fichier de l'étudiant est ancré dans la même page
" + "(en valeur absolue), alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalAncrageNumeroAbsoluePage", + + "d'évaluation evalAncrageNumeroAbsoluePage

", new ImageIcon(create.class.getResource("/resources/evalnumeropageancrage.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalEnteteActive.java b/src/action/actEvalEnteteActive.java index e12f7c7..d0735a3 100644 --- a/src/action/actEvalEnteteActive.java +++ b/src/action/actEvalEnteteActive.java @@ -29,7 +29,7 @@ public class actEvalEnteteActive extends AbstractAction{ + "style:header-footer-properties (en-tête activé),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalEnteteActive", + + "d'évaluation evalEnteteActive

", new ImageIcon(create.class.getResource("/resources/enteteoui.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalEntetePasActive.java b/src/action/actEvalEntetePasActive.java index f7b0216..87f2e32 100644 --- a/src/action/actEvalEntetePasActive.java +++ b/src/action/actEvalEntetePasActive.java @@ -29,7 +29,7 @@ public class actEvalEntetePasActive extends AbstractAction{ + "style:header-footer-properties (en-tête désactivé),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalEntetePasActive", + + "d'évaluation evalEntetePasActive

", new ImageIcon(create.class.getResource("/resources/entetenon.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalFirstChildTrue.java b/src/action/actEvalFirstChildTrue.java index 985cba5..70dbdd0 100644 --- a/src/action/actEvalFirstChildTrue.java +++ b/src/action/actEvalFirstChildTrue.java @@ -28,7 +28,7 @@ public class actEvalFirstChildTrue extends AbstractAction{ "

Si ce node est le premier node dans le fichier de l'étudiant alors
" + "l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalFirstChild", + + "d'évaluation evalFirstChild

", new ImageIcon(create.class.getResource("/resources/premierenfant.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); diff --git a/src/action/actEvalFormatageDirectOui.java b/src/action/actEvalFormatageDirect.java similarity index 85% rename from src/action/actEvalFormatageDirectOui.java rename to src/action/actEvalFormatageDirect.java index 35bf98d..aab90b5 100644 --- a/src/action/actEvalFormatageDirectOui.java +++ b/src/action/actEvalFormatageDirect.java @@ -10,11 +10,11 @@ import cXML.node; import fenetres.CustomInputDialogSimplePoint; import fenetres.create; -public class actEvalFormatageDirectOui extends AbstractAction{ +public class actEvalFormatageDirect extends AbstractAction{ { putValue( Action.NAME, "Oui, combien de point?" ); putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence ou l'absence du formatage direct." ); - putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/sautpagecolonnemini.png")) ); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evalformatagedirectmini.png")) ); } /** * @@ -30,7 +30,7 @@ public class actEvalFormatageDirectOui extends AbstractAction{ + "et/ou de caractères (style:name=Px), ou ne contient pas
" + "une surcharge alors l'étudiant aura les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalFormatageDirect", + + "d'évaluation evalFormatageDirect

", new ImageIcon(create.class.getResource("/resources/evalformatagedirect.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalInitialCreator.java b/src/action/actEvalInitialCreator.java index ef49929..11c166a 100644 --- a/src/action/actEvalInitialCreator.java +++ b/src/action/actEvalInitialCreator.java @@ -5,10 +5,9 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; -import javax.swing.JOptionPane; import cXML.node; -import fenetres.baliseStyle; +import fenetres.CustomInputDialogSimplePoint; import fenetres.create; public class actEvalInitialCreator extends AbstractAction{ @@ -25,29 +24,12 @@ public class actEvalInitialCreator extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - int point = 0; - if(nod.getAttributs().get("evalNameInitialCreator")!=null) { - point = Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator")); - } - - String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); - - if(a!=null)if(!a.isBlank()) { - try { - point = Integer.valueOf(a); - if(point<=0) { - nod.supprimeAttribut("evalNameInitialCreator"); - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

Erreur la valeur doit être un nombre entier POSITIF SUPÉRIEUR à zéro.
Cependant,l'attribut evalNameInitialCreator a été supprimé.

"); - }else { - nod.getAttributs().put("evalNameInitialCreator", String.valueOf(point)); - } - } catch (Exception e2) { - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

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

"); - } - } + CustomInputDialogSimplePoint.showCustominputDialog(nod,"evalNameInitialCreator", + "

Si ce node contient le prénom et nom du premier auteur,
" + + "alors l'étudiant obtiendra les points ci-dessous.


" + + "

Cliquez sur le bouton supprimer pour retirer la méthode
" + + "d'évaluation evalNameInitialCreator

", + new ImageIcon(create.class.getResource("/resources/auteurcreateur.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } } - -} diff --git a/src/action/actEvalLastChildTrue.java b/src/action/actEvalLastChildTrue.java index 1037d2b..2665723 100644 --- a/src/action/actEvalLastChildTrue.java +++ b/src/action/actEvalLastChildTrue.java @@ -28,7 +28,7 @@ public class actEvalLastChildTrue extends AbstractAction{ "

Si ce node est le dernier node dans le fichier de l'étudiant alors
" + "l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalLastChild", + + "d'évaluation evalLastChild

", new ImageIcon(create.class.getResource("/resources/dernierenfant.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalNameNodeOui.java b/src/action/actEvalNameNodeOui.java index b531bca..f78575e 100644 --- a/src/action/actEvalNameNodeOui.java +++ b/src/action/actEvalNameNodeOui.java @@ -28,7 +28,7 @@ public class actEvalNameNodeOui extends AbstractAction{ "

Si ce node est présent dans le fichier de l'étudiant alors
" + "l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalNameNode", + + "d'évaluation evalNameNode

", new ImageIcon(create.class.getResource("/resources/evalnode.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalNamePageOui.java b/src/action/actEvalNamePageOui.java index fca814e..d89f3bb 100644 --- a/src/action/actEvalNamePageOui.java +++ b/src/action/actEvalNamePageOui.java @@ -31,7 +31,7 @@ public class actEvalNamePageOui extends AbstractAction{ +"

Cochez sur la case sur \"Sur toutes les pages\" pour insérer
" +"ou supprimer la méthode sur toutes les pages.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalNamePage", + + "d'évaluation evalNamePage

", new ImageIcon(create.class.getResource("/resources/evalnamepage.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalNameSequenceOui.java b/src/action/actEvalNameSequenceOui.java index ac18094..c1e848e 100644 --- a/src/action/actEvalNameSequenceOui.java +++ b/src/action/actEvalNameSequenceOui.java @@ -5,10 +5,9 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; -import javax.swing.JOptionPane; import cXML.node; -import fenetres.baliseStyle; +import fenetres.CustomInputDialogSimplePoint; import fenetres.create; public class actEvalNameSequenceOui extends AbstractAction{ @@ -19,35 +18,19 @@ public class actEvalNameSequenceOui extends AbstractAction{ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Oui, combien de point?" ); - putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom de la séquence" ); - putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")) ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom de la variable de séquence" ); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evalnamesequencemini.png")) ); } @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - int point = 0; - if(nod.getAttributs().get("evalNameSequence")!=null) { - point = Integer.valueOf(nod.getAttributs().get("evalNameSequence")); + CustomInputDialogSimplePoint.showCustominputDialog(nod,"evalNameSequence", + "

Si ce node contient le nom de la varriable de séquence
" + + "(ex. création d'une catégorie), alors l'étudiant obtiendra
" + + "les points ci-dessous.


" + + "

Cliquez sur le bouton supprimer pour retirer la méthode
" + + "d'évaluation evalNameSequence

", + new ImageIcon(create.class.getResource("/resources/evalnamesequence.png"))); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); } - - String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); - - if(a!=null)if(!a.isBlank()) { - try { - point = Integer.valueOf(a); - if(point<=0) { - nod.supprimeAttribut("evalNameSequence"); - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

Erreur la valeur doit être un nombre entier POSITIF SUPÉRIEUR à zéro.
Cependant,l'attribut evalNameSequence a été supprimé.

"); - }else { - nod.getAttributs().put("evalNameSequence", String.valueOf(point)); - } - } catch (Exception e2) { - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

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

"); - } - } - fenetres.create.getTextNodeSelect().refreshAffichage(nod); } - -} diff --git a/src/action/actEvalNumeroAbsoluePageOui.java b/src/action/actEvalNumeroAbsoluePageOui.java index 57a01c8..41686c0 100644 --- a/src/action/actEvalNumeroAbsoluePageOui.java +++ b/src/action/actEvalNumeroAbsoluePageOui.java @@ -31,7 +31,7 @@ public class actEvalNumeroAbsoluePageOui extends AbstractAction{ +"

Cochez sur la case sur \"Sur toutes les pages\" pour insérer
" +"ou supprimer la méthode sur toutes les pages.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalNumeroAbsoluePage", + + "d'évaluation evalNumeroAbsoluePage

", new ImageIcon(create.class.getResource("/resources/evalnumeroabsoluepage.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalNumeroPageOui.java b/src/action/actEvalNumeroPageOui.java index 37ca65c..8cd3bcc 100644 --- a/src/action/actEvalNumeroPageOui.java +++ b/src/action/actEvalNumeroPageOui.java @@ -31,7 +31,7 @@ public class actEvalNumeroPageOui extends AbstractAction{ +"

Cochez sur la case sur \"Sur toutes les pages\" pour insérer
" +"ou supprimer la méthode sur toutes les pages.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalNumeroPage", + + "d'évaluation evalNumeroPage

", new ImageIcon(create.class.getResource("/resources/evalnumeropage.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalPasParagrapheVideOui.java b/src/action/actEvalPasParagrapheVideOui.java index 0b887f5..c2a0f33 100644 --- a/src/action/actEvalPasParagrapheVideOui.java +++ b/src/action/actEvalPasParagrapheVideOui.java @@ -31,7 +31,7 @@ public class actEvalPasParagrapheVideOui extends AbstractAction{ +"

Cochez sur la case sur \"Sur toutes les pages\" pour insérer
" +"ou supprimer la méthode sur toutes les pages.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalPasParagrapheVide", + + "d'évaluation evalPasParagrapheVide

", new ImageIcon(create.class.getResource("/resources/evalpasparagraphevide.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalPiedPageActive.java b/src/action/actEvalPiedPageActive.java index c747081..dca5eac 100644 --- a/src/action/actEvalPiedPageActive.java +++ b/src/action/actEvalPiedPageActive.java @@ -29,7 +29,7 @@ public class actEvalPiedPageActive extends AbstractAction{ + "style:header-footer-properties (pied de page désactivé),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalPiedPageActive", + + "d'évaluation evalPiedPageActive

", new ImageIcon(create.class.getResource("/resources/piedpageoui.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalPiedPagePasActive.java b/src/action/actEvalPiedPagePasActive.java index b2371aa..2d302a1 100644 --- a/src/action/actEvalPiedPagePasActive.java +++ b/src/action/actEvalPiedPagePasActive.java @@ -29,7 +29,7 @@ public class actEvalPiedPagePasActive extends AbstractAction{ + "style:header-footer-properties (pied de page activé),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalPiedPagePasActive", + + "d'évaluation evalPiedPagePasActive

", new ImageIcon(create.class.getResource("/resources/piedpagenon.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalPlacementParagrapheOui.java b/src/action/actEvalPlacementParagrapheOui.java index 3c3f607..736b316 100644 --- a/src/action/actEvalPlacementParagrapheOui.java +++ b/src/action/actEvalPlacementParagrapheOui.java @@ -7,7 +7,7 @@ import javax.swing.Action; import javax.swing.ImageIcon; import cXML.node; -import fenetres.CustomInputDialogSimplePoint; +import fenetres.CustomInputDialogSimplePointCaseCoche; import fenetres.create; public class actEvalPlacementParagrapheOui extends AbstractAction{ @@ -24,12 +24,13 @@ public class actEvalPlacementParagrapheOui extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - CustomInputDialogSimplePoint.showCustominputDialog(nod,"evalPlacement", + CustomInputDialogSimplePointCaseCoche.showCustominputDialog(nod,"evalPlacement", "

Si ce node dans le fichier de l'étudiant est placé juste après le
" + "node précédent de ce node, alors l'étudiant obtiendra les points
" + "ci-dessous.


" + + "

Cochez la case pour placer ou supprimer la méthode sur
tous les nodes frères.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalPlacement", + + "d'évaluation evalPlacement

", new ImageIcon(create.class.getResource("/resources/ordreparagraphe.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalTabAlignementGaucheOui.java b/src/action/actEvalTabAlignementGaucheOui.java index 76eb185..2a29c7c 100644 --- a/src/action/actEvalTabAlignementGaucheOui.java +++ b/src/action/actEvalTabAlignementGaucheOui.java @@ -29,7 +29,7 @@ public class actEvalTabAlignementGaucheOui extends AbstractAction{ + "style:type (alignement à gauche),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalPiedPagePasActive", + + "d'évaluation evalPiedPagePasActive

", new ImageIcon(create.class.getResource("/resources/evaltabalgngauche.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvalTabDefautStyleLeaderOui.java b/src/action/actEvalTabDefautStyleLeaderOui.java index 14ddbf3..f859acc 100644 --- a/src/action/actEvalTabDefautStyleLeaderOui.java +++ b/src/action/actEvalTabDefautStyleLeaderOui.java @@ -29,7 +29,7 @@ public class actEvalTabDefautStyleLeaderOui extends AbstractAction{ + "style:leader-text (remplissage des caractères par défaut),
" + "alors l'étudiant obtiendra les points ci-dessous.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalTABStyleLeaderDefault", + + "d'évaluation evalTABStyleLeaderDefault

", new ImageIcon(create.class.getResource("/resources/evaltabstyleleader.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actEvaluerNomDuStyleHeriteTrue.java b/src/action/actEvaluerNomDuStyleHeriteTrue.java index 20f91a2..53336f7 100644 --- a/src/action/actEvaluerNomDuStyleHeriteTrue.java +++ b/src/action/actEvaluerNomDuStyleHeriteTrue.java @@ -7,7 +7,7 @@ import javax.swing.Action; import javax.swing.ImageIcon; import cXML.node; -import fenetres.CustomInputDialogSimplePoint; +import fenetres.CustomInputDialogSimplePointCaseCoche; import fenetres.create; public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{ @@ -24,11 +24,12 @@ public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - CustomInputDialogSimplePoint.showCustominputDialog(nod,"evalNameLegacyStyle", + CustomInputDialogSimplePointCaseCoche.showCustominputDialog(nod,"evalNameLegacyStyle", "

Si le node de l'étudiant possède le même style par héritage
" + "que ce node, alors l'étudiant obtiendra les points ci-dessous.


" + + "

Cochez la case pour placer ou supprimer la méthode sur
tous les nodes frères.


" + "

Cliquez sur le bouton supprimer pour retirer la méthode
" - + "d'évaluation evalNameLegacyStyle", + + "d'évaluation evalNameLegacyStyle

", new ImageIcon(create.class.getResource("/resources/heritagestyle.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } diff --git a/src/action/actevalNameCreator.java b/src/action/actevalNameCreator.java index 202f751..b949632 100644 --- a/src/action/actevalNameCreator.java +++ b/src/action/actevalNameCreator.java @@ -5,10 +5,9 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; -import javax.swing.JOptionPane; import cXML.node; -import fenetres.baliseStyle; +import fenetres.CustomInputDialogSimplePoint; import fenetres.create; public class actevalNameCreator extends AbstractAction{ @@ -25,29 +24,13 @@ public class actevalNameCreator extends AbstractAction{ @Override public void actionPerformed(ActionEvent e) { node nod = (node) fenetres.create.getSelectNode().getUserObject(); - int point = 0; - if(nod.getAttributs().get("evalNameCreator")!=null) { - point = Integer.valueOf(nod.getAttributs().get("evalNameCreator")); - } - - String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); - - if(!a.isEmpty()) { - try { - point = Integer.valueOf(a); - if(point<=0) { - nod.getAttributs().put("evalNameCreator", String.valueOf(0)); - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

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

"); - }else { - nod.getAttributs().put("evalNameCreator", String.valueOf(point)); - } - } catch (Exception e2) { - fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); - fenetres.create.getTextNodeSelect().setText("

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

"); - } - } + CustomInputDialogSimplePoint.showCustominputDialog(nod,"evalNameCreator", + "

Si ce node contient le prénom et nom du dernier auteur
" + + "(auteur des modifications), alors l'étudiant obtiendra
" + + "les points ci-dessous.


" + + "

Cliquez sur le bouton supprimer pour retirer la méthode
" + + "d'évaluation evalNameCreator

", + new ImageIcon(create.class.getResource("/resources/auteurediteur.png"))); fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } } - -} diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java index 4f0e280..7bb9482 100644 --- a/src/evaluer/evaluationAttribut.java +++ b/src/evaluer/evaluationAttribut.java @@ -798,20 +798,21 @@ public class evaluationAttribut { Pattern p = Pattern.compile("^P[0-9]{1,}$"); Matcher m = p.matcher(nameStyleStudent); if(m.find()) formatageStudent=true; + m = p.matcher(nameStyleSujet); if(m.find()) formatageSujet=true; if((formatageSujet && formatageStudent)) { - retour = evaluationFormatageDirect(retour,"Présence formatage direct", "Présence formatage direct", sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,"Présence formatage direct du paragraphe", "Présence formatage direct du paragraphe", sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); } if((!formatageSujet && !formatageStudent)){ - retour = evaluationFormatageDirect(retour,"Absence formatage direct", "Absence formatage direct" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,"Absence formatage direct du paragraphe", "Absence formatage direct du paragraphe" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); } if((formatageSujet && !formatageStudent)){ - retour = evaluationFormatageDirect(retour,"Présence formatage direct", "Absence formatage direct" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,"Présence formatage direct du paragraphe", "Absence formatage direct du paragraphe" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); } if((!formatageSujet && formatageStudent)){ - retour = evaluationFormatageDirect(retour,"Absence formatage direct", "Présence formatage direct" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,"Absence formatage direct du paragraphe", "Présence formatage direct du paragraphe" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); } }else { @@ -826,9 +827,9 @@ public class evaluationAttribut { Matcher m = p.matcher(nameStyleSujet); if(m.find()) formatageSujet=true; if((formatageSujet)){ - retour = evaluationFormatageDirect(retour,null, "Présence formatage direct" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,null, "Présence formatage direct du paragraphe" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); }else { - retour = evaluationFormatageDirect(retour,null, "Absence formatage direct" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); + retour = evaluationFormatageDirect(retour,null, "Absence formatage direct du paragraphe" , sujet.getAttributs().get("evalFormatageDirect"),"Formatage"); } } diff --git a/src/fenetres/CustomInputDialogActivateStyle.java b/src/fenetres/CustomInputDialogActivateStyle.java index 33ff079..bbf3d3d 100644 --- a/src/fenetres/CustomInputDialogActivateStyle.java +++ b/src/fenetres/CustomInputDialogActivateStyle.java @@ -5,6 +5,7 @@ import java.awt.Font; import java.util.ArrayList; import javax.swing.ImageIcon; +import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JOptionPane; @@ -24,11 +25,14 @@ public class CustomInputDialogActivateStyle { + "caractères.

"); lblExpliaction.setFont(new Font("Tahoma", Font.BOLD, 12)); lblExpliaction.setForeground(Color.blue); - ImageIcon icon = new ImageIcon(create.class.getResource("/resources/evaluerstyle.png")); - + ImageIcon icon = new ImageIcon(create.class.getResource("/resources/evaluerstyle.png")); + JCheckBox chckbxAllBrother = new JCheckBox("Placer la méthode sur tous les nodes frères."); + + Object[] message = { lblTitre, lblExpliaction, + chckbxAllBrother }; String[] options = {"Active", "Désactive"}; @@ -44,40 +48,62 @@ public class CustomInputDialogActivateStyle { options[0]); if (optionSelected == 0) { // Bouton "Ajouter" sélectionné - nod.getAttributs().put("analyseStyle", "true"); - //*************************************************************************************************************** - //** Place l'attribut EvaluerATraversAnalyseStyle=true au style qui doit être évaluer à travers d'analyseStyle ** - //** S'il y a des attributs évaluer avec ‽ alors change par ‼ ** - //*************************************************************************************************************** - String nameStyle = nod.getAttributs().get("text:style-name"); - ArrayList nodP = commandes.sujet.retourneEnfantsContainAttribut("style:name"); - for(int i = 0 ; i < nodP.size();i++) { - if(nodP.get(i).getAttributs().get("style:name").equals(nameStyle)) { - nodP.get(i).getAttributs().put("EvaluerATraversAnalyseStyle", "true"); - nodP.get(i).evaluerTrue(); - nodP.get(i).changeLesCodesEvaluateursVersCodeATraversAnalyseStyle(); - } - } + placeLaMethodeActive(nod); + if(chckbxAllBrother.isSelected()) { + ArrayList nods = nod.retourneTousLesFreres(); + for(int i = 0 ; i < nods.size(); i ++) { + placeLaMethodeActive(nods.get(i)); + } + } } else if (optionSelected == 1) { // Bouton "Supprimer" sélectionné - - nod.supprimeAttribut("analyseStyle"); - //*************************************************************************************************************** - //** Place l'attribut EvaluerATraversAnalyseStyle=true au style qui doit être évaluer à travers d'analyseStyle ** - //** S'il y a des attributs évaluer avec ‽ alors change par ‼ ** - //*************************************************************************************************************** - String nameStyle = nod.getAttributs().get("text:style-name"); - ArrayList nodP = commandes.sujet.retourneEnfantsContainAttribut("style:name"); - for(int i = 0 ; i < nodP.size();i++) { - if(nodP.get(i).getAttributs().get("style:name").equals(nameStyle)) { - nodP.get(i).getAttributs().put("EvaluerATraversAnalyseStyle", "false"); - nodP.get(i).changeLesCodesEvaluateursVersCodeATraversAnalyseStyle(); - nodP.get(i).evaluerFalse(); - } - } - } else { // Si la boîte de dialogue est annulée ou fermée + supprimeLaMethode(nod); + if(chckbxAllBrother.isSelected()) { + if(chckbxAllBrother.isSelected()) { + ArrayList nods = nod.retourneTousLesFreres(); + for(int i = 0 ; i < nods.size(); i ++) { + supprimeLaMethode(nods.get(i)); + } + } + } + }else { // Si la boîte de dialogue est annulée ou fermée } } + + + private static void placeLaMethodeActive(node nod) { + nod.getAttributs().put("analyseStyle", "true"); + //*************************************************************************************************************** + //** Place l'attribut EvaluerATraversAnalyseStyle=true au style qui doit être évaluer à travers d'analyseStyle ** + //** S'il y a des attributs évaluer avec ‽ alors change par ‼ ** + //*************************************************************************************************************** + String nameStyle = nod.getAttributs().get("text:style-name"); + ArrayList nodP = commandes.sujet.retourneEnfantsContainAttribut("style:name"); + for(int i = 0 ; i < nodP.size();i++) { + if(nodP.get(i).getAttributs().get("style:name").equals(nameStyle)) { + nodP.get(i).getAttributs().put("EvaluerATraversAnalyseStyle", "true"); + nodP.get(i).evaluerTrue(); + nodP.get(i).changeLesCodesEvaluateursVersCodeATraversAnalyseStyle(); + } + } + } + + private static void supprimeLaMethode(node nod) { + nod.supprimeAttribut("analyseStyle"); + //*************************************************************************************************************** + //** Place l'attribut EvaluerATraversAnalyseStyle=true au style qui doit être évaluer à travers d'analyseStyle ** + //** S'il y a des attributs évaluer avec ‽ alors change par ‼ ** + //*************************************************************************************************************** + String nameStyle = nod.getAttributs().get("text:style-name"); + ArrayList nodP = commandes.sujet.retourneEnfantsContainAttribut("style:name"); + for(int i = 0 ; i < nodP.size();i++) { + if(nodP.get(i).getAttributs().get("style:name").equals(nameStyle)) { + nodP.get(i).getAttributs().put("EvaluerATraversAnalyseStyle", "false"); + nodP.get(i).changeLesCodesEvaluateursVersCodeATraversAnalyseStyle(); + nodP.get(i).evaluerFalse(); + } + } + } } diff --git a/src/fenetres/CustomInputDialogSimplePointCaseCoche.java b/src/fenetres/CustomInputDialogSimplePointCaseCoche.java new file mode 100644 index 0000000..8ce12bb --- /dev/null +++ b/src/fenetres/CustomInputDialogSimplePointCaseCoche.java @@ -0,0 +1,93 @@ +package fenetres; + +import java.awt.Color; +import java.awt.Font; +import java.util.ArrayList; + +import javax.swing.ImageIcon; +import javax.swing.JCheckBox; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import javax.swing.SwingConstants; + +import cXML.node; + + +public class CustomInputDialogSimplePointCaseCoche { + public static void showCustominputDialog(node nod, String nameMethod, String explication, ImageIcon icon) { + Integer initialValue = 0; + + if (nod.getAttributs().get(nameMethod) != null) { + initialValue = Integer.parseInt(nod.getAttributs().get(nameMethod)); + } + + JLabel lblTitre = new JLabel("

"+nameMethod+"

"); + lblTitre.setForeground(new Color(50,50,200)); + + JLabel lblExpliaction = new JLabel(explication); + lblExpliaction.setFont(new Font("Tahoma", Font.BOLD, 12)); + lblExpliaction.setForeground(Color.blue); + + JTextField textField = new JTextField(String.valueOf(initialValue), 4); + textField.setFont(new Font("Tahoma", Font.BOLD, 14)); + textField.setHorizontalAlignment(SwingConstants.LEFT); + + JCheckBox caseFrere = new JCheckBox("Placer la méthode sur tous les nodes frères."); + caseFrere.setFont(new Font("Tahoma", Font.BOLD, 12)); + caseFrere.setSelected(false); + + Object[] message = { + lblTitre, + lblExpliaction, + caseFrere, + "Quel est le nombre de points?", textField + }; + + String[] options = {"Ajouter", "Supprimer"}; + + int optionSelected = JOptionPane.showOptionDialog( + null, + message, + "Ajouter ou supprimer la méthode " + nameMethod, + JOptionPane.DEFAULT_OPTION, + JOptionPane.INFORMATION_MESSAGE, + icon, + options, + options[0]); + + if (optionSelected == 0) { // Bouton "Ajouter" sélectionné + try { + Integer inputValue = Integer.parseInt(textField.getText()); + if(!caseFrere.isSelected()) { + nod.getAttributs().put(nameMethod, String.valueOf(inputValue)); + }else { + ajouteAToutesLesFeres(nod, inputValue,nameMethod); + } + + } catch (NumberFormatException e) { + JOptionPane.showMessageDialog(null, "Veuillez saisir un entier valide.", "Erreur", JOptionPane.ERROR_MESSAGE); + } + } else if (optionSelected == 1) { // Bouton "Supprimer" sélectionné + if(!caseFrere.isSelected()) { + nod.supprimeAttribut(nameMethod); + }else { + ajouteAToutesLesFeres(nod,0,nameMethod); + } + + } else { // Si la boîte de dialogue est annulée ou fermée + + } + } + + private static void ajouteAToutesLesFeres(node nod,Integer point,String nameMethod) { + ArrayList nodFeres = nod.retourneTousLesFreres(); + for(int i=0; i < nodFeres.size();i++) { + if(point>0) { + nodFeres.get(i).getAttributs().put(nameMethod, String.valueOf(point)); + }else { + nodFeres.get(i).supprimeAttribut(nameMethod); + } + } + } +} diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java index 42028b7..db497b9 100644 --- a/src/fenetres/afficheText.java +++ b/src/fenetres/afficheText.java @@ -1,5 +1,8 @@ package fenetres; +import java.awt.Desktop; +import java.io.IOException; +import java.net.URISyntaxException; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.ArrayList; @@ -10,6 +13,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import javax.swing.JEditorPane; +import javax.swing.event.HyperlinkEvent; import javax.swing.text.DefaultCaret; import MEPTL.commandes; @@ -27,7 +31,28 @@ public class afficheText extends JEditorPane { */ private static final long serialVersionUID = 1L; + public afficheText() { + + // Appel du constructeur de la classe parente + super(); + // Ajout d'un gestionnaire d'événements pour détecter les clics sur les liens + this.addHyperlinkListener(e -> { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + // Ouvrir le lien dans le navigateur par défaut + try { + Desktop.getDesktop().browse(e.getURL().toURI()); + } catch (IOException e1) { + + e1.printStackTrace(); + } catch (URISyntaxException e1) { + e1.printStackTrace(); + } + } + }); + } + + /** * Raffraichie l'affichage de la fenête create lorsque selection d'un node. diff --git a/src/fenetres/allContent.java b/src/fenetres/allContent.java index d8ecbc5..c6dd7fe 100644 --- a/src/fenetres/allContent.java +++ b/src/fenetres/allContent.java @@ -1,6 +1,7 @@ package fenetres; +import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -8,6 +9,7 @@ import java.awt.event.ActionListener; import javax.swing.DefaultComboBoxModel; import javax.swing.ImageIcon; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; @@ -23,7 +25,6 @@ import javax.swing.tree.TreePath; import MEPTL.commandes; import cXML.node; import list.listeDesNodesAllContent; -import java.awt.Color; public class allContent extends JFrame { @@ -34,21 +35,24 @@ public class allContent extends JFrame { private JPanel contentPane; private JTextField textFieldPoint; private JLabel lblExplication; - - node nod; - afficheText J; - JComboBox comboBoxValeur; + private JButton btnAdd = new JButton("Ajouter"); + private JButton btnRemove = new JButton("Supprimer"); + private JCheckBox chckbxPlaceMethodeChildren = new JCheckBox("Place la méthode sur tous
les nodes enfants"); + + private node nod; + private afficheText J; + private JComboBox comboBoxValeur; String valeur="strict"; int point=0; /** - * 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 contenus des nodes enfants. + * La méthode allContent permet d'évaluer tous les contenus textuel d'un node
+ * avec les contenus des nodes enfants. + * @param nod : Le node + * @param J : Affichage du texte dans la fenêtre. */ - public allContent(node nod, afficheText J,boolean Childs) { + public allContent(node nod, afficheText J) { this.nod=nod; this.J=J; @@ -65,7 +69,7 @@ public class allContent extends JFrame { setResizable(false); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - setBounds(100, 100, 589, 366); + setBounds(100, 100, 700, 354); ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") ); int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); @@ -81,40 +85,39 @@ public class allContent extends JFrame { setContentPane(contentPane); contentPane.setLayout(null); - JButton btnNewButton = new JButton("Valider"); - btnNewButton.setIcon(new ImageIcon(allContent.class.getResource("/resources/truemini.png"))); - btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 18)); - btnNewButton.setBounds(347, 266, 216, 50); - contentPane.add(btnNewButton); + btnAdd.setIcon(new ImageIcon(allContent.class.getResource("/resources/true.png"))); + btnAdd.setFont(new Font("Tahoma", Font.BOLD, 18)); + btnAdd.setBounds(458, 261, 216, 50); + contentPane.add(btnAdd); JLabel lblValeurDeLattribut = new JLabel("Algorithme d'évaluation"); lblValeurDeLattribut.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 13)); - lblValeurDeLattribut.setBounds(10, 124, 165, 23); + lblValeurDeLattribut.setBounds(26, 124, 165, 23); contentPane.add(lblValeurDeLattribut); JLabel lblDescription = new JLabel("Cet attribut permet d'évaluer le contenu du node et de celui des nodes enfants.
Par conséquent, tous les nodes enfants seront évalués."); lblDescription.setLabelFor(this); - lblDescription.setFont(new Font("Tahoma", Font.PLAIN, 12)); - lblDescription.setBounds(10, 11, 520, 50); + lblDescription.setFont(new Font("Tahoma", Font.BOLD, 13)); + lblDescription.setBounds(10, 11, 633, 50); contentPane.add(lblDescription); comboBoxValeur = new JComboBox(); comboBoxValeur.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14)); comboBoxValeur.setModel(new DefaultComboBoxModel(new String[] {"strict", "strictSansEspace", "SansCasseEspaceChiffre", "environ"})); comboBoxValeur.setSelectedItem(valeur); - comboBoxValeur.setBounds(185, 119, 224, 30); + comboBoxValeur.setBounds(201, 119, 216, 30); contentPane.add(comboBoxValeur); JLabel lblPoint = new JLabel("Combien de point ?"); lblPoint.setFont(new Font("Tahoma", Font.BOLD, 13)); - lblPoint.setBounds(10, 72, 171, 22); + lblPoint.setBounds(26, 72, 171, 22); contentPane.add(lblPoint); textFieldPoint = new JTextField(); textFieldPoint.setFont(new Font("Tahoma", Font.BOLD, 14)); textFieldPoint.setHorizontalAlignment(SwingConstants.CENTER); textFieldPoint.setText("0"); - textFieldPoint.setBounds(181, 72, 72, 23); + textFieldPoint.setBounds(201, 72, 72, 23); textFieldPoint.setColumns(6); textFieldPoint.setText(String.valueOf(point)); contentPane.add(textFieldPoint); @@ -138,18 +141,99 @@ public class allContent extends JFrame { lblExplication.setText("Dans le fichier de l'étudiants.
Le contenu du node peut être plus ou moins proche (voir le paramètre similude), la CASSE est ignorée."); } - lblExplication.setBounds(10, 175, 553, 80); + lblExplication.setBounds(26, 170, 633, 80); contentPane.add(lblExplication); - JLabel lblNewLabel = new JLabel("Pour supprimer l'évaluation,
saisissez 0 point."); - lblNewLabel.setVerticalAlignment(SwingConstants.TOP); - lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT); - lblNewLabel.setFont(new Font("Tahoma", Font.ITALIC, 13)); - lblNewLabel.setIcon(new ImageIcon(allContent.class.getResource("/resources/falsemini.png"))); - lblNewLabel.setBounds(347, 69, 216, 39); - contentPane.add(lblNewLabel); + btnRemove.setIcon(new ImageIcon(allContent.class.getResource("/resources/false.png"))); + btnRemove.setFont(new Font("Tahoma", Font.BOLD, 18)); + btnRemove.setBounds(232, 261, 216, 50); + contentPane.add(btnRemove); + if(nod.isHasEnfant()) { + boolean EnableChckBox = false; + for(int i = 0 ; i < nod.getNodes().size();i++) { + if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ + EnableChckBox=true; + } + } + chckbxPlaceMethodeChildren.setEnabled(EnableChckBox); + }else { + chckbxPlaceMethodeChildren.setEnabled(false); + } + chckbxPlaceMethodeChildren.setFont(new Font("Tahoma", Font.PLAIN, 12)); + chckbxPlaceMethodeChildren.setBounds(458, 68, 216, 30); + contentPane.add(chckbxPlaceMethodeChildren); + + Listener(); + setVisible(true); + } + + + private void placeAtrtibutAllContentDansLesNodesChildren(node nod,String methode, Integer point) { + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ + nod.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point)); + nod.getNodes().get(i).evaluerAllChildTrue(); } + } + } + + private void supprimeAttributAllConetnetDansLesNodesChildren(node nod) { + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ + nod.getNodes().get(i).supprimeAttribut("allContent"); } + } + } + + + private void Listener() { + + btnAdd.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + try { + int point = Integer.parseInt(textFieldPoint.getText()); + if(point<0) point =0; + + if(!chckbxPlaceMethodeChildren.isSelected()) { + nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem().toString() + String.valueOf(point)); + nod.evaluerAllChildTrue(); + }else { + placeAtrtibutAllContentDansLesNodesChildren(nod,comboBoxValeur.getSelectedItem().toString(),point); + } + J.refreshAffichage(nod); + TreePath path = fenetres.create.getTree().getSelectionPath(); + DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel(); + DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); + model.reload(root); + fenetres.create.getTree().setSelectionPath(path); + fenetres.create.getTree().expandPath(path); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + dispose(); + } catch (Exception e2) { + JOptionPane.showMessageDialog(null, "Le nombre de point doit être un entier."); + } + } + }); + + btnRemove.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + if(!chckbxPlaceMethodeChildren.isSelected()) { + nod.supprimeAttribut("allContent"); + }else { + supprimeAttributAllConetnetDansLesNodesChildren(nod); + } + J.refreshAffichage(nod); + TreePath path = fenetres.create.getTree().getSelectionPath(); + DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel(); + DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); + model.reload(root); + fenetres.create.getTree().setSelectionPath(path); + fenetres.create.getTree().expandPath(path); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + dispose(); + } + }); + comboBoxValeur.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(comboBoxValeur.getSelectedItem().equals("strict")) { @@ -167,68 +251,5 @@ public class allContent extends JFrame { } }); - btnNewButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - try { - int point = Integer.valueOf(textFieldPoint.getText()); - if(point<0) point =0; - if(!Childs) { - nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem().toString() + String.valueOf(point)); - nod.evaluerAllChildTrue(); - J.refreshAffichage(nod); - }else { - 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); - } - } - } - if(nod.getNomElt().equals("text:index-body")) { - for(int i = 0 ; i < nod.getNodes().size(); i++) { - placeAtrtibutAllContentDansLesNodesDeLaPage(nod,comboBoxValeur.getSelectedItem().toString(),point); - } - } - - J.refreshAffichage(nod); - } - - dispose(); - } catch (Exception e2) { - JOptionPane.showMessageDialog(null, "Le nombre de point doit être un entier."); - } - - TreePath path = fenetres.create.getTree().getSelectionPath(); - - DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel(); - DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); - model.reload(root); - - fenetres.create.getTree().setSelectionPath(path); - fenetres.create.getTree().expandPath(path); - - - fenetres.create.getTextNodeSelect().refreshAffichage(nod); - - } - - }); - - - setVisible(true); } - - - private void placeAtrtibutAllContentDansLesNodesDeLaPage(node nod,String methode, Integer point) { - for(int i = 0 ; i < nod.getNodes().size(); i++) { - if( listeDesNodesAllContent.isAllContent(nod.getNodes().get(i))){ - nod.getNodes().get(i).getAttributs().put("allContent", methode+String.valueOf(point)); - nod.getNodes().get(i).evaluerAllChildTrue(); } - } - } - - } diff --git a/src/fenetres/create.java b/src/fenetres/create.java index 0370b72..c1e3e4f 100644 --- a/src/fenetres/create.java +++ b/src/fenetres/create.java @@ -13,8 +13,6 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Enumeration; -import javax.swing.AbstractAction; -import javax.swing.Action; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; @@ -54,10 +52,12 @@ import action.actEvalAncrageNumeroAbsoluePageOui; import action.actEvalEnteteActive; import action.actEvalEntetePasActive; import action.actEvalFirstChildTrue; -import action.actEvalFormatageDirectOui; +import action.actEvalFormatageDirect; +import action.actEvalInitialCreator; import action.actEvalLastChildTrue; import action.actEvalNameNodeOui; import action.actEvalNamePageOui; +import action.actEvalNameSequenceOui; import action.actEvalNumeroAbsoluePageOui; import action.actEvalNumeroPageOui; import action.actEvalPasParagrapheVideOui; @@ -91,6 +91,7 @@ import action.actTotalPoint; import action.actTotalPointNode; import action.actTutoriels; import action.actUpNode; +import action.actevalNameCreator; import cXML.Run; import cXML.node; import list.listeDesNodesAllContent; @@ -124,10 +125,11 @@ public final class create extends JFrame { private JMenuBar menuBar = new JMenuBar(); private static JButton buttonEvaluate; private JPanel panelPrincipal; - private JPanel panelDroiteBoutons= new JPanel(); + private JPanel panelDroiteBoutons= new JPanel(); private static create instance; public static boolean isDispose = true; private static JLabel lblInfo = new JLabel("Fichier d'analyse"); + private final JLabel lblNewLabel_1 = new JLabel("Les méthodes d'évaluation"); private final JButton btnAttribut= new JButton(new actAttribut()); private final JButton btnAllContent = new JButton(new actAllContent()); @@ -135,7 +137,7 @@ public final class create extends JFrame { private final JButton btnanalyseStyletrue = new JButton(new actEvaluerStyleTrue()); private final JButton btnevalSautPageColonnetrue = new JButton(new actEvalSautPageColonneOui()); private final JButton btnevalNameNodetrue = new JButton(new actEvalNameNodeOui()); - private final JButton btnevalFormatageDirecttrue = new JButton(new actEvalFormatageDirectOui()); + private final JButton btnevalFormatageDirecttrue = new JButton(new actEvalFormatageDirect()); private final JButton btnevalPlacementtrue = new JButton(new actEvalPlacementParagrapheOui()); private final JButton btnevalFirstChildtrue = new JButton(new actEvalFirstChildTrue()); private final JButton btnevalLastChildtrue = new JButton(new actEvalLastChildTrue()); @@ -151,8 +153,10 @@ public final class create extends JFrame { private final JButton btnevalTABAlignementAGauchetrue = new JButton(new actEvalTabAlignementGaucheOui()); private final JButton btnevalTABStyleLeaderDefaulttrue = new JButton(new actEvalTabDefautStyleLeaderOui()); private final JButton btnEvaluerATraversAnalyseStyletrue = new JButton(new actEvaluerATraversAnalyseStyleTrue()); + private final JButton btnevalNameInitialCreator = new JButton(new actEvalInitialCreator()); + private final JButton btnevalNameCreator = new JButton(new actevalNameCreator()); + private final JButton btnevalNameSequence = new JButton(new actEvalNameSequenceOui()); - /** * Création de la fenêtre.
*/ @@ -198,6 +202,12 @@ public final class create extends JFrame { btnevalTABStyleLeaderDefaulttrue.setEnabled(false); btnEvaluerATraversAnalyseStyletrue.setIcon(new ImageIcon(create.class.getResource("/resources/atraversanalysestyle.png"))); btnEvaluerATraversAnalyseStyletrue.setEnabled(false); + btnevalNameInitialCreator.setIcon(new ImageIcon(create.class.getResource("/resources/auteurcreateur.png"))); + btnevalNameInitialCreator.setEnabled(false); + btnevalNameCreator.setIcon(new ImageIcon(create.class.getResource("/resources/auteurediteur.png"))); + btnevalNameCreator.setEnabled(false); + btnevalNameSequence.setIcon(new ImageIcon(create.class.getResource("/resources/evalnamesequence.png"))); + btnevalNameSequence.setEnabled(false); setBackground(new Color(255, 255, 255)); try { @@ -293,7 +303,6 @@ public final class create extends JFrame { JScrollPane rightScrollPane = new JScrollPane(); textNodeSelect.setBackground(Color.LIGHT_GRAY); -// rightScrollPane.setViewportView(textNodeSelect); textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15)); JScrollPane ScrollPaneTableBouton = new JScrollPane( ); @@ -301,8 +310,6 @@ public final class create extends JFrame { panelDroiteBoutons.setBorder(null); panelDroiteBoutons.setLayout(new MigLayout("", "[40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill][40px:n,fill]", "[20px][40px][40px][60px][60px][60px][60px][60px][60px][60px][60px][60px][60px]")); -// ScrollPaneTableBouton = new JScrollPane(panelDroiteBoutons); - rightScrollPane.setViewportView(panelDroiteBoutons); ScrollPaneTableBouton = new JScrollPane(textNodeSelect); lblNewLabel_1.setIcon(new ImageIcon(create.class.getResource("/resources/evaluermini.png"))); @@ -385,6 +392,15 @@ public final class create extends JFrame { btnevalPasParagrapheVidetrue.setText(""); panelDroiteBoutons.add(btnevalPasParagrapheVidetrue, "cell 3 4"); + + btnevalNameInitialCreator.setText(""); + panelDroiteBoutons.add(btnevalNameInitialCreator, "cell 4 4"); + + btnevalNameCreator.setText(""); + panelDroiteBoutons.add(btnevalNameCreator, "cell 5 4"); + + btnevalNameSequence.setText(""); + panelDroiteBoutons.add(btnevalNameSequence, "cell 0 5"); JSplitPane splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, rightScrollPane, ScrollPaneTableBouton ); splitPane2.setBounds(10, 10, 1364, 783); @@ -437,7 +453,9 @@ public final class create extends JFrame { selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); node nod = (node) selectNode.getUserObject(); //node sélectionné. new CreatePopupMenu(nod); // création du popup menu. + textNodeSelect.setEditable(true); textNodeSelect.refreshAffichage(nod); //affiche des informations sur le node. + textNodeSelect.setEditable(false); // refreshTree(); //repaint l'arbre. if(tree.isCollapsed(tree.getSelectionPath())){ tree.expandPath(tree.getSelectionPath()); //Etend le node sélectionné. @@ -458,7 +476,9 @@ public final class create extends JFrame { selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); node nod = (node) selectNode.getUserObject(); //node sélectionné. new CreatePopupMenu(nod); // création du popup menu. + textNodeSelect.setEditable(true); textNodeSelect.refreshAffichage(nod); //affiche des informations sur le node. + textNodeSelect.setEditable(false); btnevalNameLegacyStyleTrue.setEnabled(false); btnanalyseStyletrue.setEnabled(false); @@ -480,7 +500,10 @@ public final class create extends JFrame { btnEvalPiedPagePasActivetrue.setEnabled(false); btnevalTABAlignementAGauchetrue.setEnabled(false); btnevalTABStyleLeaderDefaulttrue.setEnabled(false); - btnEvaluerATraversAnalyseStyletrue.setEnabled(false); + btnEvaluerATraversAnalyseStyletrue.setEnabled(false); + btnevalNameInitialCreator.setEnabled(false); + btnevalNameCreator.setEnabled(false); + btnevalNameSequence.setEnabled(false); if(listeDesNodesAllContent.isAllContent(nod)) { btnAllContent.setEnabled(true); @@ -537,6 +560,15 @@ public final class create extends JFrame { if(nod.getNomElt().equals("style:style")) { btnEvaluerATraversAnalyseStyletrue.setEnabled(true); } + if(nod.getNomElt().equals("meta:initial-creator")) { + btnevalNameInitialCreator.setEnabled(true); + } + if(nod.getNomElt().equals("dc:creator")) { + btnevalNameCreator.setEnabled(true); + } + if(nod.getNomElt().equals("text:sequence-decl")) { + btnevalNameSequence.setEnabled(true); + } } } }); @@ -792,72 +824,72 @@ public final class create extends JFrame { - /** - * Annule une action.
- */ - @SuppressWarnings("unused") - private AbstractAction actUndo = new AbstractAction() { +// /** +// * Annule une action.
+// */ +// @SuppressWarnings("unused") +// private AbstractAction actUndo = new AbstractAction() { +// +// private static final long serialVersionUID = 1L; +// +// { +// putValue( Action.NAME, "Annuler" ); +// putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/undo.png") ) ); +// putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U ); +// putValue( Action.SHORT_DESCRIPTION, "Annuler (CTRL+Z)" ); +// putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_DOWN_MASK ) ); +// } +// +// @Override public void actionPerformed( ActionEvent e ) { +// System.out.println( "Undo" ); +// } +// }; - private static final long serialVersionUID = 1L; - - { - putValue( Action.NAME, "Annuler" ); - putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/undo.png") ) ); - putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U ); - putValue( Action.SHORT_DESCRIPTION, "Annuler (CTRL+Z)" ); - putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_DOWN_MASK ) ); - } - - @Override public void actionPerformed( ActionEvent e ) { - System.out.println( "Undo" ); - } - }; - - /** - * - */ - @SuppressWarnings("unused") - private AbstractAction actRedo = new AbstractAction() { - - /** - * - */ - private static final long serialVersionUID = 1L; - - { - putValue( Action.NAME, "Refaire" ); - putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/redo.png") ) ); - putValue( Action.MNEMONIC_KEY, KeyEvent.VK_R ); - putValue( Action.SHORT_DESCRIPTION, "Refaire (CTRL+U)" ); - putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_DOWN_MASK ) ); - } - - @Override public void actionPerformed( ActionEvent e ) { - System.out.println( "Redo" ); - } - }; +// /** +// * +// */ +// @SuppressWarnings("unused") +// private AbstractAction actRedo = new AbstractAction() { +// +// /** +// * +// */ +// private static final long serialVersionUID = 1L; +// +// { +// putValue( Action.NAME, "Refaire" ); +// putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/redo.png") ) ); +// putValue( Action.MNEMONIC_KEY, KeyEvent.VK_R ); +// putValue( Action.SHORT_DESCRIPTION, "Refaire (CTRL+U)" ); +// putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyEvent.CTRL_DOWN_MASK ) ); +// } +// +// @Override public void actionPerformed( ActionEvent e ) { +// System.out.println( "Redo" ); +// } +// }; - /** - * - */ - @SuppressWarnings("unused") - private AbstractAction actCut = new AbstractAction() { +// /** +// * +// */ +// @SuppressWarnings("unused") +// private AbstractAction actCut = new AbstractAction() { +// +// private static final long serialVersionUID = 1L; +// +// { +// putValue( Action.NAME, "Couper" ); +// putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/cut.png") ) ); +// putValue( Action.MNEMONIC_KEY, KeyEvent.VK_T ); +// putValue( Action.SHORT_DESCRIPTION, "Couper (CTRL+X)" ); +// putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK ) ); +// } +// +// @Override public void actionPerformed( ActionEvent e ) { +// System.out.println( "Cut" ); +// } +// }; - private static final long serialVersionUID = 1L; - - { - putValue( Action.NAME, "Couper" ); - putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/cut.png") ) ); - putValue( Action.MNEMONIC_KEY, KeyEvent.VK_T ); - putValue( Action.SHORT_DESCRIPTION, "Couper (CTRL+X)" ); - putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK ) ); - } - - @Override public void actionPerformed( ActionEvent e ) { - System.out.println( "Cut" ); - } - }; - private final JLabel lblNewLabel_1 = new JLabel("Les méthodes d'évaluation d'un node"); /** diff --git a/src/list/descriptionNode.java b/src/list/descriptionNode.java index 13f2824..c6036bb 100644 --- a/src/list/descriptionNode.java +++ b/src/list/descriptionNode.java @@ -367,7 +367,7 @@ public class descriptionNode { return descriptionNode; } case "text:s": { - descriptionNode = descriptionNode + "

Ce node est celui d'un espace [UNICODE (U+0020,ESAPCE)].
Cet élément est utilisé pour représenter le deuxième caractère et tous les suivants dans une séquence de caractères.
Entre deux champs consécutifs, il y a toujours un node text:s, par exemple.

"; + descriptionNode = descriptionNode + "

Ce node est celui d'une espace blanc [UNICODE (U+0020,ESAPCE)].
Cet élément est utilisé pour représenter le deuxième caractère et tous les suivants dans une séquence de caractères.
Wikipédia

"; return descriptionNode; } case "style:background-image": { diff --git a/src/list/listeDesNodesEvalPlacement.java b/src/list/listeDesNodesEvalPlacement.java index baf835c..3733325 100644 --- a/src/list/listeDesNodesEvalPlacement.java +++ b/src/list/listeDesNodesEvalPlacement.java @@ -40,6 +40,7 @@ public class listeDesNodesEvalPlacement { case "text:sender-email": return true; case "text:hidden-text": return true; case "text:hidden-paragraph": return true; + case "text:index-title": return true; default: return false;