MAJ V4.3.2 (ajoute à la méthode analyseStyle les styles des titres)

(améliore les changements des codes évaluateurs des nodes style:style)
This commit is contained in:
pablo rodriguez 2022-12-06 09:19:20 +01:00
parent f992e4f30e
commit 7b5a0848fb
15 changed files with 56 additions and 16 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -88,16 +88,16 @@ public class rechercherUnNodeStudent {
nodStudent = findDrawFrame(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
}
//*************************************************
//** Recherche le nodes text:date par text:fixed **
//*************************************************
//************************************************
//** Recherche le node text:date par text:fixed **
//************************************************
if(nameNode.equals("text:date")) {
nodStudent = findTextDate(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
}
//***********************************************
//** Recherche le nodes text:xxx par text:name **
//***********************************************
//**********************************************
//** Recherche le node text:xxx par text:name **
//**********************************************
if(nameNode.equals("text:section") || nameNode.equals("text:user-defined") || nameNode.equals("text:table-of-content")) {
nodStudent = findByTextName(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a);
}
@ -332,9 +332,25 @@ public class rechercherUnNodeStudent {
}
if(nameNodeEnfantSujet.equals("text:note")) {
node nodeTexteNoteSujet = nodSujet.retourneFirstEnfantsByName("text:note");
node nodeTexteNoteStudent = null;
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:note");
if(nodStudent!=null) {
nodeTexteNoteStudent = nodStudent.retourneFirstEnfantsByName("text:note");
if(nodeTexteNoteSujet.retourneLesContenusEnfants("").equals(nodeTexteNoteStudent.retourneLesContenusEnfants(""))) return nodStudent;
}
if(nod1Student!=null) if(nodStudent==null) nodStudent = nod1Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:note");
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:note");
if(nodStudent!=null) {
nodeTexteNoteStudent = nodStudent.retourneFirstEnfantsByName("text:note");
if(nodeTexteNoteSujet.retourneLesContenusEnfants("").equals(nodeTexteNoteStudent.retourneLesContenusEnfants(""))) return nodStudent;
}
if(nod0Student!=null) if(nodStudent==null) nodStudent = nod0Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:note");
if(nod2Student!=null) if(nodStudent==null) nodStudent = nod2Student.retourneFirstEnfantsByNameNode1ContainNameNode2(nameNodeSujet,"text:note");
if(nodStudent!=null) {
nodeTexteNoteStudent = nodStudent.retourneFirstEnfantsByName("text:note");
if(nodeTexteNoteSujet.retourneLesContenusEnfants("").equals(nodeTexteNoteStudent.retourneLesContenusEnfants(""))) return nodStudent;
}
}

View File

@ -309,6 +309,7 @@ public class attributs extends JFrame {
codeEvaluateur = "";
}
}
// Style de node formatage directe commence par P1, P2, P3, etc.. ou T1, T2, T3, etc..
if(listeNodeFormatageDirectDeWriter.isFormatageDirect(nod)) codeEvaluateur = "";
}
}

View File

@ -442,7 +442,7 @@ public final class create extends JFrame {
mnPourFeedback.add(mnAddMenuNiveauSup1);
//Menu Evaluer tous les styles dans une page
JMenu mnEvaluerStylesParagraphes = new JMenu("Evaluer tous les styles des paragraphes.");
JMenu mnEvaluerStylesParagraphes = new JMenu("Evaluer tous les styles (paragraphes ou titres).");
mnEvaluerStylesParagraphes.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesstylesparagraphesmini.png")));
mnEvaluerStylesParagraphes.add( new actEvaluerTousLesStylesParagraphesTrue());

View File

@ -31,16 +31,28 @@ public class actEvalueTrue extends AbstractAction{
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
nod.evaluerTrue();
if(nod.getLevel()==1) {
nod.addMenu(true);
//Ajoute addmenu au node de niveau 1.
if(nod.getLevel()==1) nod.addMenu(true);
//Change les évaluateurs
if(nod.getNomElt().equals("style:style")) {
// Change les évaluateurs en
if(nod.getAttributs().get("EvaluerATraversAnalyseStyle")!=null) {
nod.changeLesCodesEvaluateursVersCodeEvaluateurDirect();
}else {
// Change les évaluateurs en
if(nod.getAttributs().get("EvaluerATraversAnalyseStyle").equals("true")) {
nod.changeLesCodesEvaluateursVersCodeATraversAnalyseStyle();
}else {
// Change les évaluateurs en
nod.changeLesCodesEvaluateursVersCodeEvaluateurDirect();
}
}
}
TreePath path = fenetres.create.getTree().getSelectionPath();
// fenetres.create.getTextNodeSelect().refreshAffichage(nod);
// fenetres.create.getTree().repaint();
DefaultTreeModel model = (DefaultTreeModel) fenetres.create.getTree().getModel();
DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();
model.reload(root);

View File

@ -4,6 +4,9 @@ import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import MEPTL.commandes;
import cXML.node;
@ -15,16 +18,17 @@ public class actEvaluerTousLesStylesParagraphesTrue extends AbstractAction{
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Evaluer tous les styles de paragraphe." );
putValue( Action.SHORT_DESCRIPTION, "Evaluer tous les style:name des paragraphes text:p" );
putValue( Action.NAME, "Evaluer tous les styles." );
putValue( Action.SHORT_DESCRIPTION, "Evaluer tous les style:name des paragraphes text:p ou text:h" );
}
@Override
public void actionPerformed(ActionEvent e) {
TreePath path = fenetres.create.getTree().getSelectionPath();
node nod = (node) fenetres.create.getSelectNode().getUserObject();
for(int i =0 ; i < nod.getNodes().size(); i++) {
if(nod.getNodes().get(i).getNomElt().equals("text:p")) {
if(nod.getNodes().get(i).getNomElt().equals("text:p")||nod.getNodes().get(i).getNomElt().equals("text:h")) {
nod.getNodes().get(i).getAttributs().put("analyseStyle", "true");
nod.getNodes().get(i).getAttributs().put("evaluer", "true");
@ -40,6 +44,13 @@ public class actEvaluerTousLesStylesParagraphesTrue extends AbstractAction{
}
}
}
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.getTree().repaint();
}