MAJ V4.4.1 (ajout de la méthode evalAncrageNumeroAbsoluePage)

This commit is contained in:
pablo rodriguez 2022-12-22 13:24:04 +01:00
parent 512636efc6
commit de759a17da
25 changed files with 574 additions and 32 deletions

Binary file not shown.

Binary file not shown.

4
bin/.gitignore vendored
View File

@ -3,3 +3,7 @@
/evaluer/
/fenetres/
/list/
/informationmultiple.png
/informationmultiple.svg
/informationmultiplemini.png
/resources/

View File

@ -4,7 +4,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\evalnumeropage.png"
sodipodi:docname="evalnumeropage.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
@ -181,8 +181,8 @@
inkscape:document-rotation="0"
inkscape:current-layer="g14476"
inkscape:document-units="mm"
inkscape:cy="28.000973"
inkscape:cx="11.415031"
inkscape:cy="28.049755"
inkscape:cx="-1.3171189"
inkscape:zoom="10.249644"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
@ -200,35 +200,49 @@
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false">
inkscape:snap-global="false"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<sodipodi:guide
position="-0.85185887,10.144423"
orientation="0,-1"
id="guide1279" />
id="guide1279"
inkscape:locked="false" />
<sodipodi:guide
position="-0.36139467,8.905356"
orientation="0,-1"
id="guide1281" />
id="guide1281"
inkscape:locked="false" />
<sodipodi:guide
position="-4.6465029,7.7695441"
orientation="0,-1"
id="guide1283" />
id="guide1283"
inkscape:locked="false" />
<sodipodi:guide
position="-5.3692922,6.711174"
orientation="0,-1"
id="guide1285" />
id="guide1285"
inkscape:locked="false" />
<sodipodi:guide
position="-4.7755724,5.5753622"
orientation="0,-1"
id="guide1287" />
id="guide1287"
inkscape:locked="false" />
<sodipodi:guide
position="-4.1818526,4.4911782"
orientation="0,-1"
id="guide1289" />
id="guide1289"
inkscape:locked="false" />
<sodipodi:guide
position="-4.0011553,3.3037386"
orientation="0,-1"
id="guide1291" />
id="guide1291"
inkscape:locked="false" />
<sodipodi:guide
position="-8.5185885,12.080466"
orientation="1,0"
id="guide338"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
@ -314,6 +328,20 @@
style="fill:#ff0000;stroke-width:2.81646"
x="-90.369453"
y="60.364491">#</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -275.84992,-63.289154 0,80.787047"
id="path336"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -322.8383,-6.1336929 c 32.89424,34.4651799 64.37571,28.4306559 95.07591,0"
id="path436"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -318.44173,17.497891 -4.39657,-23.6315845 h 21.98287"
id="path438" />
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\evalnumeropage.png"
sodipodi:docname="evalnumeropage.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
@ -181,8 +181,8 @@
inkscape:document-rotation="0"
inkscape:current-layer="g14476"
inkscape:document-units="mm"
inkscape:cy="28.000973"
inkscape:cx="11.415031"
inkscape:cy="28.049755"
inkscape:cx="-1.3171189"
inkscape:zoom="10.249644"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
@ -200,35 +200,49 @@
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false">
inkscape:snap-global="false"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<sodipodi:guide
position="-0.85185887,10.144423"
orientation="0,-1"
id="guide1279" />
id="guide1279"
inkscape:locked="false" />
<sodipodi:guide
position="-0.36139467,8.905356"
orientation="0,-1"
id="guide1281" />
id="guide1281"
inkscape:locked="false" />
<sodipodi:guide
position="-4.6465029,7.7695441"
orientation="0,-1"
id="guide1283" />
id="guide1283"
inkscape:locked="false" />
<sodipodi:guide
position="-5.3692922,6.711174"
orientation="0,-1"
id="guide1285" />
id="guide1285"
inkscape:locked="false" />
<sodipodi:guide
position="-4.7755724,5.5753622"
orientation="0,-1"
id="guide1287" />
id="guide1287"
inkscape:locked="false" />
<sodipodi:guide
position="-4.1818526,4.4911782"
orientation="0,-1"
id="guide1289" />
id="guide1289"
inkscape:locked="false" />
<sodipodi:guide
position="-4.0011553,3.3037386"
orientation="0,-1"
id="guide1291" />
id="guide1291"
inkscape:locked="false" />
<sodipodi:guide
position="-8.5185885,12.080466"
orientation="1,0"
id="guide338"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
@ -314,6 +328,20 @@
style="fill:#ff0000;stroke-width:2.81646"
x="-90.369453"
y="60.364491">#</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -275.84992,-63.289154 0,80.787047"
id="path336"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -322.8383,-6.1336929 c 32.89424,34.4651799 64.37571,28.4306559 95.07591,0"
id="path436"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:10.64487845;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -318.44173,17.497891 -4.39657,-23.6315845 h 21.98287"
id="path438" />
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,333 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="48"
inkscape:export-xdpi="48"
inkscape:export-filename="evalnumeropageancragemini.png"
sodipodi:docname="evalnumeropageancrage.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
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">
<linearGradient
id="k"
gradientTransform="matrix(7.99974,0,0,7.9977797,-863.30581,-7811.3988)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="translate(10.661607,-2.6314354)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="translate(12)" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-930.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1552.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-269.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1511.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
id="k-5"
gradientTransform="matrix(7.3290847,0,0,7.3272888,-782.49722,-7149.5485)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="g612"
inkscape:document-units="mm"
inkscape:cy="28.049755"
inkscape:cx="-1.3171189"
inkscape:zoom="10.249644"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<sodipodi:guide
position="-0.85185887,10.144423"
orientation="0,-1"
id="guide1279"
inkscape:locked="false" />
<sodipodi:guide
position="-0.36139467,8.905356"
orientation="0,-1"
id="guide1281"
inkscape:locked="false" />
<sodipodi:guide
position="-4.6465029,7.7695441"
orientation="0,-1"
id="guide1283"
inkscape:locked="false" />
<sodipodi:guide
position="-5.3692922,6.711174"
orientation="0,-1"
id="guide1285"
inkscape:locked="false" />
<sodipodi:guide
position="-4.7755724,5.5753622"
orientation="0,-1"
id="guide1287"
inkscape:locked="false" />
<sodipodi:guide
position="-4.1818526,4.4911782"
orientation="0,-1"
id="guide1289"
inkscape:locked="false" />
<sodipodi:guide
position="-4.0011553,3.3037386"
orientation="0,-1"
id="guide1291"
inkscape:locked="false" />
<sodipodi:guide
position="5.0157813,3.1393182"
orientation="1,0"
id="guide338"
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"
transform="translate(-1.1301771,-2.0290664)">
<g
id="g941"
transform="translate(10.112644,5.4757388)">
<g
id="g14476"
transform="matrix(0.09394189,0,0,0.09394189,8.4128076,3.1183643)">
<g
id="g5418"
transform="translate(-0.00235905,280.45744)"
style="fill:#008080" />
<rect
style="fill:#000000;stroke:none;stroke-width:43.6219;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect1136"
width="90.929276"
height="118.98228"
x="-164.28687"
y="-64.11351"
ry="4.5401139" />
<rect
style="fill:#ffffff;stroke:none;stroke-width:39.7188;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect1259"
width="82.793495"
height="108.3365"
x="-160.21896"
y="-58.790619"
ry="4.1338935" />
<g
id="g612"
transform="translate(144.07172,14.390385)"
style="stroke:#000080">
<path
style="fill:none;stroke:#000080;stroke-width:10.6449;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -275.84991,-49.549863 -10e-6,67.047756"
id="path336"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000080;stroke-width:10.6449;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -322.8383,-6.1336929 c 32.89424,34.4651799 64.37571,28.4306559 95.07591,0"
id="path436"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000080;stroke-width:10.6449;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -232.15896,17.497892 4.39657,-23.6315849 h -21.98287"
id="path438" />
<path
style="fill:none;stroke:#000080;stroke-width:10.6449;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -318.44173,17.497892 -4.39657,-23.6315849 h 21.98287"
id="path551" />
<ellipse
style="fill:none;stroke:#000080;stroke-width:10.6449;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
id="path605"
cx="-275.84991"
cy="-64.250908"
rx="14.151472"
ry="14.701045" />
</g>
<text
xml:space="preserve"
style="font-size:112.658px;line-height:1.25;font-family:pop;-inkscape-font-specification:pop;text-align:center;text-anchor:middle;stroke-width:2.81646"
x="-86.247665"
y="64.761063"
id="text2087"><tspan
sodipodi:role="line"
id="tspan2085"
style="fill:#ff0000;stroke-width:2.81646"
x="-86.247665"
y="64.761063">#</tspan></text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

