MAJ V4.3.2 (début du développement de la méthode evalPlacement)

This commit is contained in:
pablo rodriguez 2022-12-10 10:00:28 +01:00
parent 10087d0e56
commit ddeb694da3
56 changed files with 542 additions and 87 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" sourcepath="/cXML"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

Binary file not shown.

55
bin/.gitignore vendored
View File

@ -1,14 +1,53 @@
/MEPTL/
/calcul/
/evaluer/
/fenetres/
/list/
/resources/
/MEPTL/
/odreparagraphe.png
/odreparagraphemini.png
/ordreparagraphe.svg
/recherche.png
/recherche.svg
/recherchemini.png
/textclean.svg
/textcleanmini.png
/titre.svg
/titremini.png
/totalpoint.png
/totalpoint.svg
/totalpointmini.png
/totalpointnode.png
/totalpointnode.svg
/totalpointnodemini.png
/touslesnodes.png
/touslesnodes.svg
/touslesnodesmini.png
/toutext.png
/toutext.svg
/toutextmini.png
/traduction.png
/traduction.svg
/traductionmini.png
/treeClose.png
/treeClose.svg
/treeLeaf.png
/treeLeaf.svg
/treeOpen.png
/treeOpen.svg
/triche.png
/triche.svg
/trichemini.png
/tutoriel.png
/tutoriel.svg
/tutorielmini.png
/undo.png
/upnode.png
/upnode.svg
/upnodemini.png
/verifhistorique.png
/verifhistoriquemax.png
/verifhistoriquemini.png
/versevaluate.png
/versevaluate.svg
/versevaluatemini.png
/voir.svg
/voirmini.png
/what.svg
/whatmini.png
/zip.png
/zip.svg
/zipmini.png

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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
bin/odreparagraphe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
bin/odreparagraphemini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

102
bin/ordreparagraphe.svg Normal file
View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="ou.png"
sodipodi:docname="ordreparagraphe.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 11.90625 11.90625"
height="45"
width="45"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><defs
id="defs2"><pattern
id="EMFhbasepattern"
patternUnits="userSpaceOnUse"
width="6"
height="6"
x="0"
y="0" /></defs><sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
units="px"
inkscape:guide-bbox="true"
showguides="true"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="30.375004"
inkscape:cx="21.674367"
inkscape:zoom="9.7119329"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1"><sodipodi:guide
id="guide25"
orientation="0,-1"
position="94.049365,180.07197"
inkscape:locked="false" /><sodipodi:guide
position="8.9572181,11.534441"
orientation="0,-1"
id="guide4043"
inkscape:locked="false" /><sodipodi:guide
position="-4.2589037,4.1320607"
orientation="0,-1"
id="guide315"
inkscape:locked="false" /><sodipodi:guide
position="1.0787715,2.8911402"
orientation="0,-1"
id="guide373"
inkscape:locked="false" /><sodipodi:guide
position="11.558135,1.7718565"
orientation="1,0"
id="guide428"
inkscape:locked="false" /></sodipodi:namedview><metadata
id="metadata5"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"><rect
style="fill:#00ff00;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect390"
width="9.3716326"
height="10.570332"
x="1.2259402"
y="0.59934855"
ry="1.4711283" /><path
style="fill:none;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="M 2.0977201,2.8877704 2.751555,3.8140364 4.3044125,1.852532"
id="path1048" /><path
style="fill:none;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="M 2.1794495,5.557596 2.8332844,6.483862 4.3861419,4.5223576"
id="path1050" /><path
style="fill:none;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="M 2.1794495,8.1456922 2.8332844,9.0719582 4.3861419,7.1104538"
id="path1052" /><path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.1217062,2.6153393 9.3988757,2.5880962"
id="path1054" /><path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.2579218,5.2851649 9.5350913,5.2579218"
id="path1056" /><path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 5.1217062,8.1184492 9.3988757,8.0912061"
id="path1058" /></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
bin/recherche.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

