MAJ V4.2.1
This commit is contained in:
parent
50450b916d
commit
2e607075d3
Binary file not shown.
7
bin/.gitignore
vendored
7
bin/.gitignore
vendored
@ -1,3 +1,8 @@
|
||||
/MEPTL/
|
||||
/accueilanalyseCalcl.svg
|
||||
/accueilanalysecalc.png
|
||||
/calcul/
|
||||
/evaluer/
|
||||
/fenetres/
|
||||
/list/
|
||||
/MEPTL/
|
||||
/resources/
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
icons/evaltextuserdefined.png
Normal file
BIN
icons/evaltextuserdefined.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
319
icons/evaltextuserdefined.svg
Normal file
319
icons/evaltextuserdefined.svg
Normal file
@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\evaltextuserdefined.png"
|
||||
sodipodi:docname="evaltextuserdefined.svg"
|
||||
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
|
||||
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">
|
||||
<marker
|
||||
style="overflow:visible;"
|
||||
id="Arrow1Mend"
|
||||
refX="0.0"
|
||||
refY="0.0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow1Mend"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
transform="scale(0.4) rotate(180) translate(10,0)"
|
||||
style="fill-rule:evenodd;fill:context-stroke;stroke:context-stroke;stroke-width:1.0pt;"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
id="path6669" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Lstart"
|
||||
refX="0.0"
|
||||
refY="0.0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
transform="scale(0.8) translate(12.5,0)"
|
||||
style="fill-rule:evenodd;fill:context-stroke;stroke:context-stroke;stroke-width:1.0pt"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
id="path6660" />
|
||||
</marker>
|
||||
<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="g14476"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="28.000973"
|
||||
inkscape:cx="5.1709113"
|
||||
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">
|
||||
<sodipodi:guide
|
||||
position="-0.85185887,10.144423"
|
||||
orientation="0,-1"
|
||||
id="guide1279" />
|
||||
<sodipodi:guide
|
||||
position="-0.36139467,8.905356"
|
||||
orientation="0,-1"
|
||||
id="guide1281" />
|
||||
<sodipodi:guide
|
||||
position="-4.6465029,7.7695441"
|
||||
orientation="0,-1"
|
||||
id="guide1283" />
|
||||
<sodipodi:guide
|
||||
position="-5.3692922,6.711174"
|
||||
orientation="0,-1"
|
||||
id="guide1285" />
|
||||
<sodipodi:guide
|
||||
position="-4.7755724,5.5753622"
|
||||
orientation="0,-1"
|
||||
id="guide1287" />
|
||||
<sodipodi:guide
|
||||
position="-4.1818526,4.4911782"
|
||||
orientation="0,-1"
|
||||
id="guide1289" />
|
||||
<sodipodi:guide
|
||||
position="-4.0011553,3.3037386"
|
||||
orientation="0,-1"
|
||||
id="guide1291" />
|
||||
</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" />
|
||||
<path
|
||||
sodipodi:type="spiral"
|
||||
style="font-variation-settings:normal;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:4.53543311;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
|
||||
id="path1411"
|
||||
sodipodi:cx="22.439804"
|
||||
sodipodi:cy="22.244675"
|
||||
sodipodi:expansion="1"
|
||||
sodipodi:revolution="3"
|
||||
sodipodi:radius="21.556427"
|
||||
sodipodi:argument="-17.728239"
|
||||
sodipodi:t0="0"
|
||||
d="m 22.439804,22.244675 c 0.469606,0.973452 -1.080507,1.113287 -1.617942,0.780516 -1.456414,-0.901787 -1.004144,-3.012659 0.05691,-4.0164 1.897975,-1.795457 4.929677,-1.024904 6.414858,0.894334 2.179563,2.81656 1.055833,6.876154 -1.731759,8.813316 -3.715422,2.581934 -8.833539,1.091668 -11.211774,-2.569184 -2.992766,-4.606808 -1.130156,-10.796235 3.406609,-13.610232 5.49463,-3.4081283 12.761944,-1.170202 16.008691,4.244034 3.826178,6.380491 1.21123,14.729535 -5.08146,18.407149 C 21.418776,39.434159 11.985554,36.441122 7.8783289,29.269323 3.2114382,21.12027 6.5832753,10.601214 14.634639,6.0652578 c 9.032414,-5.08865687 20.63848,-1.3375249 25.602524,7.5937352 5.511029,9.915392 1.380243,22.609332 -8.431161,28.000982"
|
||||
transform="matrix(2.8164574,0,0,2.8164574,-185.17058,-64.3883)" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#ffcc00;fill-opacity:1;fill-rule:evenodd;stroke:#ffcc00;stroke-width:3.77953;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
|
||||
id="path1435"
|
||||
inkscape:flatsided="false"
|
||||
sodipodi:sides="6"
|
||||
sodipodi:cx="18.146973"
|
||||
sodipodi:cy="12.585803"
|
||||
sodipodi:r1="12.450451"
|
||||
sodipodi:r2="1.8426667"
|
||||
sodipodi:arg1="0.91318957"
|
||||
sodipodi:arg2="1.4367883"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="M 25.756993,22.439803 18.393166,14.411949 13.418168,24.103274 16.688581,13.712086 5.808148,14.249274 16.442387,11.88594 10.536953,2.7318027 17.900779,10.759657 22.875777,1.0683322 19.605365,11.45952 30.485797,10.922332 19.851558,13.285666 Z"
|
||||
transform="matrix(2.8022189,0.28284523,-0.28284523,2.8022189,-164.22455,-41.14671)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
BIN
icons/evaltextuserdefinedmini.png
Normal file
BIN
icons/evaltextuserdefinedmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -244,6 +244,14 @@ public class evaluationAttribut {
|
||||
}
|
||||
}
|
||||
|
||||
if(k.equals("evalTextUserDefined") && sujet.getNomElt().equals("text:user-defined") && sujet.chemin().contains("structurepage")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = evaluTextUserDefined(retour,nodeStudent, sujet.getAttributs().get("text:name"), sujet.getAttributs().get("evalTextUserDefined"),"Propriété personnalisé");
|
||||
}else {
|
||||
retour = evaluTextUserDefined(retour,null, "Pas trouvé la valeur", sujet.getAttributs().get("evalTextUserDefined"),"Propriété personnalisé");
|
||||
}
|
||||
}
|
||||
|
||||
if(k.equals("evalNumeroPage") && sujet.getNomElt().equals("page")) {
|
||||
if(nodeStudent!=null) {
|
||||
retour = evaluNumeroPage(retour,nodeStudent, sujet.getAttributs().get("numero"), sujet.getAttributs().get("evalNumeroPage"),"numéro");
|
||||
@ -450,6 +458,28 @@ public class evaluationAttribut {
|
||||
return retour;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* evalue la valeur de la propriété personalisée dans la structure ("text:name") de text:user-defined
|
||||
* @param retour
|
||||
* @param nodStudent
|
||||
* @param textUserDefined
|
||||
* @param point
|
||||
* @param nameElt
|
||||
* @return
|
||||
*/
|
||||
private static node evaluTextUserDefined(node retour, node nodStudent, String textUserDefined, String point, String nameElt) {
|
||||
node item = null;
|
||||
if(nodStudent!=null) {
|
||||
item = retourneNoteAvecResultatsAnalyse(textUserDefined,"valeur", nodStudent.getAttributs().get("text:name"),textUserDefined + "↑‽" +point, nameElt );
|
||||
}else {
|
||||
evaluation.IncrementPointTotal(Integer.valueOf(point));
|
||||
item = new node(textUserDefined, "Erreur", "valeur de la propriété" , "null", textUserDefined, 2, evaluation.getPointEnJeu(),nameElt);
|
||||
}
|
||||
retour.getNodes().add(item);
|
||||
return retour;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param retour
|
||||
|
@ -56,6 +56,7 @@ public class afficheText extends JEditorPane {
|
||||
String imagePoids= "<img src="+afficheText.class.getResource("/resources/poidsmini.png").toString()+">";
|
||||
String imageEvalNumeroPage= "<img src="+afficheText.class.getResource("/resources/evalnumeropagemini.png").toString()+">";
|
||||
String imageEvalNumeroAbsoluePage= "<img src="+afficheText.class.getResource("/resources/evalnumeroabsoluepagemini.png").toString()+">";
|
||||
String imageEvalTextUserDefined= "<img src="+afficheText.class.getResource("/resources/evaltextuserdefinedmini.png").toString()+">";
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@ -186,6 +187,9 @@ public class afficheText extends JEditorPane {
|
||||
if(Lesattributsdunode.get(i).equals("poids") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imagePoids + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalTextUserDefined") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalTextUserDefined + " <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>");
|
||||
|
@ -63,6 +63,8 @@ import fenetres.create_act.actEvalNumeroPageNon;
|
||||
import fenetres.create_act.actEvalNumeroPageOui;
|
||||
import fenetres.create_act.actEvalPiedPageActive;
|
||||
import fenetres.create_act.actEvalPiedPagePasActive;
|
||||
import fenetres.create_act.actEvalTextUserDefinedNon;
|
||||
import fenetres.create_act.actEvalTextUserDefinedOui;
|
||||
import fenetres.create_act.actEvalueFalse;
|
||||
import fenetres.create_act.actEvalueTrue;
|
||||
import fenetres.create_act.actEvaluer;
|
||||
@ -286,25 +288,6 @@ public final class create extends JFrame {
|
||||
|
||||
if(nod!=null) {
|
||||
|
||||
// boolean nodeSetting = false;
|
||||
// boolean nodeFormatageDirectePasDeTitrePasAddMenu = false;
|
||||
//
|
||||
//
|
||||
// node nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
|
||||
// if(!nod.getNomElt().equals("page")) {
|
||||
// if(nodStyleParent!=null) {
|
||||
// String nomDuStle = nodStyleParent.getAttributs().get("style:name");
|
||||
// Pattern p = Pattern.compile("^P[0-9]{1,}$|^T[0-9]{1,}$");
|
||||
// Matcher m = p.matcher(nomDuStle);
|
||||
// if(m.find()) {
|
||||
// nodeFormatageDirectePasDeTitrePasAddMenu = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
//Menu Evaluer
|
||||
JMenu mnEvaluer = new JMenu("Evaluer");
|
||||
mnEvaluer.add(new actEvalueTrue());
|
||||
@ -321,6 +304,7 @@ public final class create extends JFrame {
|
||||
mnManageTree.add(new actCollapseAll());
|
||||
mnManageTree.add(new actCollapseNode());
|
||||
|
||||
|
||||
//Menu Saut niveau >1
|
||||
JMenu mnSaut = new JMenu("Saut de ligne avant");
|
||||
mnSaut.setIcon( new ImageIcon(create.class.getResource("/resources/sautmini.png")));
|
||||
@ -437,6 +421,12 @@ public final class create extends JFrame {
|
||||
mnEvalNumeroAbsoluePage.add(new actEvalNumeroAbsoluePageOui());
|
||||
mnEvalNumeroAbsoluePage.add(new actEvalNumeroAbsoluePageNon());
|
||||
|
||||
//Menu evalTextUserDefined
|
||||
JMenu mnEvalTextUserDefined = new JMenu("Evaluer la valeur de la propriété");
|
||||
mnEvalTextUserDefined.setIcon(new ImageIcon(create.class.getResource("/resources/evaltextuserdefinedmini.png")));
|
||||
mnEvalTextUserDefined.add(new actEvalTextUserDefinedOui());
|
||||
mnEvalTextUserDefined.add(new actEvalTextUserDefinedNon());
|
||||
|
||||
//Menue Recherche par le numéro de la page ancrer
|
||||
JMenu mnRechercheParNumeroPageAncrer = new JMenu("Recherche par le numéro de la page");
|
||||
mnRechercheParNumeroPageAncrer.setIcon(new ImageIcon(create.class.getResource("/resources/rechercheancragepagemini.png")));
|
||||
@ -499,16 +489,6 @@ public final class create extends JFrame {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actevalNameCreator());
|
||||
}
|
||||
if(ecritureSujet.listeDesNodesByRecherche(nod.getNomElt())) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheIndex);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheContenu);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheContenuPlusProcheVoisin);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnAnalyseStyle);
|
||||
}
|
||||
if(listeRechercheParAnchorPageNumber.isRechercheParAnchorPageNumber(nod)) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheParNumeroPageAncrer);
|
||||
@ -533,6 +513,21 @@ public final class create extends JFrame {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnEvalNumeroAbsoluePage);
|
||||
}
|
||||
if(nod.getNomElt().equals("text:user-defined") && nod.chemin().contains("structurepage")) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnEvalTextUserDefined);
|
||||
}
|
||||
|
||||
if(ecritureSujet.listeDesNodesByRecherche(nod.getNomElt())) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheIndex);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheContenu);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnRechercheContenuPlusProcheVoisin);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnAnalyseStyle);
|
||||
}
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actAttribut());
|
||||
}
|
||||
@ -541,6 +536,10 @@ public final class create extends JFrame {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnManageTree);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actCopy());
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actPaste());
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actDeleteNode());
|
||||
|
||||
|
||||
|
@ -31,15 +31,15 @@ public class actCopy extends AbstractAction{
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
|
||||
Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
|
||||
StringSelection texto = new StringSelection(Run.ecritureNode(nod, 0).toString());
|
||||
|
||||
StringSelection texto = new StringSelection(Run.ecritureNode(nod, 0).toString());
|
||||
|
||||
cb.setContents(texto, texto);
|
||||
cb.setContents(texto, texto);
|
||||
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()+"<hr><h2>Le node est copié dans le presse papier.</h2><hr>");
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()+"<hr><h2>Le node est copié dans le presse papier.</h2><hr>");
|
||||
}
|
||||
|
||||
}
|
||||
|
27
src/fenetres/create_act/actEvalTextUserDefinedNon.java
Normal file
27
src/fenetres/create_act/actEvalTextUserDefinedNon.java
Normal file
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
public class actEvalTextUserDefinedNon extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Supprime évaluer la valeur de la propriété personnalisé" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la valeur personnalisé." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.supprimeAttribut("evalTextUserDefined");
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
50
src/fenetres/create_act/actEvalTextUserDefinedOui.java
Normal file
50
src/fenetres/create_act/actEvalTextUserDefinedOui.java
Normal file
@ -0,0 +1,50 @@
|
||||
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;
|
||||
|
||||
public class actEvalTextUserDefinedOui extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Oui, combien de point?" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer la valeur de la propriété personnalisé" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalTextUserDefined")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalTextUserDefined"));
|
||||
}
|
||||
|
||||
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("evalTextUserDefined", 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>evalTextUserDefined=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalTextUserDefined", 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);
|
||||
}
|
||||
|
||||
}
|
@ -14,8 +14,8 @@ import java.util.logging.Logger;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
|
||||
@ -36,24 +36,32 @@ public class actPaste extends AbstractAction{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
String initial = "";
|
||||
|
||||
try {
|
||||
|
||||
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
String paste = c.getContents(null).getTransferData(DataFlavor.stringFlavor).toString();
|
||||
if (!paste.equals(initial)) {
|
||||
node nodCopy = Run.XMLContent(paste);
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.getNodes().add(nodCopy);
|
||||
fenetres.create.constructionTree();
|
||||
initial = paste;
|
||||
String paste;
|
||||
try {
|
||||
paste = c.getContents(null).getTransferData(DataFlavor.stringFlavor).toString();
|
||||
if (!paste.equals(initial)) {
|
||||
node nodCopy = Run.XMLContent(paste);
|
||||
if(!nodCopy.getNomElt().isEmpty()) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.getNodes().add(nodCopy);
|
||||
fenetres.create.constructionTree();
|
||||
initial = paste;
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Le collage n'est pas réalisé.<br>Ce n'est pas un node.");
|
||||
}
|
||||
|
||||
}
|
||||
} catch (UnsupportedFlavorException | IOException e1) {
|
||||
JOptionPane.showConfirmDialog(null, e1.toString());
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(40);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
} catch (UnsupportedFlavorException | IOException ex) {
|
||||
Logger.getLogger(actPaste.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(40);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ public class listeAttributsAnalyseWriter {
|
||||
if(attribut.equals("evalPiedPagePasActive")) return true;
|
||||
if(attribut.equals("evalNameSequence")) return true;
|
||||
if(attribut.equals("evalNamePage")) return true;
|
||||
if(attribut.equals("evalTextUserDefined")) return true;
|
||||
if(attribut.equals("evalNumeroAbsoluePage")) return true;
|
||||
if(attribut.equals("evalNumeroPage")) return true;
|
||||
|
||||
|
BIN
src/resources/evaltextuserdefined.png
Normal file
BIN
src/resources/evaltextuserdefined.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
src/resources/evaltextuserdefinedmini.png
Normal file
BIN
src/resources/evaltextuserdefinedmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user