MAJ V4.4.0 ajout méthodes evalLastChild et evalFirstChild

This commit is contained in:
pablo rodriguez 2022-12-14 10:33:48 +01:00
parent 64faf9682c
commit f34d804cf1
47 changed files with 487 additions and 51 deletions

View File

@ -12,6 +12,6 @@
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/Exportation documentation analyseWriter/plugins/documentation.analyseWriter_1.0.0.202212032022.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

Binary file not shown.

2
bin/.gitignore vendored
View File

@ -1,3 +1,5 @@
/fenetres/
/list/
/evaluer/
/MEPTL/
/resources/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
icons/information.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

72
icons/information.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

BIN
icons/informationmaxi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
icons/informationmini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -120,8 +120,8 @@ public class HTML {
}
//Saut pour les informatons nodes
public static String SautP11bis(String titre) {
return "<br><div id=\"grad2\"><p>" + titre+"</p></div>\r";
public static String SautInformation(String titre) {
return "<br><div id=\"grad2\"><p class=\"pablo\">" + titre+"</p></div>\r"; //style=\"font-size:12px\"
}
/**
@ -399,7 +399,7 @@ public static String TablePointsSyntheseStyle2(String titre,double prop, String
code = code + HTML.SautLigne()+ HTML.SautP11(nodeAna.getAttributs().get("marquenode") + HTML.SautLigne());
}
if(nodeAna.getAttributs().get("information")!=null) if(!nodeAna.getAttributs().get("information").isEmpty()){
code = code + HTML.SautLigne()+ HTML.SautP11bis(nodeAna.getAttributs().get("marquenode") + HTML.SautLigne());
code = code + HTML.SautLigne()+ HTML.SautInformation(nodeAna.getAttributs().get("information") + HTML.SautLigne());
}
if(nodeAna.getAttributs().get("titre")!=null) if(!nodeAna.getAttributs().get("titre").isEmpty()){
if(nodeAna.getAttributs().get("proportioncorrect")!=null)if(!nodeAna.getAttributs().get("proportioncorrect").equals("NaN"))if(nodeAna.getAttributs().get("id")!=null) code = code + HTML.SautLigne()+ HTML.H1(nodeAna.getAttributs().get("titre"),nodeAna.getAttributs().get("id")) + HTML.SautLigne(); ;
@ -5852,7 +5852,7 @@ public static String TablePointsSyntheseStyle2(String titre,double prop, String
// Date aujourdhui = new Date();
// DateFormat mediumDateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
return "\r<style type=\"text/css\">\r"
+ "p.pablo { margin-bottom: 0.25cm; line-height: 100%; background: transparent; margin-left: 1cm; }"
+ "p.pablo {margin-bottom: 0.25cm; line-height: 100%; background: transparent; margin-left: 1cm; }"
+ ".header {background-color: #f1f1f1;padding: 30px;text-align:center;}"
+ "h1 { margin-bottom: 0.25cm; background: transparent;}"
+ "h2 {color: blue;font-size:22pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 110%; background: transparent; margin-left: 20pt; margin-right: 10px; text-decoration: underline overline;}"
@ -5890,7 +5890,7 @@ public static String TablePointsSyntheseStyle2(String titre,double prop, String
+ "#navbar2 {overflow: hidden; background-color: #333;}"
+ "#navbar2 a {float: left; font-size: 18px; color: white; text-align: center; padding: 16px 18px; text-decoration: none;}"
+ "#grad1 {height: 40px;background-color: red; background-image: linear-gradient(red, yellow);}"
+ "#grad2 {height: 40px;width:100px;background-color: white; background-image: linear-gradient(cyan, white,yellow,cyan);}"
+ "#grad2 {height: 40px;width:auto;background-color: white; background-image: linear-gradient(cyan, transparent,transparent,cyan);margin-left: 1cm;margin-right: 1cm;padding: 8px;;}"
+ ".dropdown {position: relative; display: inline-block;}"
+ ".dropbtn:hover, .dropbtn:focus { background-color: #3e8e41;}"
+ ".dropdown-content {display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);}"

View File

@ -481,9 +481,6 @@ public class feedbacks {
if(commandes.fourniDossierDestination) System.out.println("\n\t The feedback file has been written.\n\t " + commandes.path + "\\" + commandes.pathDestination + "\\" + cheminFeedBack);
}
}

View File

@ -1957,6 +1957,14 @@ public class meptl {
}
}
}
if(nodSujet.getAttributs().get("information")!=null) {
node N = new node();
N.setNomElt("saut");
N.getAttributs().put("information", nodSujet.getAttributs().get("information"));
N.setParent(nodanalyse);
N.setClose(true);
nodanalyse.getNodes().add(N);
}
return nodanalyse;
}

View File

@ -416,9 +416,32 @@ public class evaluationAttribut {
}
}
//evaluation du dernier enfant
if(k.equals("evalFirstChild") && listeDesNodesEvalPlacement.isPlacement(sujet)) {
if(nodeStudent!=null) {
String ReponseSujet = "true";
retour = evaluDernierEnfant(retour,nodeStudent, ReponseSujet, sujet.getAttributs().get("evalFirstChild"),"FirstChild");
}else {
retour = evaluDernierEnfant(retour,null, "true", sujet.getAttributs().get("evalFirstChild"),"FirstChild");
}
}
//evaluation du premier enfant
if(k.equals("evalLastChild") && listeDesNodesEvalPlacement.isPlacement(sujet)) {
if(nodeStudent!=null) {
String ReponseSujet = "true";
retour = evaluPremierEnfant(retour,nodeStudent, ReponseSujet, sujet.getAttributs().get("evalLastChild"),"LastChild");
}else {
retour = evaluPremierEnfant(retour,null, "true", sujet.getAttributs().get("evalLastChild"),"LastChild");
}
}
}
}
//avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1"
@ -754,7 +777,7 @@ public class evaluationAttribut {
private static node evaluPlacement(node retour, node nodStudent, String contenuParagraph, String point, String nameElt) {
node item = null;
if(nodStudent!=null) {
//compare la même valeur "contenuParagraph" pour obtenir les points mais si un vosinage du contenu.
//compare la même valeur "contenuParagraph" pour obtenir les points mais si un voisinage du contenu.
item = retourneNoteAvecResultatsAnalyse("Placement","avant", contenuParagraph,contenuParagraph + "" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
@ -764,6 +787,49 @@ public class evaluationAttribut {
return retour;
}
/**
*
* @param retour
* @param nodStudent
* @param contenuParagraph
* @param point
* @param nameElt
* @return
*/
private static node evaluDernierEnfant(node retour, node nodStudent, String reponseSujet, String point, String nameElt) {
node item = null;
if(nodStudent!=null) {
item = retourneNoteAvecResultatsAnalyse("LastChild","", String.valueOf(nodStudent.isLastChildNode()),reponseSujet + "" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
item = new node("LastChild", "Erreur : -"+ point, "" , "null", reponseSujet, 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
/**
*
* @param retour
* @param nodStudent
* @param reponseSujet
* @param point
* @param nameElt
* @return
*/
private static node evaluPremierEnfant(node retour, node nodStudent, String reponseSujet, String point, String nameElt) {
node item = null;
if(nodStudent!=null) {
item = retourneNoteAvecResultatsAnalyse("FirstChild","", String.valueOf(nodStudent.isFirstChildNode()),reponseSujet + "" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
item = new node("FirstChild", "Erreur : -"+ point, "" , "null", reponseSujet, 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
/**
* Retourne le node avec les résultats de la comparaison entre les deux valeurs (étudiant et sujet).<br>
* <br>

View File

@ -62,6 +62,9 @@ public class afficheText extends JEditorPane {
String imageEvalPlacement= "<img src="+afficheText.class.getResource("/resources/ordreparagraphemini.png").toString()+">";
String imageMarqueNode= "<img src="+afficheText.class.getResource("/resources/marquenodemini.png").toString()+">";
String imageEvalNameLegacyStyle= "<img src="+afficheText.class.getResource("/resources/heritagestylemini.png").toString()+">";
String imageInformation= "<img src="+afficheText.class.getResource("/resources/informationmini.png").toString()+">";
String imageDernierEnfant= "<img src="+afficheText.class.getResource("/resources/dernierenfantmini.png").toString()+">";
String imagePremierEnfant= "<img src="+afficheText.class.getResource("/resources/premierenfantmini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -143,6 +146,10 @@ public class afficheText extends JEditorPane {
if(nod.getAttributs().get(Lesattributsdunode.get(i)).length()>0) {
sb.append("<li class=\"p4\">"+imageMarqueNode + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
}if(Lesattributsdunode.get(i).equals("information")) {
if(nod.getAttributs().get(Lesattributsdunode.get(i)).length()>0) {
sb.append("<li class=\"p4\">"+imageInformation + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
}
if(Lesattributsdunode.get(i).equals("titre")||Lesattributsdunode.get(i).equals("titre1")||Lesattributsdunode.get(i).equals("titre2")||Lesattributsdunode.get(i).equals("titre3")) {
if(nod.getAttributs().get(Lesattributsdunode.get(i)).length()>0) {
@ -215,6 +222,12 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalPlacement") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalPlacement+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalLastChild") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageDernierEnfant+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalFirstChild") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imagePremierEnfant+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalNameLegacyStyle") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalNameLegacyStyle+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}

View File

@ -20,7 +20,11 @@ import fenetres.create_act.actEvalEnteteActive;
import fenetres.create_act.actEvalEnteteActiveNon;
import fenetres.create_act.actEvalEntetePasActive;
import fenetres.create_act.actEvalEntetePasActiveNon;
import fenetres.create_act.actEvalFirstChildFalse;
import fenetres.create_act.actEvalFirstChildTrue;
import fenetres.create_act.actEvalInitialCreator;
import fenetres.create_act.actEvalLastChildFalse;
import fenetres.create_act.actEvalLastChildTrue;
import fenetres.create_act.actEvalNameNodeNon;
import fenetres.create_act.actEvalNameNodeOui;
import fenetres.create_act.actEvalNamePageNon;
@ -51,6 +55,8 @@ import fenetres.create_act.actEvaluerTousLesStylesParagraphesFalse;
import fenetres.create_act.actEvaluerTousLesStylesParagraphesTrue;
import fenetres.create_act.actExpandAll;
import fenetres.create_act.actExpandNode;
import fenetres.create_act.actInsereInformationFalse;
import fenetres.create_act.actInsereInformationTrue;
import fenetres.create_act.actOu;
import fenetres.create_act.actPaste;
import fenetres.create_act.actRechercheAnchorPageNumberFalse;
@ -240,6 +246,15 @@ if(nod!=null) {
return mnTitre;
}
private JMenu mnInsereInformation() {
JMenu mnInsereInformation = new JMenu("Insère information contenu du node");
mnInsereInformation.setIcon( new ImageIcon(create.class.getResource("/resources/informationmini.png")));
mnInsereInformation.add(new actInsereInformationTrue());
mnInsereInformation.add(new actInsereInformationFalse());
return mnInsereInformation;
}
/**
* Menu Titre pour le niveau 1.</br>
* @return
@ -485,6 +500,8 @@ if(nod!=null) {
mnPourFeedback.setIcon(new ImageIcon(create.class.getResource("/resources/feedbackmini.png")));
mnPourFeedback.add(mnSaut());
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnInsereInformation());
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnTitre());
mnPourFeedback.addSeparator();
mnPourFeedback.add(mnAddMenuNiveauSup1());
@ -526,8 +543,7 @@ if(nod!=null) {
/**
* Menu respecter l'ordre des paragraphes.</br>
* Vérification le placement du node par rapport à la présence :</br>
* 1-du node précédent.</br>
* 2-du node suivant.</br>
* 1-du node précédent (avant).</br>
* @return
*/
private JMenu mnPlacementParagraphe() {
@ -538,6 +554,30 @@ if(nod!=null) {
return mnPlacementParagraphe;
}
/**
* Menu pour évaluer si le node est le dernier enfant.</br>
* @return
*/
private JMenu mnEvaluerDernierEnfant() {
JMenu mnEvaluerDernierEnfant = new JMenu("Le node est le dernier enfant");
mnEvaluerDernierEnfant.setIcon(new ImageIcon(create.class.getResource("/resources/dernierenfantmini.png")));
mnEvaluerDernierEnfant.add(new actEvalLastChildTrue());
mnEvaluerDernierEnfant.add(new actEvalLastChildFalse());
return mnEvaluerDernierEnfant;
}
/**
* Menu pour évaluer si le node est le dernier enfant.</br>
* @return
*/
private JMenu mnEvaluerPremierEnfant() {
JMenu mnEvaluerPremierEnfant = new JMenu("Le node est le premier enfant");
mnEvaluerPremierEnfant.setIcon(new ImageIcon(create.class.getResource("/resources/premierenfantmini.png")));
mnEvaluerPremierEnfant.add(new actEvalFirstChildTrue());
mnEvaluerPremierEnfant.add(new actEvalFirstChildFalse());
return mnEvaluerPremierEnfant;
}
/**
* Menu pour la représentation des nodes de niveau 1.</br>
* Permet de modifier le coefficient du node de niveua 1.</br>
@ -657,6 +697,10 @@ if(nod!=null) {
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnPlacementParagraphe());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvaluerPremierEnfant());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvaluerDernierEnfant());
}
if(listeDesNodesPourEvaluerPage.isPage(nod)) {

View File

@ -0,0 +1,33 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
import list.listeDesNodesEvalPlacement;
public class actEvalFirstChildFalse extends AbstractAction{
{
putValue( Action.NAME, "Supprimer évaluer le node est le premier enfant." );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du premier enfant." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
nod.getAttributs().put("evalFirstChild", "0");
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,57 @@
package fenetres.create_act;
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.create;
import list.listeDesNodesEvalPlacement;
public class actEvalFirstChildTrue extends AbstractAction{
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer si le node est le premier enfant.");
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
int point = 0;
if(nod.getAttributs().get("evalFirstChild")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalFirstChild"));
}
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalFirstChild=0.</h2>");
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
nod.getAttributs().put("evalFirstChild", "0");
}
}else {
nod.getAttributs().put("evalFirstChild", String.valueOf(point));
}
} catch (Exception e2) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,33 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
import list.listeDesNodesEvalPlacement;
public class actEvalLastChildFalse extends AbstractAction{
{
putValue( Action.NAME, "Supprimer évaluer le node est le dernier enfant." );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du dernier enfant." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
nod.getAttributs().put("evalLastChild", "0");
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,56 @@
package fenetres.create_act;
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.create;
import list.listeDesNodesEvalPlacement;
public class actEvalLastChildTrue extends AbstractAction{
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer si le node est le dernier enfant.");
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
int point = 0;
if(nod.getAttributs().get("evalLastChild")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalLastChild"));
}
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalLastChild=0.</h2>");
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
nod.getAttributs().put("evalLastChild", "0");
}
}else {
nod.getAttributs().put("evalLastChild", String.valueOf(point));
}
} catch (Exception e2) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -66,11 +66,6 @@ public class actEvalPlacementParagrapheOui extends AbstractAction{
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);

View File

@ -0,0 +1,30 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
public class actInsereInformationFalse extends AbstractAction{
{
putValue( Action.NAME, "false" );
putValue( Action.SHORT_DESCRIPTION, "false" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
nod.getAttributs().remove("information");
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,34 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
public class actInsereInformationTrue extends AbstractAction{
{
putValue( Action.NAME, "true" );
putValue( Action.SHORT_DESCRIPTION, "true" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
String content = nod.retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.toString() + " : " + content;
nod.getAttributs().put("information", content);
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -5,8 +5,6 @@ import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.tree.TreeNode;
import cXML.node;
import fenetres.create;
@ -25,19 +23,8 @@ public class actsautfalse extends AbstractAction{
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
TreeNode[] chemin = fenetres.create.getSelectNode().getPath();
boolean avertissement=false;
for(int i = 0 ; i < chemin.length; i++) {
if(chemin[i].toString().contains("setting")) avertissement = true;
System.out.println(chemin[i].toString());
}
if(!avertissement) {
nod.saut(false);
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}else {
JOptionPane.showMessageDialog(null, "Ce node ne peut pas être évaluer." );
}
nod.getAttributs().put("saut", "false");
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -25,7 +25,7 @@ public class actsautmultiplefalse extends AbstractAction{
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
boolean informations = false;
if(JOptionPane.showConfirmDialog(null,"Voulez-vous retirer les informations sur le node (nature du node)?", "Information", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
if(JOptionPane.showConfirmDialog(null,"Voulez-vous retirer les informations sur le node (contenu du node)?", "Information", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
informations=true;
}
for(int i = 0 ; i < nod.getNodes().size();i++) {

View File

@ -30,8 +30,26 @@ public class actsautmultipletrue extends AbstractAction{
}
for(int i = 0 ; i < nod.getNodes().size();i++) {
nod.getNodes().get(i).getAttributs().put("saut", "true");
if(informations) nod.getNodes().get(i).getAttributs().put("information", nod.getNodes().get(i).retourneLesContenusEnfants(""));
if(informations) {
String content = nod.getNodes().get(i).retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.getNodes().get(i).toString() + " : " + content;
nod.getNodes().get(i).getAttributs().put("information", content);
}
}
//Pour le node page
if(informations) {
String content = nod.retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.toString() + " : " + content;
nod.getAttributs().put("information", content);
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}

View File

@ -5,8 +5,6 @@ import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.tree.TreeNode;
import cXML.node;
import fenetres.create;
@ -25,19 +23,8 @@ public class actsauttrue extends AbstractAction{
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
TreeNode[] chemin = fenetres.create.getSelectNode().getPath();
boolean avertissement=false;
for(int i = 0 ; i < chemin.length; i++) {
if(chemin[i].toString().contains("setting")) avertissement = true;
System.out.println(chemin[i].toString());
}
if(!avertissement) {
nod.saut(true);
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}else {
JOptionPane.showMessageDialog(null, "Ce node ne peut pas être évaluer." );
}
nod.getAttributs().put("saut", "true");
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -21,6 +21,7 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("titre2")) return true;
if(attribut.equals("titre3")) return true;
if(attribut.equals("marquenode")) return true;
if(attribut.equals("information")) return true;
if(attribut.equals("poids")) return true;
if(attribut.equals("analyseStyle")) return true;
if(attribut.equals("evalNameLegacyStyle")) return true;
@ -50,6 +51,8 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("evalNumeroAbsoluePage")) return true;
if(attribut.equals("evalNumeroPage")) return true;
if(attribut.equals("evalPlacement")) return true;
if(attribut.equals("evalLastChild")) return true;
if(attribut.equals("evalFirstChild")) return true;
//Les attribut placer dans le node fichier du fichier d'analyse

View File

@ -10,7 +10,8 @@ public class listeDesNodesEvalPlacement {
if(nod.getNomElt().equals("text:h")) return true;
if(nod.getNomElt().equals("text:list")) return true;
if(nod.getNomElt().equals("text:title")) return true;
if(nod.getNomElt().equals("text:span")) return true;
if(nod.getNomElt().equals("text:list-item")) return true;
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B