129
bin/recherche.svg Normal file
View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="51.200001"
inkscape:export-xdpi="51.200001"
inkscape:export-filename="recherchemini.png"
sodipodi:docname="recherche.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 11.90625 11.90625"
height="45"
width="45"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2" />
<sodipodi:namedview
inkscape:snap-global="false"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:object-nodes="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox="true"
inkscape:snap-page="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="g6608"
inkscape:document-units="mm"
inkscape:cy="22.5"
inkscape:cx="-23.36097"
inkscape:zoom="8.711111"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<sodipodi:guide
position="3.0170348,10.40961"
orientation="1,0"
id="guide1351"
inkscape:locked="false" />
<sodipodi:guide
position="1.045272,5.5158378"
orientation="0,-1"
id="guide1429"
inkscape:locked="false" />
<sodipodi:guide
position="5.8677764,6.6798905"
orientation="1,0"
id="guide1157"
inkscape:locked="false" />
<sodipodi:guide
position="5.8440202,11.478639"
orientation="0,-1"
id="guide1159"
inkscape:locked="false" />
<sodipodi:guide
position="5.7965078,7.4400882"
orientation="0,-1"
id="guide1161"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 2"
id="layer2"
inkscape:groupmode="layer">
<g
transform="matrix(0.12313291,0,0,0.12313291,3.8933229,-12.453772)"
id="g862"
style="fill:#0000ff">
<g
id="g1030">
<g
id="g1565">
<g
id="g1977"
transform="matrix(0.10467317,0,0,0.10467317,20.10388,131.46341)">
<g
id="g2319">
<g
id="g6608"
transform="matrix(109.61277,0,0,109.15378,-963.55752,-727.21537)"
style="stroke-width:1.03047">
<path
id="path4945"
style="fill:#000000;stroke:none;stroke-width:0.272646px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 6.9115255,4.1117374 A 2.5406649,2.4821629 0 0 0 4.3705953,6.5942731 2.5406649,2.4821629 0 0 0 6.9115255,9.0762921 2.5406649,2.4821629 0 0 0 8.4871398,8.5409244 L 9.0535135,9.109882 9.4219665,8.6845849 8.8902159,8.1507674 A 2.5406649,2.4821629 0 0 0 9.4519387,6.5942731 2.5406649,2.4821629 0 0 0 6.9115255,4.1117374 Z m 0,0.5539713 A 1.9739749,1.9285217 0 0 1 8.8850483,6.5942731 1.9739749,1.9285217 0 0 1 6.9115255,8.5223207 1.9739749,1.9285217 0 0 1 4.9374857,6.5942731 1.9739749,1.9285217 0 0 1 6.9115255,4.6657087 Z" />
<path
style="fill:#ff0000;stroke:none;stroke-width:0.272646px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.7071636,8.4854359 2.9328084,2.9440821 c 0.0419,0.512292 -0.280235,0.819082 -0.875635,0.903687 L 8.8320954,9.3885382 C 9.117696,9.015001 9.3363405,8.7445068 9.7071636,8.4854359 Z"
id="path5444"
sodipodi:nodetypes="ccccc" />
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
bin/recherchemini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

BIN
bin/resources/GPLv3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
bin/resources/GPLv3mini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

BIN
bin/resources/recherche.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

View File