View File

@ -142,6 +142,16 @@ public class calculNombrePointEvaluation {
}
}
if(nod.getAttributs().get("evalAncrageNumeroAbsoluePage")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalAncrageNumeroAbsoluePage"));
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalAncrageNumeroAbsoluePage");
}
}
//***********************************************
//** Les points par la méthode analyseStyle *****
//***********************************************

View File

@ -7,6 +7,7 @@ import java.util.regex.Pattern;
import MEPTL.commandes;
import cXML.node;
import list.listeAttributsAnalyseWriter;
import list.listeDesNodesAncrable;
import list.listeDesNodesEvalPlacement;
public class evaluationAttribut {
@ -295,6 +296,15 @@ public class evaluationAttribut {
}
}
// evaluation de l'ancrage au numéro absolu de la page.
if(k.equals("evalAncrageNumeroAbsoluePage") && listeDesNodesAncrable.isAncrable(sujet)) {
if(nodeStudent!=null) {
retour = evaluationNumeroAbsoluePage(retour,nodeStudent.retourneNodePage(), sujet.retourneNodePage().getAttributs().get("numeroabsolue"), sujet.getAttributs().get("evalAncrageNumeroAbsoluePage"),"Ancrage");
}else {
retour = evaluationNumeroAbsoluePage(retour,null, "Pas trouvé la page", sujet.retourneNodePage().getAttributs().get("numeroabsolue"),"Ancrage");
}
}
// evaluation du placement du paragraphe
if(k.equals("evalPlacement") && listeDesNodesEvalPlacement.isPlacement(sujet)) {
retour=evalPlacement(sujet, nodeStudent, retour, nameElt);
@ -875,10 +885,10 @@ public class evaluationAttribut {
private static node evaluationNumeroAbsoluePage(node retour, node nodStudent, String numeroAbsoluePage, String point, String nameElt) {
node item = null;
if(nodStudent!=null) {
item = retourneNoteAvecResultatsAnalyse(numeroAbsoluePage,"numéro absolue", nodStudent.getAttributs().get("numeroabsolue"),numeroAbsoluePage + "" +point, nameElt );
item = retourneNoteAvecResultatsAnalyse(numeroAbsoluePage,"numéro absolue", "page "+nodStudent.getAttributs().get("numeroabsolue"),"page "+numeroAbsoluePage + "" +point, nameElt );
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
item = new node(numeroAbsoluePage, "Erreur", "Numéro de la page absolue" , "null", numeroAbsoluePage, 2, evaluation.getPointEnJeu(),nameElt);
item = new node(numeroAbsoluePage, "Erreur", "Numéro de la page absolue" , "null", "page "+numeroAbsoluePage, 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;

View File

@ -74,6 +74,7 @@ public class afficheText extends JEditorPane {
String imageDernierEnfant= "<img src="+afficheText.class.getResource("/resources/dernierenfantmini.png").toString()+">";
String imagePremierEnfant= "<img src="+afficheText.class.getResource("/resources/premierenfantmini.png").toString()+">";
String imageIsDoublon= "<img src="+afficheText.class.getResource("/resources/rechercheDoublonmini.png").toString()+">";
String imageEvalAncrageNumeroAbsoluPage= "<img src="+afficheText.class.getResource("/resources/evalnumeropageancragemini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -243,6 +244,9 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("isDoublon") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
sb.append("<li class=\"p4\">"+imageIsDoublon+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalAncrageNumeroAbsoluePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalAncrageNumeroAbsoluPage+ " <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

@ -16,6 +16,8 @@ import fenetres.create_act.actCollapseNode;
import fenetres.create_act.actCopy;
import fenetres.create_act.actDeleteNode;
import fenetres.create_act.actDownNode;
import fenetres.create_act.actEvalAncrageNumeroAbsoluePageNon;
import fenetres.create_act.actEvalAncrageNumeroAbsoluePageOui;
import fenetres.create_act.actEvalEnteteActive;
import fenetres.create_act.actEvalEnteteActiveNon;
import fenetres.create_act.actEvalEntetePasActive;
@ -86,6 +88,7 @@ import fenetres.create_act.mnEvaluerATraversAnalyseStyleFalse;
import fenetres.create_act.mnEvaluerATraversAnalyseStyleTrue;
import list.listeDesNodesAllContent;
import list.listeDesNodesAnalyseStyle;
import list.listeDesNodesAncrable;
import list.listeDesNodesAvecEvalNameNode;
import list.listeDesNodesAvecOU;
import list.listeDesNodesEvalPlacement;
@ -251,7 +254,7 @@ if(nod!=null) {
}
/**
*
* Insertion de l'information du node.</br>
* @return
*/
private JMenu mnInsereInformation() {
@ -263,7 +266,7 @@ if(nod!=null) {
}
/**
*
* Insertion de l'information sur tous les nodes de la page.</br>
* @return
*/
private JMenu mnInsereInformationMultiple() {
@ -274,6 +277,18 @@ if(nod!=null) {
return mnInsereInformationMultiple;
}
/**
* Evaluation de l'ancrage du node dans la page par son numéro absolue.</br>
* @return
*/
private JMenu mnEvalAncrageNumeroAbsoluPageAncrage() {
JMenu mnEvalAncrageNumeroAbsoluPageAncrage = new JMenu("Numéro absolue de la page");
mnEvalAncrageNumeroAbsoluPageAncrage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnumeropageancragemini.png")));
mnEvalAncrageNumeroAbsoluPageAncrage.add(new actEvalAncrageNumeroAbsoluePageOui());
mnEvalAncrageNumeroAbsoluPageAncrage.add(new actEvalAncrageNumeroAbsoluePageNon());
return mnEvalAncrageNumeroAbsoluPageAncrage;
}
/**
* Menu Titre pour le niveau 1.</br>
@ -694,13 +709,17 @@ if(nod!=null) {
if(listeDesNodesAllContent.isAllContent(nod) ) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(new actAllContent());
mnGroupeMethodeEvaluer.add(new actAllContent());
if(listeDesNodesPourEvaluerPage.isPage(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(new actAllContentChilds());
}
}
if(listeDesNodesAncrable.isAncrable(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvalAncrageNumeroAbsoluPageAncrage());
}
if(listeEvalNameNode.isNodeEvalNameNode(nod)) {
mnGroupeMethodeEvaluer.addSeparator();

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 actEvalAncrageNumeroAbsoluePageNon extends AbstractAction{
{
putValue( Action.NAME, "Supprime évaluer l'ancrage au numéro absolue de la page" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'ancrage au numéro absolue de la page." );
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.supprimeAttribut("evalAncrageNumeroAbsoluePage");
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,55 @@
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;
public class actEvalAncrageNumeroAbsoluePageOui extends AbstractAction{
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'ancrage au numéro absolue de la page" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")) );
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("evalAncrageNumeroAbsoluePage")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalAncrageNumeroAbsoluePage"));
}
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("evalAncrageNumeroAbsoluePage", String.valueOf(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>evalAncrageNumeroAbsoluePage=0.</h2>");
}else {
nod.getAttributs().put("evalAncrageNumeroAbsoluePage", 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

@ -48,6 +48,8 @@ public class actEvalNumeroAbsoluePageOui extends AbstractAction{
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); }
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -28,8 +28,6 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("recherche_index")) return true;
if(attribut.equals("recherche_contenu_exact")) return true;
if(attribut.equals("styletitre")) return true; //ancienne version, il faudra les supprimer au fur plus ajouter depuis la version v4.1.2
if(attribut.equals("evalNameCreator")) return true;
if(attribut.equals("evalNameInitialCreator")) return true;
if(attribut.equals("recherche_anchor-page-number")) return true;
if(attribut.equals("recherche_contenu_plus_proche_voisin")) return true;
if(attribut.equals("numero")) return true;
@ -37,9 +35,10 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("isDoublon")) return true;
if(attribut.equals("EvaluerATraversAnalyseStyle")) return true;
// Les attributs évaluateurs
if(attribut.equals("EvaluerATraversAnalyseStyle")) return true;
if(attribut.equals("evalNameCreator")) return true;
if(attribut.equals("evalNameInitialCreator")) return true;
if(attribut.equals("evalNameLegacyStyle")) return true;
if(attribut.equals("allContent")) return true;
if(attribut.equals("evalNameNode")) return true;
@ -55,6 +54,8 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("evalPlacement")) return true;
if(attribut.equals("evalLastChild")) return true;
if(attribut.equals("evalFirstChild")) return true;
if(attribut.equals("evalAncrageNumeroAbsoluePage")) return true;
//Les attribut placer dans le node fichier du fichier d'analyse

View File

@ -0,0 +1,18 @@
package list;
import cXML.node;
public class listeDesNodesAncrable {
public static Boolean isAncrable(node nod) {
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:list-item")) return true;
return false;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B