@ -7,6 +7,7 @@ import cXML.Run;
import cXML.node;
import list.listeDesNodesAnalyseStyle;
import list.listeDesNodesAvecEvalNameNode;
import list.listeDesNodesEvalPlacement;
import list.listeDesNodesRechercheByContenu;
import list.listeRechercheParAnchorPageNumber;
@ -305,9 +306,9 @@ public class ecritureSujet {
no.get(k).getAttributs().put("evaluer", "false");
if( listeDesNodesAvecEvalNameNode.isEvalNameNode(no.get(k))) no.get(k).getAttributs().put("evalNameNode", "0");
if(listeDesNodesSautEtTitre(no.get(k).getNomElt())) {no.get(k).getAttributs().put("saut", "false"); no.get(k).getAttributs().put("titre", "");}
if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");}
if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");no.get(k).getAttributs().put("allContent", "strict0");}
if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "false");
if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) no.get(k).getAttributs().put("analyseStyle", "false");
if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) no.get(k).getAttributs().put("allContent", "strict0");
if(listeRechercheParAnchorPageNumber.isRechercheParAnchorPageNumber(no.get(k))) no.get(k).getAttributs().put("recherche_anchor-page-number", "false");
if(!no.get(k).getNodes().isEmpty()) {

View File

@ -59,6 +59,7 @@ public class afficheText extends JEditorPane {
String imageEnteteActive= "<img src="+afficheText.class.getResource("/resources/enteteouimini.png").toString()+">";
String imagePiedPageActive= "<img src="+afficheText.class.getResource("/resources/piedpageouimini.png").toString()+">";
String imageOU= "<img src="+afficheText.class.getResource("/resources/oumini.png").toString()+">";
String imageEvalPlacement= "<img src="+afficheText.class.getResource("/resources/ordreparagraphemini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -204,6 +205,9 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalPiedPageActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imagePiedPageActive + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
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>");
}
// sb.append("<li class=\"p4\"><b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}

View File

@ -183,24 +183,27 @@ public final class create extends JFrame {
private void ListenerAction() {
/**
* Selection d'un node dans le JTree.
* Selection d'un node dans le JTree.</br>
*/
tree.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(tree.getSelectionPath()!=null) {
selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
new createPopupMenu(nod);
textNodeSelect.refreshAffichage(nod); //affiche des informations sur le node
refreshTree();
node nod = (node) selectNode.getUserObject(); //node sélectionné.
new createPopupMenu(nod); // création du popup menu.
textNodeSelect.refreshAffichage(nod); //affiche des informations sur le node.
// refreshTree(); //repaint l'arbre.
if(tree.isCollapsed(tree.getSelectionPath())){
tree.expandPath(tree.getSelectionPath()); //Etend le node sélectionné.
}
}
}
});
/**
* Fermeture de la fenêtre.
* Fermeture de la fenêtre.</br>
*/
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
@ -215,14 +218,16 @@ public final class create extends JFrame {
}
/**
*
* Reapint l'arbre.</br>
*/
private void refreshTree() {
tree.repaint();
}
/* Methode de construction de la barre de menu */
/**
* Methode de construction de la barre de menu.</br>
* */
private JMenuBar createMenuBar() {
// La barre de menu à proprement parler
@ -533,6 +538,9 @@ public final class create extends JFrame {
}
};
/**
* Ferme l'application.</br>
*/
public void closeWindows() {
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
dispose();

View File

@ -30,18 +30,19 @@ import fenetres.create_act.actEvalNumeroAbsoluePageNon;
import fenetres.create_act.actEvalNumeroAbsoluePageOui;
import fenetres.create_act.actEvalNumeroPageNon;
import fenetres.create_act.actEvalNumeroPageOui;
import fenetres.create_act.actEvalOrdreParagrapheNon;
import fenetres.create_act.actEvalOrdreParagrapheOui;
import fenetres.create_act.actEvalPiedPageActive;
import fenetres.create_act.actEvalPiedPageActiveNon;
import fenetres.create_act.actEvalPiedPagePasActive;
import fenetres.create_act.actEvalPiedPagePasActiveNon;
import fenetres.create_act.actEvalPlacementParagrapheNon;
import fenetres.create_act.actEvalPlacementParagrapheOui;
import fenetres.create_act.actEvalTextUserDefinedNon;
import fenetres.create_act.actEvalTextUserDefinedOui;
import fenetres.create_act.actEvalueFalse;
import fenetres.create_act.actEvalueTrue;
import fenetres.create_act.actEvaluerStyleFalse;
import fenetres.create_act.actEvaluerStyleTrue;
import fenetres.create_act.actEvaluerTousLesStylesParagraphesFalse;
import fenetres.create_act.actEvaluerTousLesStylesParagraphesTrue;
import fenetres.create_act.actExpandAll;
import fenetres.create_act.actExpandNode;
@ -68,6 +69,7 @@ import list.listeDesNodesAllContent;
import list.listeDesNodesAnalyseStyle;
import list.listeDesNodesAvecEvalNameNode;
import list.listeDesNodesAvecOU;
import list.listeDesNodesEvalPlacement;
import list.listeDesNodesPourEvaluationEntetePage;
import list.listeDesNodesPourEvaluerPage;
import list.listeDesNodesPourEvaluerPiedDePage;
@ -465,6 +467,7 @@ if(nod!=null) {
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());
mnEvaluerStylesParagraphes.add( new actEvaluerTousLesStylesParagraphesFalse());
return mnEvaluerStylesParagraphes;
}
@ -483,15 +486,17 @@ if(nod!=null) {
/**
* Menu respecter l'ordre des paragraphes.</br>
* Vérification de l'ordre par le node précédent.</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>
* @return
*/
private JMenu mnOrdreParagraphe() {
JMenu mnOrdreParagraphe = new JMenu("Ordre des paragraphes");
mnOrdreParagraphe.setIcon(new ImageIcon(create.class.getResource("/resources/ordreparagraphemini.png")));
mnOrdreParagraphe.add(new actEvalOrdreParagrapheOui());
mnOrdreParagraphe.add(new actEvalOrdreParagrapheNon());
return mnOrdreParagraphe;
private JMenu mnPlacementParagraphe() {
JMenu mnPlacementParagraphe = new JMenu("Placement des paragraphes");
mnPlacementParagraphe.setIcon(new ImageIcon(create.class.getResource("/resources/ordreparagraphemini.png")));
mnPlacementParagraphe.add(new actEvalPlacementParagrapheOui());
mnPlacementParagraphe.add(new actEvalPlacementParagrapheNon());
return mnPlacementParagraphe;
}
/**
@ -547,9 +552,9 @@ if(nod!=null) {
JMenu mnGroupeMethodeEvaluer = new JMenu("Evaluer le node");
mnGroupeMethodeEvaluer.setIcon( new ImageIcon(create.class.getResource("/resources/evaluatemini.png")));
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod)) {
if(listeDesNodesAllContent.isAllContent(nod) ) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnAnalyseStyle());
mnGroupeMethodeEvaluer.add(new actAllContent());
}
if(listeEvalNameNode.isNodeEvalNameNode(nod)) {
@ -557,11 +562,16 @@ if(nod!=null) {
mnGroupeMethodeEvaluer.add(mnEvalNameNode());
}
if(listeDesNodesAllContent.isAllContent(nod) ) {
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(new actAllContent());
mnGroupeMethodeEvaluer.add(mnAnalyseStyle());
}
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnPlacementParagraphe());
}
if(listeDesNodesPourEvaluerPage.isPage(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvalNamePage());
@ -571,8 +581,6 @@ if(nod!=null) {
mnGroupeMethodeEvaluer.add(mnEvalNumeroAbsoluePage());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvaluerStylesParagraphes());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnOrdreParagraphe());
}
if(listeDesNodesPourEvaluationEntetePage.isEntete(nod)) {

View File

@ -1,24 +0,0 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
public class actEvalOrdreParagrapheNon extends AbstractAction{
/**
*
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Supprimer évaluer l'ordre des paragraphes" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'ordre des paragraphes" );
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}

View File

@ -1,24 +0,0 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
public class actEvalOrdreParagrapheOui extends AbstractAction{
/**
*
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'ordre des paragraphes" );
}
@Override
public void actionPerformed(ActionEvent e) {
}
}

View File

@ -27,11 +27,11 @@ public class actEvalPiedPageActive extends AbstractAction{
point = Integer.valueOf(nod.getAttributs().get("evalPiedPageActive"));
}
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
String Nombre = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
if(!a.isEmpty()) {
if(!Nombre.isEmpty()) {
try {
point = Integer.valueOf(a);
point = Integer.valueOf(Nombre);
if(point<=0) {
nod.getAttributs().put("evalPiedPageActive", String.valueOf(0));
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());

View File

@ -0,0 +1,41 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import cXML.node;
import list.listeDesNodesEvalPlacement;
public class actEvalPlacementParagrapheNon extends AbstractAction{
/**
*
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Supprimer évaluer le placement du paragraphes" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du placement du paragraphes" );
}
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
if(nod.getNomElt().equals("page")) {
for(int i =0 ; i < nod.getNodes().size(); i++) {
if(listeDesNodesEvalPlacement.isPlacement(nod.getNodes().get(i))) {
nod.getNodes().get(i).getAttributs().put("evalPlacement", "0");
}
}
}else {
nod.getAttributs().put("evalPlacement", "0");
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,76 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JOptionPane;
import cXML.node;
import fenetres.baliseStyle;
import list.listeDesNodesEvalPlacement;
public class actEvalPlacementParagrapheOui extends AbstractAction{
/**
*
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer le placement du paragraphe" );
}
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
int point = 0;
if(nod.getAttributs().get("evalPlacement")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalPlacement"));
}
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>evalPlacement=0.</h2>");
if(nod.getNomElt().equals("page")) {
for(int i =0 ; i < nod.getNodes().size(); i++) {
if(listeDesNodesEvalPlacement.isPlacement(nod.getNodes().get(i))) {
nod.getNodes().get(i).getAttributs().put("evalPlacement", "0");
}
}
}else {
nod.getAttributs().put("evalPlacement", "0");
}
}else {
if(nod.getNomElt().equals("page")) {
for(int i =0 ; i < nod.getNodes().size(); i++) {
if(listeDesNodesEvalPlacement.isPlacement(nod.getNodes().get(i))) {
nod.getNodes().get(i).getAttributs().put("evalPlacement", String.valueOf(point));
}
}
}else {
nod.getAttributs().put("evalPlacement", 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,69 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JOptionPane;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import MEPTL.commandes;
import cXML.node;
public class actEvaluerTousLesStylesParagraphesFalse extends AbstractAction{
{
putValue( Action.NAME, "Supprime la méthode analyseStyle de tous les paragraphes ou les titres." );
putValue( Action.SHORT_DESCRIPTION, "Retire analyseStyle de tous les nodes text:p ou text:h" );
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
TreePath path = fenetres.create.getTree().getSelectionPath();
node nod = (node) fenetres.create.getSelectNode().getUserObject();
boolean retire =false;
if(JOptionPane.showConfirmDialog(null,"Voulez-vous aussi retirer de tous les styles du node \"style:paragraph\"\n"
+ "la méthode \"EvaluerATraversAnalyseStyle=true\"?", "Avertissement", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
retire=true;
}
for(int i =0 ; i < nod.getNodes().size(); i++) {
if(nod.getNodes().get(i).getNomElt().equals("text:p")||nod.getNodes().get(i).getNomElt().equals("text:h")) {
nod.getNodes().get(i).getAttributs().put("analyseStyle", "false");
//***************************************************************************************************************
//** 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 **
//***************************************************************************************************************
if(retire) {
node nodStyle = commandes.sujet.retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nod.getNodes().get(i).getAttributs().get("text:style-name"));
if(nodStyle!=null) {
nodStyle.getAttributs().put("EvaluerATraversAnalyseStyle", "false");
nodStyle.changeLesCodesEvaluateursVersCodeEvaluateurDirect();;
}
}
}
}
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();
}
}

View File

@ -18,7 +18,7 @@ public class actEvaluerTousLesStylesParagraphesTrue extends AbstractAction{
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Evaluer tous les styles." );
putValue( Action.NAME, "Evaluer à travers analyseStyle tous les paragraphes ou les titres." );
putValue( Action.SHORT_DESCRIPTION, "Evaluer tous les style:name des paragraphes text:p ou text:h" );
}
@Override

View File

@ -26,7 +26,7 @@ public class actTousLesNodesEvaluer extends AbstractAction{
try {
commandes.sujetSauvegarde = commandes.sujet.clone();
commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull();
commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull2();
commandes.fichierAnalyseValide=false;
fenetres.create.getTextNodeSelect().setContentType("text/html");

View File

@ -47,6 +47,8 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("evalTextUserDefined")) return true;
if(attribut.equals("evalNumeroAbsoluePage")) return true;
if(attribut.equals("evalNumeroPage")) return true;
if(attribut.equals("evalPlacement")) return true;
//Les attribut placer dans le node fichier du fichier d'analyse
if(attribut.equals("analysis_filename")) return true;

View File

@ -12,6 +12,8 @@ public class listeDesNodesAllContent {
public static boolean isAllContent(node nod) {
if(nod.retourneLesContenusEnfants("").length()<=0) return false;
if(nod.getNomElt().equals("OU")) return false;
if(nod.getNomElt().equals("text:conditional-text")) return false;
if(nod.getNomElt().contains("text:bookmark")) return false;
if(nod.getNomElt().equals("page")) return true;
if(nod.getNomElt().contains("text:")) return true;

View File

@ -10,8 +10,13 @@ public class listeDesNodesAnalyseStyle {
* @return
*/
public static Boolean isAnalyseStyle(node nod) {
if(nod.getAttributs().get("text:style-name")!=null) return true;
if(nod.getNomElt().contains("text:database-display")) return false;
if(nod.getNomElt().contains("text:bookmark")) return false;
if(nod.getNomElt().contains("text:")) return true;
return false;
}
}

View File

@ -0,0 +1,17 @@
package list;
import cXML.node;
public class listeDesNodesEvalPlacement {
public static boolean isPlacement(node nod) {
if(nod.getNomElt().equals("page")) return true;
if(nod.getNomElt().equals("text:p")) return true;
if(nod.getNomElt().equals("text:h")) return true;
if(nod.getNomElt().equals("text:list")) return true;
if(nod.getNomElt().equals("text:title")) return true;
return false;
}
}