V2.0.1
9
.classpath
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="images"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/>
|
||||
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
6543
.owncloudsync.log
Normal file
17
.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>analyseCalc</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
12
.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,12 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
BIN
.sync_5c2bd78c81eb.db
Normal file
BIN
.sync_5c2bd78c81eb.db-shm
Normal file
BIN
.sync_5c2bd78c81eb.db-wal
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="images"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/>
|
||||
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
6543
analyseCalc/analyseCalc/analyseCalc/analyseCalc/.owncloudsync.log
Normal file
17
analyseCalc/analyseCalc/analyseCalc/analyseCalc/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>analyseCalc</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,12 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
20
analyseCalc/analyseCalc/analyseCalc/analyseCalc/bin/.gitignore
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/evalCalcl.svg
|
||||
/evalcalc.png
|
||||
/nodeAC/
|
||||
/outils/
|
||||
/AnalyseCalc/
|
||||
/about.png
|
||||
/accueil.png
|
||||
/accueilanalyseCalcl.svg
|
||||
/accueilanalysecalc.png
|
||||
/calc/
|
||||
/calcul/
|
||||
/evaluate.png
|
||||
/evaluer/
|
||||
/evalwriter.png
|
||||
/fenetres/
|
||||
/fichierAnalyseModif.png
|
||||
/fichierAnalyseModifmax.png
|
||||
/fichierAnalyseModifmini.png
|
||||
/list/
|
||||
/resources/
|
BIN
analyseCalc/analyseCalc/analyseCalc/analyseCalc/images/about.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 8.9 KiB |
@ -0,0 +1,543 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="128"
|
||||
inkscape:export-xdpi="128"
|
||||
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\accueilanalysecalc.png"
|
||||
sodipodi:docname="accueilanalyseCalcl.svg"
|
||||
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 67.230724 17.388617"
|
||||
height="65.720757"
|
||||
width="254.10037"
|
||||
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,-873.96742,-7808.7674)"
|
||||
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">
|
||||
<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" />
|
||||
<linearGradient
|
||||
id="h"
|
||||
gradientTransform="matrix(4.4999,0,0,3.66665,-942.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,1540.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,-1392.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,-281.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,-1392.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,1499.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-1"
|
||||
gradientTransform="matrix(7.99974,0,0,7.9977797,-873.96742,-7808.7674)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="122.75008"
|
||||
x2="111.74973"
|
||||
xlink:href="#a-1"
|
||||
y1="991.62115"
|
||||
y2="977.11713" />
|
||||
<linearGradient
|
||||
id="a-1">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#18a303"
|
||||
id="stop2-6" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#43c330"
|
||||
id="stop4-4" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="b-8"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="546"
|
||||
x2="458"
|
||||
xlink:href="#a-1"
|
||||
y1="121.99995"
|
||||
y2="5.9999499" />
|
||||
<linearGradient
|
||||
id="c-0"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="508.06174"
|
||||
x2="508.06174"
|
||||
y1="109.9985"
|
||||
y2="83.998497">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#727272"
|
||||
id="stop8" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#9a9a9a"
|
||||
id="stop10" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="d-8"
|
||||
gradientTransform="matrix(0.948718,0,0,1.3,-288.38576,1491.7273)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="829.36053"
|
||||
x2="829.36053"
|
||||
y1="-1064.7994"
|
||||
y2="-1082.3413">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#e4e4e4"
|
||||
id="stop13" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#f9f9f9"
|
||||
id="stop15" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="e-7"
|
||||
gradientTransform="matrix(0.714286,0,0,-1.55555,125.07024,-1571.1037)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#63bbee"
|
||||
id="stop18" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#aadcf7"
|
||||
id="stop20" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="f-2"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="512.65552"
|
||||
x2="512.65552"
|
||||
y1="95.0298"
|
||||
y2="85.998596">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#a33e03"
|
||||
id="stop23" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#c15414"
|
||||
id="stop25" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="g-8"
|
||||
gradientTransform="matrix(0.714286,0,0,-2.11111,133.07024,-2170.0637)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#f09e6f"
|
||||
id="stop28" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#f9cfb5"
|
||||
id="stop30" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="h-0"
|
||||
gradientTransform="matrix(0.714286,0,0,-0.888884,141.07024,-852.34365)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#f5ce53"
|
||||
id="stop33" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#fde9a9"
|
||||
id="stop35-8" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="i-0"
|
||||
gradientTransform="matrix(0.714286,0,0,-1.33333,149.07024,-1331.5137)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#8ee780"
|
||||
id="stop38" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#ccf4c6"
|
||||
id="stop40" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-width="1920"
|
||||
lock-margins="true"
|
||||
units="px"
|
||||
fit-margin-bottom="2"
|
||||
fit-margin-right="2"
|
||||
fit-margin-left="2"
|
||||
fit-margin-top="2"
|
||||
inkscape:guide-bbox="true"
|
||||
showguides="true"
|
||||
inkscape:snap-global="false"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="36.86866"
|
||||
inkscape:cx="66.698758"
|
||||
inkscape:zoom="2.9835638"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-page="true">
|
||||
<sodipodi:guide
|
||||
id="guide1680"
|
||||
orientation="0,-1"
|
||||
position="36.945035,2.9637157" />
|
||||
<sodipodi:guide
|
||||
position="-0.1773606,32.641629"
|
||||
orientation="-0.71102562,0.7031661"
|
||||
id="guide2372" />
|
||||
</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
|
||||
transform="translate(-31.383969,-46.222139)"
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Calque 1">
|
||||
<rect
|
||||
style="fill:none;stroke:none;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;stop-color:#000000"
|
||||
id="rect4845"
|
||||
width="66.024391"
|
||||
height="16.182283"
|
||||
x="31.987135"
|
||||
y="46.825306" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:9.96044px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;stroke-width:0.233446"
|
||||
x="44.636173"
|
||||
y="60.949116"
|
||||
id="text835"
|
||||
transform="scale(1.0448769,0.95705052)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan833"
|
||||
x="44.636173"
|
||||
y="60.949116"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.96044px;font-family:Pacifico;-inkscape-font-specification:Pacifico;stroke-width:0.233446">analyseCalc</tspan></text>
|
||||
<g
|
||||
id="g964"
|
||||
transform="matrix(0.13140715,0,0,0.12826325,30.208961,46.733319)">
|
||||
<path
|
||||
d="m 17.253295,0 c -0.25037,0 -0.50072,0.011156 -0.75,0.035156 -3.66708,0.6998 -4.56576,2.2662469 -4.5,5.9980468 V 122.00195 c 4e-4,4.1875 1.81149,5.99765 6,5.99805 h 91.998055 c 4.1885,-4e-4 5.99764,-1.81055 5.99804,-5.99805 V 50.183594 c 0.048,-2.1119 -0.78004,-4.230247 -2.25,-5.748047 L 71.589245,2.2851562 c -1.51819,-1.4691999 -3.63759,-2.2988999 -5.75,-2.25 H 18.003295 C 17.754105,0.0111562 17.503675,0 17.253295,0 Z m 70.00978,0.013672 c -0.20997,0 -0.41948,0.016828 -0.62695,0.048828 -2.66247,0.8528 -3.55843,4.904547 -1.50586,6.810547 L 109.22596,31.09375 c 2.22593,2.1217 6.6581,0.306209 6.77538,-2.775391 V 4.097656 C 116.0011,1.9839562 114.08836,0.0628 111.98573,0.0625 H 87.891975 c -0.20758,-0.032 -0.41894,-0.048828 -0.6289,-0.048828 z"
|
||||
fill="url(#k)"
|
||||
id="path49"
|
||||
style="fill:url(#k-1)" />
|
||||
<path
|
||||
d="M 18.001355,6 V 122 H 110.00137 V 50 L 66.001375,6 Z"
|
||||
fill="url(#j)"
|
||||
id="path51"
|
||||
style="fill:url(#j)" />
|
||||
<g
|
||||
transform="translate(-437.99866,2)"
|
||||
id="g105">
|
||||
<path
|
||||
d="m 469,53.998 v 2 8 2 8 2 8 2 8 2 8 2 h 60 v -2 -50 h -58 z"
|
||||
fill="url(#b)"
|
||||
id="path53"
|
||||
style="fill:url(#b-8)" />
|
||||
<g
|
||||
fill="#92e285"
|
||||
id="g61">
|
||||
<path
|
||||
d="m 470.99924,55.99855 h 17 v 8 h -17 z"
|
||||
id="path55" />
|
||||
<path
|
||||
d="m 489.99748,55.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path57" />
|
||||
<path
|
||||
d="m 509.99924,55.99855 h 17 v 8 h -17 z"
|
||||
id="path59" />
|
||||
</g>
|
||||
<g
|
||||
fill="#ccf4c6"
|
||||
id="g81">
|
||||
<path
|
||||
d="m 470.99924,65.99855 h 17 v 8 h -17 z"
|
||||
id="path63" />
|
||||
<path
|
||||
d="m 509.99924,65.99855 h 17 v 8 h -17 z"
|
||||
id="path65" />
|
||||
<path
|
||||
d="m 489.99748,75.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path67" />
|
||||
<path
|
||||
d="m 509.99924,75.99855 h 17 v 8 h -17 z"
|
||||
id="path69" />
|
||||
<path
|
||||
d="m 470.99924,75.99855 h 17 v 8 h -17 z"
|
||||
id="path71" />
|
||||
<path
|
||||
d="m 489.99748,85.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path73" />
|
||||
<path
|
||||
d="m 470.99924,85.99855 h 17 v 8 h -17 z"
|
||||
id="path75" />
|
||||
<path
|
||||
d="m 489.99748,95.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path77" />
|
||||
<path
|
||||
d="m 470.99924,95.99855 h 17 v 8 h -17 z"
|
||||
id="path79" />
|
||||
</g>
|
||||
<path
|
||||
d="m 493.99924,81.99855 h 39 v 28 h -39 z"
|
||||
fill="url(#c)"
|
||||
id="path83"
|
||||
style="fill:url(#c-0)" />
|
||||
<path
|
||||
d="m 495.99924,83.99855 h 35 v 24 h -35 z"
|
||||
fill="url(#d)"
|
||||
id="path85"
|
||||
style="fill:url(#d-8)" />
|
||||
<path
|
||||
d="m 497.99924,90.99855 h 7 v 15.9999 h -7 z"
|
||||
fill="#18a303"
|
||||
id="path87" />
|
||||
<path
|
||||
d="m 498.99924,105.99855 h 5 v -14 h -5 z"
|
||||
fill="url(#e)"
|
||||
id="path89"
|
||||
style="fill:url(#e-7)" />
|
||||
<path
|
||||
d="m 505.99924,85.99855 h 7 v 20.9999 h -7 z"
|
||||
fill="url(#f)"
|
||||
id="path91"
|
||||
style="fill:url(#f-2)" />
|
||||
<path
|
||||
d="m 506.99924,105.99855 h 5 v -19 h -5 z"
|
||||
fill="url(#g)"
|
||||
id="path93"
|
||||
style="fill:url(#g-8)" />
|
||||
<path
|
||||
d="m 513.99924,96.99855 h 7 v 9.9999 h -7 z"
|
||||
fill="#c99c00"
|
||||
id="path95" />
|
||||
<path
|
||||
d="m 514.99924,105.99855 h 5 v -8 h -5 z"
|
||||
fill="url(#h)"
|
||||
id="path97"
|
||||
style="fill:url(#h-0)" />
|
||||
<path
|
||||
d="m 521.99924,92.99855 h 7 v 14 h -7 z"
|
||||
fill="#43c330"
|
||||
id="path99" />
|
||||
<path
|
||||
d="m 522.99924,105.99855 h 5 v -12 h -5 z"
|
||||
fill="url(#i)"
|
||||
id="path101"
|
||||
style="fill:url(#i-0)" />
|
||||
<path
|
||||
d="m 489.99748,65.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
fill="#ccf4c6"
|
||||
id="path103" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g3176"
|
||||
transform="translate(-29.2645,18.09078)"
|
||||
inkscape:export-filename="C:\Users\pabr6\eclipse-workspace\analyseCalc\images\accueilanalysecalc.png"
|
||||
inkscape:export-xdpi="128"
|
||||
inkscape:export-ydpi="128">
|
||||
<path
|
||||
style="fill:#ffaaaa;stroke:#ffaaaa;stroke-width:0.257397px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 64.782774,30.389036 -0.734025,-0.804561 c -0.261592,-0.0028 -0.488807,-0.05918 -0.892393,0.159352 -0.447603,0.343499 -0.662658,0.633003 -0.85336,0.916853 -0.171891,0.333921 -0.135917,0.570072 -0.09736,0.805004 l 0.779691,0.740884 z"
|
||||
id="path1605"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
id="path903"
|
||||
d="m 65.185528,30.771366 0.962387,-0.638019 c 0.838489,1.245007 0.419423,1.619401 2.562142,3.767338"
|
||||
style="fill:none;stroke:#686868;stroke-width:0.480582;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<g
|
||||
id="g901"
|
||||
style="stroke-width:1.20245;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.10789957,-0.05670569,0.05420981,0.11191121,44.387897,27.140948)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 165.60421,210.25518 -16.67346,-14.97786 19.49947,-6.49982 z"
|
||||
id="path886" />
|
||||
<path
|
||||
style="fill:#ffcc00;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 148.93075,195.27732 -29.6731,-89.58453 19.78207,-6.217222 29.3905,89.301932 z"
|
||||
id="path888"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#cccccc;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 119.25765,105.69279 19.78206,-6.217223 5.18467,15.184943 -20.19347,6.3466 z"
|
||||
id="path896"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#000000;stroke:none;stroke-width:1.20245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 165.60421,210.25518 1.82913,-13.90142 c -1.86721,0.41019 -1.24071,5.14178 -2.26609,5.73964 -0.90416,0.52717 -2.9307,-2.35026 -4.06786,-2.12548 -1.70014,0.33605 2.39156,6.64425 -1.96215,4.47795 z"
|
||||
id="path1247"
|
||||
sodipodi:nodetypes="ccsscc" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,535 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="C:\Users\pabr6\eclipse-workspace\analyseCalc\images\evalcalc.png"
|
||||
sodipodi:docname="evalCalcl.svg"
|
||||
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 10.96941 12.964583"
|
||||
height="49"
|
||||
width="41.459187"
|
||||
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,-873.96742,-7808.7674)"
|
||||
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">
|
||||
<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" />
|
||||
<linearGradient
|
||||
id="h"
|
||||
gradientTransform="matrix(4.4999,0,0,3.66665,-942.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,1540.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,-1392.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,-281.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,-1392.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,1499.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-1"
|
||||
gradientTransform="matrix(7.99974,0,0,7.9977797,-873.96742,-7808.7674)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="122.75008"
|
||||
x2="111.74973"
|
||||
xlink:href="#a-1"
|
||||
y1="991.62115"
|
||||
y2="977.11713" />
|
||||
<linearGradient
|
||||
id="a-1">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#18a303"
|
||||
id="stop2-6" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#43c330"
|
||||
id="stop4-4" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="b-8"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="546"
|
||||
x2="458"
|
||||
xlink:href="#a-1"
|
||||
y1="121.99995"
|
||||
y2="5.9999499" />
|
||||
<linearGradient
|
||||
id="c-0"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="508.06174"
|
||||
x2="508.06174"
|
||||
y1="109.9985"
|
||||
y2="83.998497">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#727272"
|
||||
id="stop8" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#9a9a9a"
|
||||
id="stop10" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="d-8"
|
||||
gradientTransform="matrix(0.948718,0,0,1.3,-288.38576,1491.7273)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="829.36053"
|
||||
x2="829.36053"
|
||||
y1="-1064.7994"
|
||||
y2="-1082.3413">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#e4e4e4"
|
||||
id="stop13" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#f9f9f9"
|
||||
id="stop15" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="e-7"
|
||||
gradientTransform="matrix(0.714286,0,0,-1.55555,125.07024,-1571.1037)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#63bbee"
|
||||
id="stop18" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#aadcf7"
|
||||
id="stop20" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="f-2"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="512.65552"
|
||||
x2="512.65552"
|
||||
y1="95.0298"
|
||||
y2="85.998596">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#a33e03"
|
||||
id="stop23" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#c15414"
|
||||
id="stop25" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="g-8"
|
||||
gradientTransform="matrix(0.714286,0,0,-2.11111,133.07024,-2170.0637)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#f09e6f"
|
||||
id="stop28" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#f9cfb5"
|
||||
id="stop30" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="h-0"
|
||||
gradientTransform="matrix(0.714286,0,0,-0.888884,141.07024,-852.34365)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#f5ce53"
|
||||
id="stop33" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#fde9a9"
|
||||
id="stop35-8" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="i-0"
|
||||
gradientTransform="matrix(0.714286,0,0,-1.33333,149.07024,-1331.5137)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="525.63947"
|
||||
x2="525.63947"
|
||||
y1="-1078.6444"
|
||||
y2="-1068.7872">
|
||||
<stop
|
||||
offset="0"
|
||||
stop-color="#8ee780"
|
||||
id="stop38" />
|
||||
<stop
|
||||
offset="1"
|
||||
stop-color="#ccf4c6"
|
||||
id="stop40" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-width="1920"
|
||||
lock-margins="true"
|
||||
units="px"
|
||||
fit-margin-bottom="2"
|
||||
fit-margin-right="2"
|
||||
fit-margin-left="2"
|
||||
fit-margin-top="2"
|
||||
inkscape:guide-bbox="true"
|
||||
showguides="true"
|
||||
inkscape:snap-global="false"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="36.86866"
|
||||
inkscape:cx="23.126705"
|
||||
inkscape:zoom="2.9835638"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-page="true">
|
||||
<sodipodi:guide
|
||||
id="guide1680"
|
||||
orientation="0,-1"
|
||||
position="37.072323,-1.4783038" />
|
||||
<sodipodi:guide
|
||||
position="-0.050071963,28.199609"
|
||||
orientation="-0.71102562,0.7031661"
|
||||
id="guide2372" />
|
||||
</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
|
||||
transform="translate(-31.25668,-46.204153)"
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Calque 1">
|
||||
<g
|
||||
id="g1222"
|
||||
transform="matrix(0.72520834,0,0,0.72520834,8.7344858,12.841927)">
|
||||
<g
|
||||
id="g964"
|
||||
transform="matrix(0.13140715,0,0,0.12826325,30.208961,46.733319)">
|
||||
<path
|
||||
d="m 17.253295,0 c -0.25037,0 -0.50072,0.011156 -0.75,0.035156 -3.66708,0.6998 -4.56576,2.2662469 -4.5,5.9980468 V 122.00195 c 4e-4,4.1875 1.81149,5.99765 6,5.99805 h 91.998055 c 4.1885,-4e-4 5.99764,-1.81055 5.99804,-5.99805 V 50.183594 c 0.048,-2.1119 -0.78004,-4.230247 -2.25,-5.748047 L 71.589245,2.2851562 c -1.51819,-1.4691999 -3.63759,-2.2988999 -5.75,-2.25 H 18.003295 C 17.754105,0.0111562 17.503675,0 17.253295,0 Z m 70.00978,0.013672 c -0.20997,0 -0.41948,0.016828 -0.62695,0.048828 -2.66247,0.8528 -3.55843,4.904547 -1.50586,6.810547 L 109.22596,31.09375 c 2.22593,2.1217 6.6581,0.306209 6.77538,-2.775391 V 4.097656 C 116.0011,1.9839562 114.08836,0.0628 111.98573,0.0625 H 87.891975 c -0.20758,-0.032 -0.41894,-0.048828 -0.6289,-0.048828 z"
|
||||
fill="url(#k)"
|
||||
id="path49"
|
||||
style="fill:url(#k-1)" />
|
||||
<path
|
||||
d="M 18.001355,6 V 122 H 110.00137 V 50 L 66.001375,6 Z"
|
||||
fill="url(#j)"
|
||||
id="path51"
|
||||
style="fill:url(#j)" />
|
||||
<g
|
||||
transform="translate(-437.99866,2)"
|
||||
id="g105">
|
||||
<path
|
||||
d="m 469,53.998 v 2 8 2 8 2 8 2 8 2 8 2 h 60 v -2 -50 h -58 z"
|
||||
fill="url(#b)"
|
||||
id="path53"
|
||||
style="fill:url(#b-8)" />
|
||||
<g
|
||||
fill="#92e285"
|
||||
id="g61">
|
||||
<path
|
||||
d="m 470.99924,55.99855 h 17 v 8 h -17 z"
|
||||
id="path55" />
|
||||
<path
|
||||
d="m 489.99748,55.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path57" />
|
||||
<path
|
||||
d="m 509.99924,55.99855 h 17 v 8 h -17 z"
|
||||
id="path59" />
|
||||
</g>
|
||||
<g
|
||||
fill="#ccf4c6"
|
||||
id="g81">
|
||||
<path
|
||||
d="m 470.99924,65.99855 h 17 v 8 h -17 z"
|
||||
id="path63" />
|
||||
<path
|
||||
d="m 509.99924,65.99855 h 17 v 8 h -17 z"
|
||||
id="path65" />
|
||||
<path
|
||||
d="m 489.99748,75.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path67" />
|
||||
<path
|
||||
d="m 509.99924,75.99855 h 17 v 8 h -17 z"
|
||||
id="path69" />
|
||||
<path
|
||||
d="m 470.99924,75.99855 h 17 v 8 h -17 z"
|
||||
id="path71" />
|
||||
<path
|
||||
d="m 489.99748,85.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path73" />
|
||||
<path
|
||||
d="m 470.99924,85.99855 h 17 v 8 h -17 z"
|
||||
id="path75" />
|
||||
<path
|
||||
d="m 489.99748,95.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
id="path77" />
|
||||
<path
|
||||
d="m 470.99924,95.99855 h 17 v 8 h -17 z"
|
||||
id="path79" />
|
||||
</g>
|
||||
<path
|
||||
d="m 493.99924,81.99855 h 39 v 28 h -39 z"
|
||||
fill="url(#c)"
|
||||
id="path83"
|
||||
style="fill:url(#c-0)" />
|
||||
<path
|
||||
d="m 495.99924,83.99855 h 35 v 24 h -35 z"
|
||||
fill="url(#d)"
|
||||
id="path85"
|
||||
style="fill:url(#d-8)" />
|
||||
<path
|
||||
d="m 497.99924,90.99855 h 7 v 15.9999 h -7 z"
|
||||
fill="#18a303"
|
||||
id="path87" />
|
||||
<path
|
||||
d="m 498.99924,105.99855 h 5 v -14 h -5 z"
|
||||
fill="url(#e)"
|
||||
id="path89"
|
||||
style="fill:url(#e-7)" />
|
||||
<path
|
||||
d="m 505.99924,85.99855 h 7 v 20.9999 h -7 z"
|
||||
fill="url(#f)"
|
||||
id="path91"
|
||||
style="fill:url(#f-2)" />
|
||||
<path
|
||||
d="m 506.99924,105.99855 h 5 v -19 h -5 z"
|
||||
fill="url(#g)"
|
||||
id="path93"
|
||||
style="fill:url(#g-8)" />
|
||||
<path
|
||||
d="m 513.99924,96.99855 h 7 v 9.9999 h -7 z"
|
||||
fill="#c99c00"
|
||||
id="path95" />
|
||||
<path
|
||||
d="m 514.99924,105.99855 h 5 v -8 h -5 z"
|
||||
fill="url(#h)"
|
||||
id="path97"
|
||||
style="fill:url(#h-0)" />
|
||||
<path
|
||||
d="m 521.99924,92.99855 h 7 v 14 h -7 z"
|
||||
fill="#43c330"
|
||||
id="path99" />
|
||||
<path
|
||||
d="m 522.99924,105.99855 h 5 v -12 h -5 z"
|
||||
fill="url(#i)"
|
||||
id="path101"
|
||||
style="fill:url(#i-0)" />
|
||||
<path
|
||||
d="m 489.99748,65.99855 h 17.99994 v 8 h -17.99994 z"
|
||||
fill="#ccf4c6"
|
||||
id="path103" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g3176"
|
||||
transform="translate(-29.2645,18.09078)"
|
||||
inkscape:export-filename="C:\Users\pabr6\eclipse-workspace\analyseCalc\images\accueilanalysecalc.png"
|
||||
inkscape:export-xdpi="128"
|
||||
inkscape:export-ydpi="128">
|
||||
<path
|
||||
style="fill:#ffaaaa;stroke:#ffaaaa;stroke-width:0.257397px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 64.782774,30.389036 -0.734025,-0.804561 c -0.261592,-0.0028 -0.488807,-0.05918 -0.892393,0.159352 -0.447603,0.343499 -0.662658,0.633003 -0.85336,0.916853 -0.171891,0.333921 -0.135917,0.570072 -0.09736,0.805004 l 0.779691,0.740884 z"
|
||||
id="path1605"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
id="path903"
|
||||
d="m 65.185528,30.771366 0.962387,-0.638019 c 0.838489,1.245007 0.419423,1.619401 2.562142,3.767338"
|
||||
style="fill:none;stroke:#686868;stroke-width:0.480582;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<g
|
||||
id="g901"
|
||||
style="stroke-width:1.20245;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
transform="matrix(0.10789957,-0.05670569,0.05420981,0.11191121,44.387897,27.140948)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 165.60421,210.25518 -16.67346,-14.97786 19.49947,-6.49982 z"
|
||||
id="path886" />
|
||||
<path
|
||||
style="fill:#ffcc00;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 148.93075,195.27732 -29.6731,-89.58453 19.78207,-6.217222 29.3905,89.301932 z"
|
||||
id="path888"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#cccccc;stroke:#000000;stroke-width:1.20245;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 119.25765,105.69279 19.78206,-6.217223 5.18467,15.184943 -20.19347,6.3466 z"
|
||||
id="path896"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#000000;stroke:none;stroke-width:1.20245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 165.60421,210.25518 1.82913,-13.90142 c -1.86721,0.41019 -1.24071,5.14178 -2.26609,5.73964 -0.90416,0.52717 -2.9307,-2.35026 -4.06786,-2.12548 -1.70014,0.33605 2.39156,6.64425 -1.96215,4.47795 z"
|
||||
id="path1247"
|
||||
sodipodi:nodetypes="ccsscc" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
style="fill:none;stroke:none;stroke-width:0.148;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;stop-color:#000000"
|
||||
id="rect4845"
|
||||
width="66.024391"
|
||||
height="16.182283"
|
||||
x="31.987135"
|
||||
y="46.825306" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,63 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import AnalyseCalc.Classeur2.historique;
|
||||
|
||||
|
||||
public class AnalyseClasseur {
|
||||
|
||||
List<AnalyseFeuille> classeur = new ArrayList<AnalyseFeuille>();
|
||||
boolean vide = true;
|
||||
historique Histo = null;
|
||||
String informationTriche = "";
|
||||
int nombreOccurrenceIdentiqueHistorique = 0;
|
||||
|
||||
static String EnsembleHistoriqueDesClasseurAnalyse = "";
|
||||
|
||||
public AnalyseClasseur() {
|
||||
|
||||
}
|
||||
|
||||
public void addFeuille(AnalyseFeuille AFeuil, Classeur2 clas) {
|
||||
classeur.add(AFeuil);
|
||||
vide=false;
|
||||
}
|
||||
|
||||
// pour les étudiants qui n'ont pas remis le bon sujet
|
||||
public void addHistorique(historique histo) {
|
||||
Histo = histo;
|
||||
}
|
||||
|
||||
|
||||
public List<AnalyseFeuille> getClasseur() {
|
||||
return classeur;
|
||||
}
|
||||
|
||||
public boolean isVide() {
|
||||
return vide;
|
||||
}
|
||||
|
||||
public historique getHisto() {
|
||||
return Histo;
|
||||
}
|
||||
|
||||
|
||||
public String getInformationTriche() {
|
||||
return informationTriche;
|
||||
}
|
||||
|
||||
public int getNombreOccurrenceIdentiqueHistorique() {
|
||||
return nombreOccurrenceIdentiqueHistorique;
|
||||
}
|
||||
|
||||
public static String getEnsembleHistoriqueDesClasseurAnalyse() {
|
||||
return EnsembleHistoriqueDesClasseurAnalyse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,674 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import AnalyseCalc.Classeur2.feuille;
|
||||
import AnalyseCalc.Classeur2.feuille.colonne;
|
||||
import AnalyseCalc.Classeur2.feuille.graphic;
|
||||
import AnalyseCalc.Classeur2.feuille.ligne;
|
||||
import AnalyseCalc.Classeur2.feuille.ligne.*;
|
||||
import outils.*;
|
||||
import outils.HTML;
|
||||
|
||||
public class AnalyseFeuille {
|
||||
|
||||
List<String> pl = new ArrayList<String>();
|
||||
private double point = 0;
|
||||
private double pointtotal = 0;
|
||||
private double propPoint = 0.0;
|
||||
private double poids = 1;
|
||||
private boolean evaluer = false;
|
||||
private HashMap<String,String> menu = new HashMap<String,String>();
|
||||
private TreeMap<String,sousTotal> sousTotaux = new TreeMap<String,sousTotal>();
|
||||
private String identifiantFeuille = "";
|
||||
|
||||
private boolean analyseVide = true;
|
||||
private String NomFeuille = "";
|
||||
|
||||
//Lorsque il n'y a pas de feuille student (feuille student null)
|
||||
public AnalyseFeuille(feuille feuilSujet, String id) {
|
||||
identifiantFeuille=id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Comparaison entre les deux feuilles
|
||||
public AnalyseFeuille(feuille feuilStudent, feuille feuilSujet, String id) throws UnsupportedEncodingException {
|
||||
|
||||
analyseVide=false;
|
||||
identifiantFeuille=id;
|
||||
|
||||
NomFeuille = feuilSujet.getNomFeuille();
|
||||
evaluer = Boolean.valueOf(feuilSujet.getEvaluer());
|
||||
poids = Double.valueOf(feuilSujet.getPoids());
|
||||
|
||||
|
||||
menu.put(identifiantFeuille, NomFeuille); // feuille dans le menu automatiquement
|
||||
|
||||
|
||||
pl.add(HTML.SautLigne(identifiantFeuille));
|
||||
pl.add(HTML.H1("Analyse de la feuille : " + NomFeuille.toUpperCase()));
|
||||
pl.add(HTML.Paragraph_classp8(feuilSujet.getCommunication()));
|
||||
if(!feuilSujet.getLink().isEmpty()) pl.add(HTML.SautPuisLien(feuilSujet.getLink(), feuilSujet.getLinktitle()));
|
||||
|
||||
outils o = new outils();
|
||||
o.initilisePointClass();
|
||||
sousTotaux.put(NomFeuille, new sousTotal(NomFeuille, o.getPointsClass(), o.getPointTotal(),identifiantFeuille));
|
||||
String Tst ="";
|
||||
|
||||
|
||||
// Nommage des cellules - titre et entete et menu automatique s'il y a le symbole ‽
|
||||
boolean flagNommageTitre=false;
|
||||
for(Entry<String, String> k : feuilSujet.getNommageCellulesFeuille().entrySet()) {
|
||||
if(Boolean.valueOf(k.getValue().contains("‽"))||Boolean.valueOf(k.getKey().contains("‽"))) {
|
||||
|
||||
if(!flagNommageTitre) {
|
||||
pl.add(HTML.SautLigne(identifiantFeuille+"ValeursGlobales"));
|
||||
pl.add(HTML.SautLigne());
|
||||
pl.add(HTML.H1("Valeurs globales"));
|
||||
pl.add(HTML.SautLigne());
|
||||
pl.add(HTML.TableEnteteTableur());
|
||||
flagNommageTitre=true;
|
||||
menu.put(identifiantFeuille+"ValeursGlobales","Valeurs globales");
|
||||
sousTotaux.put("Valeurs globales", new sousTotal("Valeurs globales", o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"ValeursGlobales"));
|
||||
}
|
||||
|
||||
String valueStudentValue = feuilStudent.getNommageCellulesFeuille().get(outils.withoutPoint(k.getKey()));
|
||||
|
||||
|
||||
Tst = o.Compare1(valueStudentValue, k.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"Nommage : <b>" + outils.withoutPoint(k.getKey()) + "</b>","Cells" ,valueStudentValue, outils.withoutPoint(k.getValue()), niveau) );
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(sousTotaux.get("Valeurs globales")!=null) sousTotaux.get("Valeurs globales").addPointSousTotal(o.getPointsClass(), o.getPointTotal());
|
||||
|
||||
|
||||
Tst="";
|
||||
// colonne
|
||||
for(Entry<Integer, colonne> k : feuilSujet.getColonnes().entrySet()) {
|
||||
for(Entry<String, String> k1 : k.getValue().getPropertiesColumn().entrySet()) {
|
||||
if(Boolean.valueOf(k1.getValue().contains("‽"))) {
|
||||
String RefC = k.getValue().getRefColonne();
|
||||
String RefCLettre = k.getValue().getRefColDansClasseur();
|
||||
colonne colStudent = feuilStudent.retourneColonne(RefC);
|
||||
|
||||
if(colStudent!=null) {
|
||||
String valueStudent = colStudent.getPropertiesColumn().get(k1.getKey());
|
||||
|
||||
Tst = o.Compare1(valueStudent, k1.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"Colonne :" + RefCLettre ,k1.getKey() ,valueStudent, outils.withoutPoint(k1.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("null", k1.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"Colonne :" + RefCLettre ,k1.getKey() ,"Colonne Student null", outils.withoutPoint(k1.getValue()), niveau) );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//comparaison Ligne, cellule
|
||||
for(Entry<Integer, ligne> k : feuilSujet.getLignes().entrySet()) {
|
||||
|
||||
|
||||
|
||||
//Ajoute un titre, un sous-titre et un entete si evaluer est true à la ligne
|
||||
if(Boolean.valueOf(k.getValue().getEvaluer()) || k.getValue().isSaut()) {
|
||||
pl.add(HTML.SautLigne(identifiantFeuille+"Ligne : " + k.getValue().getRefLigne()));
|
||||
pl.add(HTML.SautLigne());
|
||||
|
||||
if(!k.getValue().getTitre().isEmpty()) {
|
||||
if(k.getValue().getStyletitrePrincipale().equals("H1")) pl.add(HTML.H1(k.getValue().getTitre()));
|
||||
if(k.getValue().getStyletitrePrincipale().equals("H2")) pl.add(HTML.H2(k.getValue().getTitre()));
|
||||
if(k.getValue().getStyletitrePrincipale().equals("H3")) pl.add(HTML.SautLigneOnduleBleu(k.getValue().getTitre()));
|
||||
if(k.getValue().getStyletitrePrincipale().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge(k.getValue().getTitre()));
|
||||
}else {
|
||||
pl.add(HTML.H1("Ligne : " + k.getValue().getRefLigne()));
|
||||
}
|
||||
|
||||
pl.add(HTML.Paragraph_classp8(k.getValue().getCommunication()));
|
||||
|
||||
// si ce n'est pas un saut alors c'est evaluer donc entête et menu et soustotaux
|
||||
if(!k.getValue().isSaut()) {
|
||||
pl.add(HTML.TableEnteteTableur());
|
||||
if(k.getValue().getTitre().isEmpty()) menu.put(identifiantFeuille+"Ligne : " + k.getValue().getRefLigne(),"Ligne : " + k.getValue().getRefLigne() );
|
||||
if(!k.getValue().getTitre().isEmpty()) menu.put(identifiantFeuille+"Ligne : " + k.getValue().getRefLigne(),k.getValue().getTitre() );
|
||||
|
||||
// cloture sous total des lignes
|
||||
for(Entry<String,sousTotal> st : sousTotaux.entrySet()) {
|
||||
if( st.getKey().contains("Ligne") && !st.getValue().isFinish()) {
|
||||
st.getValue().addPointSousTotal(o.getPointsClass(), o.getPointTotal());;
|
||||
}
|
||||
}
|
||||
// nouveau soustotal
|
||||
if(k.getValue().getTitre().isEmpty()) {
|
||||
sousTotaux.put("Ligne : " + k.getValue().getRefLigne(), new sousTotal("Ligne : " + k.getValue().getRefLigne(), o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Ligne : " + k.getValue().getRefLigne()));
|
||||
}else {
|
||||
sousTotaux.put("Ligne : " + k.getValue().getRefLigne(), new sousTotal(k.getValue().getTitre(), o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Ligne : " + k.getValue().getRefLigne()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//ligne properties
|
||||
for(Entry<String, String> k1 : k.getValue().getPropertiesRow().entrySet()) {
|
||||
if(Boolean.valueOf(k1.getValue().contains("‽"))) {
|
||||
String RefL = k.getValue().getRefLigne();
|
||||
ligne ligStudent = feuilStudent.retourneLigne(RefL);
|
||||
String valueStudent ="null";
|
||||
if(ligStudent!=null) {
|
||||
valueStudent = ligStudent.getPropertiesRow().get(k1.getKey());
|
||||
}
|
||||
|
||||
Tst = o.Compare1(valueStudent, k1.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"Ligne :" + RefL ,k1.getKey() ,valueStudent, outils.withoutPoint(k1.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
|
||||
//Cellule
|
||||
for(Entry<Integer, cellule> k2 : k.getValue().getCellules().entrySet()) {
|
||||
String RefL = k2.getValue().getRefLigne();
|
||||
String RefC = k2.getValue().getRefColonne();
|
||||
String RefCLettre = k2.getValue().getRefColDansClasseur();
|
||||
|
||||
//Ajoute un titre, un sous-titre et un entete si evaluer est true
|
||||
if(Boolean.valueOf(k2.getValue().getEvaluer())) {
|
||||
if(k2.getValue().isMenu()) {
|
||||
if(k2.getValue().getTitre().isEmpty()) {
|
||||
menu.put(identifiantFeuille+"Cellule "+ RefCLettre + RefL,"Cellule "+ RefCLettre + RefL);
|
||||
}else {
|
||||
menu.put(identifiantFeuille+"Cellule "+ RefCLettre + RefL,k2.getValue().getTitre());
|
||||
}
|
||||
}
|
||||
|
||||
pl.add(HTML.SautLigne(identifiantFeuille+"Cellule "+ RefCLettre + RefL));
|
||||
pl.add(HTML.SautLigne());
|
||||
if(k2.getValue().getTitre().isEmpty()) {
|
||||
if(k2.getValue().getStyletitre().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H3")) pl.add(HTML.SautLigneOnduleBleu("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H2")) pl.add(HTML.H2("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H1")) pl.add(HTML.H1("Cellule : " + RefCLettre + RefL));
|
||||
}else {
|
||||
if(k2.getValue().getStyletitre().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H3")) pl.add(HTML.SautLigneOnduleBleu(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H2")) pl.add(HTML.H2(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H1")) pl.add(HTML.H1(k2.getValue().getTitre()));
|
||||
}
|
||||
|
||||
pl.add(HTML.TableEnteteTableur());
|
||||
if(k2.getValue().getTitre().isEmpty()) {
|
||||
sousTotaux.put("Cellule "+ RefCLettre + RefL, new sousTotal("Cellule "+ RefCLettre + RefL, o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Cellule "+ RefCLettre + RefL));
|
||||
}else {
|
||||
sousTotaux.put(k2.getValue().getTitre(), new sousTotal(k2.getValue().getTitre(), o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Cellule "+ RefCLettre + RefL));
|
||||
}
|
||||
}
|
||||
if(k2.getValue().isSaut() && !Boolean.valueOf(k2.getValue().getEvaluer())) {
|
||||
if(k2.getValue().getTitre().isEmpty()) {
|
||||
if(k2.getValue().getStyletitre().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H3")) pl.add(HTML.SautLigneOnduleBleu("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H2")) pl.add(HTML.H2("Cellule : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getStyletitre().equals("H1")) pl.add(HTML.H1("Cellule : " + RefCLettre + RefL));
|
||||
}else {
|
||||
if(k2.getValue().getStyletitre().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H3")) pl.add(HTML.SautLigneOnduleBleu(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H2")) pl.add(HTML.H2(k2.getValue().getTitre()));
|
||||
if(k2.getValue().getStyletitre().equals("H1")) pl.add(HTML.H1(k2.getValue().getTitre()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Propriétés de la cellule
|
||||
for(Entry<String, String> k3 : k2.getValue().getPropertiesCell().entrySet()) {
|
||||
|
||||
if(k3.getValue()!=null) if(Boolean.valueOf(k3.getValue().contains("‽"))) {
|
||||
|
||||
|
||||
cellule celStudent = feuilStudent.retourneCellule(Integer.valueOf(RefC), Integer.valueOf(RefL));
|
||||
String valueStudent = "null";
|
||||
if(celStudent!=null) valueStudent = celStudent.getPropertiesCell().get(k3.getKey());
|
||||
|
||||
Tst = o.Compare1(valueStudent, k3.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,RefCLettre+RefL ,k3.getKey() ,valueStudent, outils.withoutPoint(k3.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
|
||||
// boucle pour les validations
|
||||
for(Entry<String, String> k3 : k2.getValue().getPropertiesCell().entrySet()) {
|
||||
|
||||
//Validation (si la cellule possède une validation de données, le NomValidation n'est pas null)
|
||||
if(k3.getKey().equals("NomValidation")) {
|
||||
|
||||
//Ajoute un titre, un sous-titre et un entete si evaluer est true
|
||||
if(Boolean.valueOf(k2.getValue().getVal().isEvaluer())||k2.getValue().isSaut()){
|
||||
pl.add(HTML.SautLigne(identifiantFeuille+"Validation : " + RefCLettre + RefL));
|
||||
pl.add(HTML.SautLigne());
|
||||
if(k2.getValue().getVal().getStyletitre().equals("H4")) pl.add(HTML.SautLigneTitreOnduleRouge("Validation : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getVal().getStyletitre().equals("H3")) pl.add(HTML.SautLigneOnduleBleu("Validation : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getVal().getStyletitre().equals("H2")) pl.add(HTML.H2("Validation : " + RefCLettre + RefL));
|
||||
if(k2.getValue().getVal().getStyletitre().equals("H1")) pl.add(HTML.H1("Validation : " + RefCLettre + RefL));
|
||||
|
||||
if(!k2.getValue().isSaut()) {
|
||||
|
||||
pl.add(HTML.TableEnteteTableur());
|
||||
menu.put(identifiantFeuille+"Validation : " + RefCLettre + RefL,"Validation : " + RefCLettre + RefL);
|
||||
|
||||
sousTotaux.put("Validation "+ RefCLettre + RefL, new sousTotal("Validation "+ RefCLettre + RefL, o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Validation "+ RefCLettre + RefL));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
for(Entry<String, String> k4 : k2.getValue().getVal().getPropertiesValidation().entrySet()) {
|
||||
|
||||
|
||||
if(Boolean.valueOf(k4.getValue().contains("‽"))) {
|
||||
cellule celStudent = feuilStudent.retourneCellule(Integer.valueOf(RefC), Integer.valueOf(RefL));
|
||||
|
||||
// test si student possède une validation pas vide
|
||||
if(!celStudent.getVal().isEmpty()) {
|
||||
String valueStudent = celStudent.getVal().getPropertiesValidation().get(k4.getKey());
|
||||
|
||||
Tst = o.Compare1(valueStudent, k4.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,RefCLettre+RefL ,k4.getKey() ,valueStudent, outils.withoutPoint(k4.getValue()), niveau) );
|
||||
}
|
||||
|
||||
// test si student possède une validation vide
|
||||
if(celStudent.getVal().isEmpty()){
|
||||
Tst = o.Compare1("null", k4.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,RefCLettre+RefL ,k4.getKey() ,"null", outils.withoutPoint(k4.getValue()), niveau) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if(sousTotaux.get("Validation "+ RefCLettre + RefL)!=null) sousTotaux.get("Validation "+ RefCLettre + RefL).addPointSousTotal(o.getPointsClass(), o.getPointTotal());
|
||||
} // fin de la boucle pour les validation
|
||||
if(k2.getValue().getTitre().isEmpty()) {
|
||||
if(sousTotaux.get("Cellule "+ RefCLettre + RefL)!=null) sousTotaux.get("Cellule "+ RefCLettre + RefL).addPointSousTotal(o.getPointsClass(), o.getPointTotal());
|
||||
}else {
|
||||
if(sousTotaux.get(k2.getValue().getTitre())!=null) sousTotaux.get(k2.getValue().getTitre()).addPointSousTotal(o.getPointsClass(), o.getPointTotal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}// Fin de la boucle de la ligne
|
||||
// cloture de précendent sous total de la ligne
|
||||
for(Entry<String,sousTotal> st : sousTotaux.entrySet()) {
|
||||
if( st.getKey().contains("Ligne") && !st.getValue().isFinish()) {
|
||||
st.getValue().addPointSousTotal(o.getPointsClass(), o.getPointTotal());;
|
||||
}
|
||||
}
|
||||
|
||||
// Les graphiques
|
||||
for(Entry<Integer, graphic> k1 : feuilSujet.getGraphics().entrySet()) {
|
||||
//ajoute un entête
|
||||
if(Boolean.valueOf(k1.getValue().getEvaluer())){
|
||||
String Titre = outils.withoutPoint(k1.getValue().getTitreGraphique());
|
||||
pl.add(HTML.SautLigne(identifiantFeuille+"Graph : "+ k1.getValue().getTitreAfficherFeedBack()));
|
||||
pl.add(HTML.SautLigne());
|
||||
pl.add(HTML.H1("Graphique : " + k1.getValue().getTitreAfficherFeedBack() ));
|
||||
if(!k1.getValue().getCommunication().isEmpty()) pl.add(HTML.Paragraph_classp8(k1.getValue().getCommunication()));
|
||||
pl.add(HTML.H2("Paramètre(s) du graphique : " + k1.getValue().getTitreAfficherFeedBack()));
|
||||
pl.add(HTML.TableEnteteTableur());
|
||||
menu.put(identifiantFeuille+"Graph : "+ k1.getValue().getTitreAfficherFeedBack(),"Graph : "+k1.getValue().getTitreAfficherFeedBack());
|
||||
|
||||
sousTotaux.put("Graph : "+ k1.getValue().getTitreAfficherFeedBack(), new sousTotal("Graph : "+k1.getValue().getTitreAfficherFeedBack(), o.getPointsClass(), o.getPointTotal(),identifiantFeuille+"Graph : "+ k1.getValue().getTitreAfficherFeedBack()));
|
||||
|
||||
String TitreNettoyer = outils.NetTexte(Titre, "");
|
||||
graphic graphicStudent = feuilStudent.retourneGraphicByName(TitreNettoyer);
|
||||
|
||||
|
||||
//propriétés du graphique
|
||||
for(Entry<String,String> k2 : k1.getValue().getPropertiesGraphic().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent =graphicStudent.getPropertiesGraphic().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#AA20FF\"><b><u>Propriété du graphique</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#AA20FF\"><b><u>Propriété du graphique</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin propriétés du graphique
|
||||
|
||||
//titre du graphique
|
||||
for(Entry<String,String> k2 : k1.getValue().getTitre().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getTitre().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#FF20AA\"><b><u>Titre</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#FF20AA\"><b><u>Titre</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
|
||||
//sous-titre du graphique
|
||||
for(Entry<String,String> k2 : k1.getValue().getSoustitre().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getSoustitre().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#20BB20\"><b><u>Sous-titre</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#20BB20\"><b><u>Sous-titre</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
|
||||
//aire du graphique
|
||||
for(Entry<String,String> k2 : k1.getValue().getAiregraphic().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getAiregraphic().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#20BBFF\"><b><u>Aire du graphique</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#20BBFF\"><b><u>Aire du graphique</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
|
||||
|
||||
//Axe principal X
|
||||
for(Entry<String,String> k2 : k1.getValue().getAxeXprincipal().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getAxeXprincipal().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#0010EE\"><b><u>Axe principal X</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#0010EE\"><b><u>Axe principal X</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}//fin axeX du graphique
|
||||
|
||||
for(Entry<String,String> k2 : k1.getValue().getAxeYprincipal().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getAxeYprincipal().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#BB1090\"><b><u>Axe principal Y</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#BB1090\"><b><u>Axe principal Y</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin axeY du graphique
|
||||
|
||||
|
||||
// Axe X secondaire
|
||||
for(Entry<String,String> k2 : k1.getValue().getAxeXsecondaire().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getAxeXsecondaire().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#404080\"><b><u>Axe secondaire X</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#404080\"><b><u>Axe secondaire X</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
// axe secondaire Y
|
||||
for(Entry<String,String> k2 : k1.getValue().getAxeYsecondaire().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getAxeYsecondaire().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#800080\"><b><u>Axe secondaire Y</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#800080\"><b><u>Axe secondaire Y</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
// series
|
||||
for(Entry<String,String> k2 : k1.getValue().getSeries().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getSeries().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#8000FF\"><b><u>Série de données</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#8000FF\"><b><u>Série de données</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
|
||||
|
||||
|
||||
|
||||
// legend
|
||||
for(Entry<String,String> k2 : k1.getValue().getLegend().entrySet()){
|
||||
if(k2.getValue().contains("‽")) {
|
||||
|
||||
if(graphicStudent!=null) {
|
||||
String valueStudent = graphicStudent.getLegend().get(k2.getKey());
|
||||
Tst = o.Compare1(valueStudent, k2.getValue());
|
||||
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#408040\"><b><u>Legende</u></b> : </span>\r" ,k2.getKey() ,valueStudent, outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}else {
|
||||
Tst = o.Compare1("Pas d'objet graphique", k2.getValue());
|
||||
int niveau = 3;
|
||||
if(Tst.contains("Correct")) niveau = 1;
|
||||
if(Tst.contains("Erreur")) niveau = 2;
|
||||
pl.add(HTML.TableTableur(Tst,"<span style=\"color:#408040\"><b><u>Legende</u></b> : </span>\r" ,k2.getKey() ,"Pas d'objet graphique", outils.withoutPoint(k2.getValue()), niveau) );
|
||||
}
|
||||
}
|
||||
}//fin
|
||||
|
||||
if(sousTotaux.get("Graph : "+ k1.getValue().getTitreAfficherFeedBack())!=null) sousTotaux.get("Graph : "+ k1.getValue().getTitreAfficherFeedBack()).addPointSousTotal(o.getPointsClass(), o.getPointTotal());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
point=o.getPointsClass();
|
||||
pointtotal=o.getPointTotal();
|
||||
propPoint = o.getPropClass();
|
||||
|
||||
sousTotaux.get(NomFeuille).addPointSousTotal(point, pointtotal);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public TreeMap<String, sousTotal> getSousTotaux() {
|
||||
return sousTotaux;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getPl() {
|
||||
return pl;
|
||||
}
|
||||
|
||||
public void setPl(List<String> pl) {
|
||||
this.pl = pl;
|
||||
}
|
||||
|
||||
public double getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void setPoint(int point) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public double getPointtotal() {
|
||||
return pointtotal;
|
||||
}
|
||||
|
||||
public void setPointtotal(int pointtotal) {
|
||||
this.pointtotal = pointtotal;
|
||||
}
|
||||
|
||||
public double getPropPoint() {
|
||||
return propPoint;
|
||||
}
|
||||
|
||||
public void setPropPoint(double propPoint) {
|
||||
this.propPoint = propPoint;
|
||||
}
|
||||
|
||||
public double getPoids() {
|
||||
return poids;
|
||||
}
|
||||
|
||||
public void setPoids(double poids) {
|
||||
this.poids = poids;
|
||||
}
|
||||
|
||||
public boolean isEvaluer() {
|
||||
return evaluer;
|
||||
}
|
||||
|
||||
public void setEvaluer(boolean evaluer) {
|
||||
this.evaluer = evaluer;
|
||||
}
|
||||
|
||||
public HashMap<String,String> getMenu() {
|
||||
return menu;
|
||||
}
|
||||
|
||||
public boolean isAnalyseVide() {
|
||||
return analyseVide;
|
||||
}
|
||||
|
||||
public void setAnalyseVide(boolean analyseVide) {
|
||||
this.analyseVide = analyseVide;
|
||||
}
|
||||
|
||||
public String getIdentifiantFeuille() {
|
||||
return identifiantFeuille;
|
||||
}
|
||||
|
||||
public String getNomFeuille() {
|
||||
return NomFeuille;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,234 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class AnalyseHisto {
|
||||
|
||||
private HashMap<nodeAC,String> Correspondance = new HashMap<nodeAC,String>();
|
||||
private HashMap<nodeAC,Integer> CorrespondancesTotal = new HashMap<nodeAC,Integer>();
|
||||
private HashMap<nodeAC,String> CorrespondancesDate = new HashMap<nodeAC,String>();
|
||||
private HashMap<nodeAC,String> CopyDate = new HashMap<nodeAC,String>();
|
||||
private HashMap<nodeAC,Integer> NbrModificationDate = new HashMap<nodeAC,Integer>();
|
||||
private HashMap<nodeAC,String> CorrespondancesCopier = new HashMap<nodeAC,String>();
|
||||
|
||||
public AnalyseHisto() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// public AnalyseHisto(Run a, Boolean createBaseHisto, Classeur2 Sujet) throws IOException {
|
||||
//
|
||||
// // create base historique
|
||||
// String EnsembleHistoriqueDesClasseurAnalyse="";
|
||||
// ArrayList<nodeAC> LesHistorique = new ArrayList<nodeAC>();
|
||||
//
|
||||
// for(int i=0;i<a.getEC().getListeHistoriqueTableur().size();i++) {
|
||||
// EnsembleHistoriqueDesClasseurAnalyse = EnsembleHistoriqueDesClasseurAnalyse + a.getEC().getListeHistoriqueTableur().get(i) + "\n\n";
|
||||
// nodeAC n = a.XMLContent2(a.getEC().getListeHistoriqueTableur().get(i)).get(0);
|
||||
// LesHistorique.add(n);
|
||||
// }
|
||||
// createBaseHistorique(a.getPatch(),EnsembleHistoriqueDesClasseurAnalyse);
|
||||
//
|
||||
// // initialisation du compteur de correspondance pour chaque fichier
|
||||
// for(int i=0;i < LesHistorique.size();i++) {
|
||||
// if(LesHistorique.get(i).getAttributs().get("name")!=null) {
|
||||
// Correspondance.put(LesHistorique.get(i), "");
|
||||
// CorrespondancesTotal.put(LesHistorique.get(i), 0);
|
||||
// CorrespondancesDate.put(LesHistorique.get(i), "");
|
||||
// CopyDate.put(LesHistorique.get(i), "");
|
||||
// NbrModificationDate.put(LesHistorique.get(i), 0);
|
||||
// CorrespondancesCopier.put(LesHistorique.get(i), "");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// LocalDateTime datetime1 = LocalDateTime.of(2017, 1, 14, 10, 34);
|
||||
// LocalDateTime datetime2 = datetime1.plusDays(120);
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// // analyse des historiques
|
||||
// for(int j=0;j<LesHistorique.size();j++) {
|
||||
//
|
||||
// String nameStudent1 = LesHistorique.get(j).getAttributs().get("name");
|
||||
// ArrayList<nodeAC> HistoStudent1 = a.XMLName(LesHistorique.get(j).getNodes(),"table:cell-content-change");
|
||||
// String laDatePrecedent1 = "?";
|
||||
// String laDatePrecedent2 = "?";
|
||||
//
|
||||
//
|
||||
//
|
||||
// //test
|
||||
// ZonedDateTime zonedDateTime = null;
|
||||
//
|
||||
//
|
||||
// int NbrCopy = 0 ;
|
||||
// int NbrModif = 0 ;
|
||||
// long L1 = 0 ;
|
||||
// long L2 = 0 ;
|
||||
//
|
||||
// String copierKey1 = "";
|
||||
// String copierKey2 = "";
|
||||
// String messageDepart ="";
|
||||
// String UneDateStudent1precedente ="";
|
||||
// boolean messageDeaprtMis = false;
|
||||
//
|
||||
// String Idprecedent = "";
|
||||
// for(int i1 = 0 ; i1 < HistoStudent1.size(); i1++) {
|
||||
// String Id = HistoStudent1.get(i1).getAttributs().get("table:id");
|
||||
//
|
||||
// String UneDateStudent1 = a.XMLFirstName(HistoStudent1.get(i1),"dc:date").getContenu();
|
||||
// datetime1 = LocalDateTime.parse(UneDateStudent1);
|
||||
// zonedDateTime = ZonedDateTime.of(datetime1, ZoneId.systemDefault());
|
||||
// L1 = zonedDateTime.toInstant().toEpochMilli();
|
||||
//
|
||||
// nodeAC celladdress = a.XMLFirstName(HistoStudent1.get(i1),"table:cell-address");
|
||||
// String refStudent1 = "table:column=\"" + celladdress.getAttributs().get("table:column")+ "\" "
|
||||
// + "table:row=\"" + celladdress.getAttributs().get("table:row")+ "\" "
|
||||
// + "table:table=\"" + celladdress.getAttributs().get("table:table") + "\" ";
|
||||
//
|
||||
//
|
||||
// // nombre de modification et nombre de cellule modifiées simultanément
|
||||
// if(L1 < L2 ) {
|
||||
// NbrCopy++;
|
||||
//
|
||||
// for(Entry<String,String> key :Sujet.Modif.getModif().entrySet()) {
|
||||
// if(key.getValue().contains(refStudent1)) {
|
||||
// if(copierKey1.isEmpty()) { copierKey1 = key.getKey();} else {copierKey2 = key.getKey();}
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(!copierKey1.isEmpty() && copierKey1.equals(copierKey2) && !messageDepart.isEmpty()) {
|
||||
// if( Sujet.Modif.getMessage().get(refStudent1)!=null && messageDeaprtMis) {
|
||||
// CorrespondancesCopier.put(LesHistorique.get(j), CorrespondancesCopier.get(LesHistorique.get(j)) + " [( " + UneDateStudent1precedente + " ≈ " + UneDateStudent1 +" ) ( " + Idprecedent + " et " + Id + " ) " + Sujet.Modif.getMessage().get(refStudent1) + "]" );
|
||||
// }
|
||||
// if( Sujet.Modif.getMessage().get(refStudent1)!=null && !messageDeaprtMis) {
|
||||
// CorrespondancesCopier.put(LesHistorique.get(j), CorrespondancesCopier.get(LesHistorique.get(j)) + " [( " + UneDateStudent1precedente + " ≈ " + UneDateStudent1 +" ) ( " + Idprecedent + " et " + Id + " ) " + messageDepart+ " "+ Sujet.Modif.getMessage().get(refStudent1) + "]" );
|
||||
// messageDeaprtMis=true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }else {
|
||||
// CopyDate.put(LesHistorique.get(j), CopyDate.get(LesHistorique.get(j)) + " " + NbrCopy );
|
||||
// NbrCopy = 0 ;
|
||||
// NbrModif++;
|
||||
// copierKey1 = "";
|
||||
// copierKey2 = "";
|
||||
// messageDeaprtMis = false;
|
||||
// messageDepart="";
|
||||
// UneDateStudent1precedente="";
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// for(Entry<String,String> key :Sujet.Modif.getModif().entrySet()) {
|
||||
// if(key.getValue().contains(refStudent1)) {
|
||||
// copierKey1 = key.getKey();
|
||||
// messageDepart = Sujet.Modif.getMessage().get(refStudent1);
|
||||
// Idprecedent = Id;
|
||||
// UneDateStudent1precedente = UneDateStudent1;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// L2 = L1 + 500; // ajoute 0.5 seconde intervalle de temps entre deux modifications manuelles
|
||||
//
|
||||
// NbrModificationDate.put(LesHistorique.get(j), NbrModif);
|
||||
//
|
||||
// System.out.println( j + "/" + LesHistorique.size() + " " + i1 + "/" +HistoStudent1.size() + " "+nameStudent1 + " date = " + UneDateStudent1 );
|
||||
//
|
||||
// for(int k = j+1 ; k < LesHistorique.size(); k++) {
|
||||
//
|
||||
// String nameStudent2 = LesHistorique.get(k).getAttributs().get("name");
|
||||
// String HistoDateStudent2 = a.RetourTousLesDesNodes(a.XMLName(LesHistorique.get(k).getNodes(),"dc:date"));
|
||||
//
|
||||
// // Première boucle de recherche, directement les dates
|
||||
// if(HistoDateStudent2.contains(UneDateStudent1)) {
|
||||
//
|
||||
// // Trouve une date de student1 qui correspond à une date de student2
|
||||
// // Recherche le Node du student2
|
||||
// ArrayList<nodeAC> HistoStudent2 = a.XMLName(LesHistorique.get(k).getNodes(),"table:cell-content-change");
|
||||
// for(int k1 = 0 ; k1 < HistoStudent2.size(); k1++) {
|
||||
// String UneDateStudent2 = a.XMLFirstName(HistoStudent2.get(k1), "dc:date").getContenu();
|
||||
//
|
||||
// if(UneDateStudent2.equals(UneDateStudent1)){
|
||||
// //trouve le nodeAC de student2
|
||||
// nodeAC address2 = a.XMLFirstName(HistoStudent2.get(k1), "table:cell-address");
|
||||
// String RefStudent2 = "col=" + address2.getAttributs().get("table:column") + " row=" + address2.getAttributs().get("table:row") + " feuil=" + address2.getAttributs().get("table:table");
|
||||
//
|
||||
// nodeAC address1 = a.XMLFirstName(HistoStudent1.get(i1), "table:cell-address");
|
||||
// String RefStudent1 = "col=" + address1.getAttributs().get("table:column") + " row=" + address1.getAttributs().get("table:row") + " feuil=" + address1.getAttributs().get("table:table");
|
||||
//
|
||||
// if(RefStudent2.equals(RefStudent1)){
|
||||
// // Correspondance total
|
||||
// Correspondance.put(LesHistorique.get(j), Correspondance.get(LesHistorique.get(j)) + " (" +nameStudent1 +"=" + nameStudent2+") ");
|
||||
// CorrespondancesTotal.put(LesHistorique.get(j) , CorrespondancesTotal.get(LesHistorique.get(j))+1);
|
||||
// CorrespondancesDate.put(LesHistorique.get(j), CorrespondancesDate.get(LesHistorique.get(j))+ " (date=" + UneDateStudent1 + " " + RefStudent1 + ") ");
|
||||
//
|
||||
// Correspondance.put(LesHistorique.get(k), Correspondance.get(LesHistorique.get(k)) + " (" +nameStudent1 +"=" + nameStudent2+") ");
|
||||
// CorrespondancesTotal.put(LesHistorique.get(k) , CorrespondancesTotal.get(LesHistorique.get(k))+1);
|
||||
// CorrespondancesDate.put(LesHistorique.get(k), CorrespondancesDate.get(LesHistorique.get(k))+ " (date=" + UneDateStudent1 + " " + RefStudent1 + ") ");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// System.out.println("\t\t"+nameStudent1 + " fin.");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// System.getProperty("file.encoding","UTF-8");
|
||||
// Path outputFilePath = Paths.get(a.getPatch() + "/" +"CorrespondanceHistorique.csv");
|
||||
// BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
// fichier.write("name;mise en jeu etudiant ; nombre de correspondance ; reference correspondance ; nombre de cellules simultanement modifiee ; nombre de modification ; copier et coller interdit ; pénalité");
|
||||
// for (Entry<nodeAC, String> j : Correspondance.entrySet()) {
|
||||
// fichier.newLine();
|
||||
// fichier.write(j.getKey().getAttributs().get("name") + ";" + j.getValue() + ";"+ CorrespondancesTotal.get(j.getKey()) + ";"+ CorrespondancesDate.get(j.getKey()) + ";" + CopyDate.get(j.getKey()) + ";" + NbrModificationDate.get(j.getKey()) + ";" + CorrespondancesCopier.get(j.getKey()));
|
||||
// }
|
||||
// fichier.close();
|
||||
//
|
||||
// System.out.println("\tFin de l'analyse de l'historique");
|
||||
// }
|
||||
|
||||
|
||||
public static void createBaseHistorique(String patch, String EnsembleHistoriqueDesClasseurAnalyse ) throws IOException {
|
||||
System.getProperty("file.encoding","UTF-8");
|
||||
|
||||
Path outputFilePath = Paths.get(patch + "/baseHistorique.xml");
|
||||
BufferedWriter fichier = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
|
||||
|
||||
fichier.write(EnsembleHistoriqueDesClasseurAnalyse);
|
||||
fichier.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class ObjejctGraphic {
|
||||
|
||||
public ObjejctGraphic(String nomFeuille, nodeAC nodeGraphic) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,287 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import AnalyseCalc.Classeur2.feuille;
|
||||
import calc.commandes;
|
||||
import nodeAC.Ecriture;
|
||||
import nodeAC.LecturesDossiers;
|
||||
import nodeAC.constructionNodeAvecString;
|
||||
import nodeAC.nodeAC;
|
||||
import outils.feedback;
|
||||
import outils.notation;
|
||||
|
||||
public class analyseCalc {
|
||||
|
||||
|
||||
static DecimalFormat df = new DecimalFormat("###.##");
|
||||
static String patch ="C:/";
|
||||
static String SousVersion="0.1";
|
||||
|
||||
|
||||
static boolean ecritCode = false; // ecriture du code du sujet
|
||||
static boolean ecritNoteCSV = false; // ecriture note.csv
|
||||
static boolean sansFeeback = false; // pas de feedback étudiant
|
||||
static boolean exporteCodeSujet =false; // exporte le code d'un sujet
|
||||
static boolean avecfichieranalyse = false; //fournie un fichier d'analyse
|
||||
static String fichierAnalyse = "cc1chg.xml"; //nom du fichier d'analyse
|
||||
static boolean pasdelogo = false; //pas de logo dans le feddback
|
||||
static boolean analyseDossier = false; //par défaut chaque étudiant est dans un dossier Moodle
|
||||
static boolean annule = false; // annule l'analyse
|
||||
static boolean verifhisto = false; // vérification des historique avec une base de données XML
|
||||
static boolean creerhisto = false; // génnère une base de données XML en utilisant une fichier d'analyse
|
||||
static String fichierBaseHistorique = "baseHistorique.xml"; //nom par défaut à la création d'une base de données historique
|
||||
static String fichierResource = "format1"; // fichier par défaut de la ressource
|
||||
static boolean menupasdynamic = false; // pas de menu sticky
|
||||
//
|
||||
// public static void main(String[] args) throws Exception {
|
||||
//
|
||||
//
|
||||
// System.getProperty("file.encoding","UTF-8");
|
||||
//// Version = Run.UserStatus.ECRITURE_FILE_TABLEUR_CORRECTION;
|
||||
// SousVersion="0.0.1 - 03 octobre 2020"; // version et date
|
||||
// patch = System.getProperty("user.dir");
|
||||
//// patch = "C:/Users/pabr6/Downloads/teste/";
|
||||
//
|
||||
//
|
||||
//
|
||||
// // annulation
|
||||
// if(annule) {
|
||||
// messageDernier();
|
||||
// System.exit(0);
|
||||
// }
|
||||
//
|
||||
// // Message initiale
|
||||
// messagePremier();
|
||||
//
|
||||
//
|
||||
// //Lecture des fichiers student ou de la correction
|
||||
// System.out.println("\tDébut la lecture de l'ensemble des dossiers et/ou fichiers des étudiants");
|
||||
// new LecturesDossiers(Ecriture.LocationFile.DansDossier, commandes.path);
|
||||
//
|
||||
//
|
||||
// int NbrSujet = LecturesDossiers.getEC().getSize();
|
||||
// if(!ecritCode) System.out.println("\r\tFin de la lecture de l'ensemble des dossiers et fichiers des étudiants ... nombre de dossiers étudiants : " + NbrSujet);
|
||||
//
|
||||
// // ecriture du code d'un fichier
|
||||
// if(ecritCode) {
|
||||
// System.out.println("\r\tFin de la lecture du fichier corrigé");
|
||||
// if(LecturesDossiers.getEC().getListeFichierods().size()==0) {
|
||||
// System.out.println("\r\tIl n'y a pas de fichier \".ods\" dans le répertoire de l'application.");
|
||||
// System.exit(0);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// System.out.println();
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// // Chargement sujet
|
||||
// Classeur2 Sujet=null;
|
||||
// if(!ecritCode) {
|
||||
// if(avecfichieranalyse) {
|
||||
// System.out.println("\tDébut du chargement du sujet ... fichier d'analyse : " + fichierAnalyse);
|
||||
// Sujet = new Classeur2(fichierAnalyse);
|
||||
// }
|
||||
// if(!avecfichieranalyse && !fichierResource.isEmpty()) {
|
||||
// System.out.println("\tDébut du chargement du sujet ... sujet ressource : " + fichierResource);
|
||||
// Sujet = new Classeur2(fichierResource,false );
|
||||
// }
|
||||
// if(!avecfichieranalyse && fichierResource.isEmpty()) {
|
||||
// System.out.println("\tQuelle est le fichier ressource ... sujet!?");
|
||||
// System.exit(0);
|
||||
// }
|
||||
// System.out.println("\tChargement du sujet terminé (fichier d'analyse).");
|
||||
// System.out.println();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Verification de l'historique
|
||||
//
|
||||
//
|
||||
//
|
||||
// // boucle d'analyse
|
||||
// for(int i = 0 ; i<LecturesDossiers.getEC().getSize();i++) {
|
||||
// System.out.println("\tAnalyse");
|
||||
// if(!ecritCode) System.out.println("\t\tDossier de l'étudiant : "+LecturesDossiers.getEC().getListeNomDossier().get(i));
|
||||
// System.out.println("\t\tNom du fichier : "+LecturesDossiers.getEC().getListeFichierods().get(i));
|
||||
// System.out.println();
|
||||
//
|
||||
// // Obtient le XMLContent de Calc de l'étudiant
|
||||
// System.out.println("\t\tAmorçage de l'analyse (parse xml)");
|
||||
// System.out.println();
|
||||
// nodeAC XMLContent = new nodeAC();
|
||||
// constructionNodeAvecString A = new constructionNodeAvecString();
|
||||
// XMLContent = A.NewNode(LecturesDossiers.getEC().getListeContentTableur().get(i));
|
||||
// System.out.println("\t\tAmorçage terminé");
|
||||
// System.out.println();
|
||||
//
|
||||
// //Lecture du classeur de Student
|
||||
// System.out.println("\t\tDébut lecture du fichier : "+LecturesDossiers.getEC().getListeFichierods().get(i));
|
||||
// Classeur2 Student = new Classeur2(XMLContent,i);
|
||||
// System.out.println("\t\tLecture terminée");
|
||||
// System.out.println();
|
||||
//
|
||||
// // générère le fichier d'analyse
|
||||
// if(ecritCode) {
|
||||
// System.out.println("\t\tDébut écriture du fichier d'analyse : \"codeFichier.xml\"");
|
||||
// Student.ecritureClasseur(patch);
|
||||
// System.out.println("\t\tEcriture du fichier d'analyse terminée.");
|
||||
// System.out.println();
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// if(!ecritCode && !verifhisto) {
|
||||
// //Verification du fichier (sujet)
|
||||
// System.out.println("\t\tDébut vérification du classeur");
|
||||
// verifsujet verif = new verifsujet(Student,Sujet);
|
||||
// if(verif.isSujetClasseurVerifier()) System.out.println("\t\tVérification terminée : " + verif.isSujetClasseurVerifier());
|
||||
// if(!verif.isSujetClasseurVerifier()) System.out.println("\t\tCe n'est pas le bon classeur ... l'analyse de ce classeur ne pourra pas être réalisée.");
|
||||
// System.out.println();
|
||||
//
|
||||
//
|
||||
//
|
||||
// AnalyseClasseur AClas = new AnalyseClasseur();
|
||||
// AClas.addHistorique(Student.getHisto());
|
||||
//
|
||||
// if(verif.isSujetClasseurVerifier()) {
|
||||
// //créer une analyse pour chaque feuille de calcul
|
||||
// for (Entry<Integer, feuille> k : Sujet.getFeuilles().entrySet()) {
|
||||
// if(k.getValue().getEvaluer().equals("true")) {
|
||||
// //une feuille évaluée
|
||||
// feuille feuilleSujet = k.getValue();
|
||||
// feuille feuilleStudent = Student.retourneFeuilleByName(k.getValue().getNomFeuille());
|
||||
// if(feuilleStudent!=null) {
|
||||
// System.out.println("\t\tDébut de l'analyse --> feuille : " + k.getValue().getNomFeuille() );
|
||||
// AnalyseFeuille AFeuil = new AnalyseFeuille(feuilleStudent, feuilleSujet,"A"+Integer.valueOf(k.getKey()));
|
||||
// AClas.addFeuille(AFeuil,Student);
|
||||
// System.out.println("\t\tAnalyse feuille terminée.");
|
||||
// System.out.println();
|
||||
// }else {
|
||||
// // Si la feuille est supprime
|
||||
// System.out.println("\t\tLa feuille \""+ k.getValue().getNomFeuille()+"\" n'existe pas dans le classeur de l'étudiant.");
|
||||
// verifsujet.addMessageVerifClasseur("\t\tLa feuille \""+ k.getValue().getNomFeuille()+"\" n'existe pas dans le classeur de l'étudiant. Vous l'avez supprimé ou vous l'avez renommé.");
|
||||
// AnalyseFeuille AFeuil = new AnalyseFeuille(feuilleSujet,"A"+Integer.valueOf(k.getKey()));
|
||||
// AClas.addFeuille(AFeuil,Student);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// if(AClas.isVide()) {
|
||||
// // Il n'y a pas d'analyse
|
||||
// System.out.println("\t\tErreur, l'analyse n'a pas pu se faire. Vérifier votre fichier d'analyse, il faut au moins une feuille à évaluer.");
|
||||
// System.out.println();
|
||||
// }else {
|
||||
// if(!sansFeeback) {
|
||||
// System.out.println("\t\tDébut d'écriture du feedback étudiant.");
|
||||
// String fichierAnalyseXML = "";
|
||||
// if(avecfichieranalyse) fichierAnalyseXML = fichierAnalyse;
|
||||
// if(!avecfichieranalyse) fichierAnalyseXML = fichierResource + ".xml";
|
||||
// feedback feedB = new feedback();
|
||||
// String noteStudent = feedB.FeedBack(patch, LecturesDossiers.getEC().getListeNomDossier().get(i),
|
||||
// LecturesDossiers.getEC().getListeFichierods().get(i), Sujet, verif,
|
||||
// ecritNoteCSV, AClas, pasdelogo, fichierAnalyseXML, menupasdynamic);
|
||||
//
|
||||
// if(!AClas.getHisto().isTriche()) {
|
||||
// System.out.println("\t\tfeedback terminée et sauvegardé au format HTML. ... note : " + noteStudent + "/" + calc.commandes.analyse_bareme);
|
||||
// }else {
|
||||
// System.out.println("\t\tfeedback terminée et sauvegardé au format HTML. ... note : " + noteStudent + " */" + calc.commandes.analyse_bareme);
|
||||
// System.out.println("\t\t\t * Nombre de correspondance : " + AClas.getNombreOccurrenceIdentiqueHistorique() + "*");
|
||||
// }
|
||||
// System.out.println();
|
||||
// }
|
||||
// if(ecritNoteCSV && sansFeeback) {
|
||||
// notation note = new notation(verif.isSujetClasseurVerifier(),ecritNoteCSV,LecturesDossiers.getEC().getListeNomDossier().get(i), AClas);
|
||||
// System.out.println("La note est de : " + note.getNote() + "/" + calc.commandes.analyse_bareme);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// }else { // ce n'est pas le bon classeur, mais il faut une note
|
||||
//
|
||||
// if(!sansFeeback) {
|
||||
// System.out.println("\t\tDébut d'écriture du feedback étudiant.");
|
||||
// String fichierAnalyseXML = "";
|
||||
// if(avecfichieranalyse) fichierAnalyseXML = fichierAnalyse;
|
||||
// if(!avecfichieranalyse) fichierAnalyseXML = fichierResource + ".xml";
|
||||
//
|
||||
//
|
||||
//
|
||||
// feedback feedB = new feedback();
|
||||
// feedB.FeedBack(patch, LecturesDossiers.getEC().getListeNomDossier().get(i), LecturesDossiers.getEC().getListeFichierods().get(i), Sujet, verif,
|
||||
// ecritNoteCSV, AClas, pasdelogo, fichierAnalyseXML, menupasdynamic);
|
||||
//
|
||||
// System.out.println("\t\tfeedback terminée et sauvegardé au format HTML. ... note : 0.00/" + calc.commandes.analyse_bareme);
|
||||
// System.out.println();
|
||||
// }
|
||||
// if(ecritNoteCSV && sansFeeback) {
|
||||
// notation note = new notation(verif.isSujetClasseurVerifier(),ecritNoteCSV,LecturesDossiers.getEC().getListeNomDossier().get(i), AClas);
|
||||
// System.out.println("La note est de : " + note.getNote() + "/" + calc.commandes.analyse_bareme);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }// boucle d'analyse
|
||||
//
|
||||
//// if(creerhisto) AnalyseClasseur.createBaseHistorique(patch);
|
||||
//
|
||||
// if(ecritNoteCSV) notation.publieNotesCSV(patch);
|
||||
// messageDernier();
|
||||
// }
|
||||
//
|
||||
|
||||
/**
|
||||
* Premier message sur la console
|
||||
*/
|
||||
private static void messagePremier() {
|
||||
// Message préliminaire
|
||||
System.out.println();
|
||||
System.out.println ("╔════════════════════════════════════════════════════════╗");
|
||||
System.out.println ("║ Analyse des fichiers LibreOffice Calc ║");
|
||||
System.out.println ("║ Version juin 2020 - Licence GPLv3.0 ║");
|
||||
|
||||
System.out.println ("║ Ecriture ║");
|
||||
System.out.println ("╚════════════════════════════════════════════════════════╝");
|
||||
System.out.println ("\tLe répertoire courant est : " + patch);
|
||||
if(analyseDossier)System.out.println ("\tChaque fichier d'étudiant est dans un dossier : " + analyseDossier);
|
||||
if(analyseDossier)System.out.println ("\tTous les fichiers d'étudiant sont dans le répertoire courant : " + analyseDossier);
|
||||
System.out.println();
|
||||
System.out.println ("\tImportation des notes dans le fichier \"notes.csv\" : " + ecritNoteCSV);
|
||||
System.out.println ("\tEcriture d'un fichier d'analyse \"codeFichier.xml\" : " + ecritCode);
|
||||
System.out.println ("\tUn fichier d'analyse est fourni dans le répertoire courant: " + avecfichieranalyse);
|
||||
if(avecfichieranalyse) System.out.println ("\tNom du fichier d'analyse : " + fichierAnalyse);
|
||||
System.out.println ("\tPas de feedback : " + sansFeeback);
|
||||
if(!sansFeeback)System.out.println ("\tAffiche le logo de l'université d'Artois dans le feedback : " + pasdelogo);
|
||||
System.out.println();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Dernier message sur la console
|
||||
*/
|
||||
private static void messageDernier() {
|
||||
System.out.println();
|
||||
System.out.println ("╔══════════════════════════════════════════════════════════════════╗");
|
||||
System.out.println ("╚══════════════════════════════════════════════════════════════════╝");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,96 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
public class sousTotal {
|
||||
|
||||
private String nomObject="";
|
||||
private double pointInit =0;
|
||||
private double pointTotalInit=0;
|
||||
private double pointFinal =0;
|
||||
private double pointTotalFinal=0;
|
||||
@SuppressWarnings("unused")
|
||||
private double proport=0;
|
||||
private String id ="";
|
||||
private boolean finish=false;
|
||||
|
||||
public sousTotal(String nom, double point, double pointTotal, String identifiant) {
|
||||
nomObject=nom;
|
||||
pointInit=point;
|
||||
pointTotalInit = pointTotal;
|
||||
id= identifiant;
|
||||
}
|
||||
|
||||
//finish le soustotal
|
||||
public void addPointSousTotal(double point, double pointTotal) {
|
||||
pointFinal=point;
|
||||
pointTotalFinal= pointTotal;
|
||||
finish=true;
|
||||
}
|
||||
|
||||
public String getNomObject() {
|
||||
return nomObject;
|
||||
}
|
||||
|
||||
public void setNomObject(String nomObject) {
|
||||
this.nomObject = nomObject;
|
||||
}
|
||||
|
||||
public double getPointInit() {
|
||||
return pointInit;
|
||||
}
|
||||
|
||||
public void setPointInit(double pointInit) {
|
||||
this.pointInit = pointInit;
|
||||
}
|
||||
|
||||
public double getPointTotalInit() {
|
||||
return pointTotalInit;
|
||||
}
|
||||
|
||||
public void setPointTotalInit(double pointTotalInit) {
|
||||
this.pointTotalInit = pointTotalInit;
|
||||
}
|
||||
|
||||
public double getPointFinal() {
|
||||
return pointFinal;
|
||||
}
|
||||
|
||||
public void setPointFinal(double pointFinal) {
|
||||
this.pointFinal = pointFinal;
|
||||
}
|
||||
|
||||
public double getPointTotalFinal() {
|
||||
return pointTotalFinal;
|
||||
}
|
||||
|
||||
public void setPointTotalFinal(double pointTotalFinal) {
|
||||
this.pointTotalFinal = pointTotalFinal;
|
||||
}
|
||||
|
||||
public double getProport() {
|
||||
double ecartPoint = pointFinal - pointInit;
|
||||
double ecartPointTotal = pointTotalFinal - pointTotalInit;
|
||||
if(ecartPointTotal>0) return ecartPoint/ecartPointTotal;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setProport(double proport) {
|
||||
this.proport = proport;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String nombreErreur() {
|
||||
double ecartPoint = pointFinal - pointInit;
|
||||
double ecartPointTotal = pointTotalFinal - pointTotalInit;
|
||||
return String.valueOf(ecartPoint - ecartPointTotal);
|
||||
}
|
||||
|
||||
public boolean isFinish() {
|
||||
return finish;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package AnalyseCalc;
|
||||
|
||||
/**
|
||||
* Verification du classeur
|
||||
* @author Pablo
|
||||
*
|
||||
*/
|
||||
public class verifsujet {
|
||||
private boolean sujetClasseurVerifier = false;
|
||||
static String messageErreurVerif="";
|
||||
|
||||
public verifsujet(Classeur2 student, Classeur2 sujet) {
|
||||
|
||||
// la verification du fichier n'est pas demandé alors la varaible est vrai
|
||||
if(!sujet.isVerification()) {
|
||||
sujetClasseurVerifier=true;
|
||||
}
|
||||
|
||||
messageErreurVerif="";
|
||||
if(student.getMetaSujet()!=null) {
|
||||
if(student.getMetaSujet().equals(sujet.getMetaSujet())) {
|
||||
if(student.getMetaSujetContent().equals(sujet.getMetaSujetContent())) {
|
||||
if(student.getNbreFeuille()==sujet.getNbreFeuille()) {
|
||||
sujetClasseurVerifier = true;
|
||||
}else {
|
||||
System.out.println("\t\tIl y a " + student.getNbreFeuille() + " feuilles dans le classeur, au lieu de " + sujet.getNbreFeuille() + " feuilles.\n\t\tLe nombre de feuille dans ce classeur ne correspond pas.");
|
||||
}
|
||||
}else {
|
||||
System.out.println("\t\tLa métadonnée ne correspond pas.");
|
||||
|
||||
}
|
||||
}else {
|
||||
System.out.println("\t\tLe nom de la méta-données a été changé.");
|
||||
}
|
||||
}else {
|
||||
System.out.println("\t\tLa méta-données a été supprimée.");
|
||||
}
|
||||
|
||||
if(!sujetClasseurVerifier) {
|
||||
if(student.getNbreFeuille()!=sujet.getNbreFeuille()) {
|
||||
addMessageVerifClasseur("\t\tIl y a " + student.getNbreFeuille() + " feuilles dans le classeur, au lieu de " + sujet.getNbreFeuille() + " feuilles.\n\t\tLe nombre de feuille dans ce classeur ne correspond pas.");
|
||||
// liste des feuilles dans le classeur de l'étudiant.
|
||||
for(int i=0;i<student.getFeuilles().size();i++) {
|
||||
addMessageVerifClasseur("<br/> Nom de la feuille dans le classeur étudiant : " + student.getFeuilles().get(i).getNomFeuille());
|
||||
if(student.getFeuilles().get(i).getNomFeuille().contains("file:")) {
|
||||
addMessageVerifClasseur("<br/><br/> Réalisation d'un copier_coller à partir d'un classeur .... note nulle.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(student.getMetaSujet()==null) {
|
||||
addMessageVerifClasseur("<br/><br/> La méta-données a été supprimée. Remettre le nom de la métadonnées et sa valeur dans le menu Fichier>Propriétés...>Propriétés personnalisées.<br/>"
|
||||
+ " Regarder dans un fichier fourni par l'enseignant (le fichier vide à compléter).\r\n");
|
||||
}else {
|
||||
if(!student.getMetaSujetContent().equals(sujet.getMetaSujetContent())) {
|
||||
addMessageVerifClasseur("<br/><br/> La métadonnée ne correspond pas. Modifier la valeur de la métadonnées dans les le menu Fichier>Propriétés...>Propriétés personnalisées.\r\n");
|
||||
addMessageVerifClasseur("<br/><br/> Si ce n'est pas le nombre de feuille et si ce n'est pas la méta-données ... alors c'est une erreur de sujet.\r\n");
|
||||
}
|
||||
if(!student.getMetaSujet().equals(sujet.getMetaSujet())) {
|
||||
addMessageVerifClasseur("<br/><br/> Le nom de la méta-données a été changée. Modifier le nom de la métadonnées dans le menu Fichier>Propriétés...>Propriétés personnalisées.\r\n");
|
||||
addMessageVerifClasseur("<br/><br/> Si ce n'est pas le nombre de feuille et si ce n'est pas la méta-données ... alors c'est une erreur de sujet.\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public boolean isSujetClasseurVerifier() {
|
||||
return sujetClasseurVerifier;
|
||||
}
|
||||
|
||||
public static void addMessageVerifClasseur(String message) {
|
||||
if(messageErreurVerif.isEmpty()) {
|
||||
messageErreurVerif = message;
|
||||
}else {
|
||||
messageErreurVerif = messageErreurVerif + "\n" +message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void initialiseMessage() {
|
||||
messageErreurVerif="";
|
||||
}
|
||||
|
||||
public void setSujetClasseurVerifier(boolean sujetClasseurVerifier) {
|
||||
this.sujetClasseurVerifier = sujetClasseurVerifier;
|
||||
}
|
||||
|
||||
public static String getMessageErreurVerif() {
|
||||
return messageErreurVerif;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,332 @@
|
||||
package calc;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.attribute.AclEntry.Builder;
|
||||
|
||||
import javax.swing.JTree;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pablo rodriguez
|
||||
*
|
||||
*/
|
||||
public class commandes {
|
||||
|
||||
//** LenodeAC du fichier d'analyse
|
||||
public static nodeAC sujet = new nodeAC();
|
||||
public static nodeAC sujetSauvegarde = new nodeAC();
|
||||
public static JTree tree = new JTree();
|
||||
public static nodeAC nodeACCSV = null;
|
||||
|
||||
//**version
|
||||
public static String version ="V1.0.0"; // La version actuelle
|
||||
public static String branch = "Origin";
|
||||
public static String Annee ="2022";
|
||||
|
||||
//***************************************************
|
||||
//** Les commandes par défaut à travers la console **
|
||||
//***************************************************
|
||||
public static String nameSujet = ""; //sujet par défaut
|
||||
public static boolean analyse = false; //analyse des fichiers étudiants
|
||||
public static boolean ecritCode = false; // -write : ecriture du code du sujet
|
||||
public static boolean ecritSujet = false; // -sujet : ecriture 2 du code du sujet, uniquement lesnodeACs évalués
|
||||
public static boolean ecritNodeAnalyse = false;
|
||||
public static boolean ecritNoteCSV = false; // ecriture note.csv
|
||||
public static boolean writefiles = false; // -writefiles permet d'écrire tous les fichiers XML après la lecture ennodeAC
|
||||
public static boolean calculLeHashDuFichier = false; // -hash retourne le hash du fichier d'analyse
|
||||
public static boolean sansFeeback = false; // pas de feedback étudiant
|
||||
public static boolean verifHisto = false; // vérification des historiques correspond à la commande -verif
|
||||
public static boolean verifHisto2 = false; // vérification des historiques lorsqu'il y a aussi analyse
|
||||
public static boolean fourniCSV = false; // fourni le fichier CSV contenant la liste des étudiants
|
||||
public static boolean badCommand = false ; //erreur dans les commandes
|
||||
public static boolean noNote =false; // pas de note dans les feedbacks
|
||||
public static boolean noLogo =false; // pas de logo dans les feedbacks
|
||||
public static boolean newLogo=false; // un nouveau logo dans le feedback
|
||||
public static boolean licence = false; // affiche la licence
|
||||
public static boolean zipfeedback = false; // Les feedback dans une archive ZIP
|
||||
public static boolean fichierStudentMoodle = false; // Les fichiers étudiants sont directement dans le dossier courant de l'application.
|
||||
public static boolean fourniDossierDestination = false; //répertoire de destination des feedbacks et CSV;
|
||||
public static String nameCSV = ""; //le nom du fichier contenant la liste des étudiants
|
||||
public static String nameSVG =""; //le nom du nouveau logo
|
||||
public static String contenuFichierSVG =""; // Le nouveau logo
|
||||
public static String path ="";
|
||||
public static String pathDestination =""; //Pour le mode console uniquement
|
||||
public static String nomDeLaBranch = "Origin"; //Branche de développement
|
||||
public static String Command =""; //récupère le texte de la commande dans la console
|
||||
|
||||
//** setting valeur par défaut
|
||||
public static String culture = "FR";
|
||||
public static int tolerance_characters = 5;
|
||||
public static double tolerance_text = 0.79;
|
||||
public static int number_match = 2;
|
||||
public static int mini_number_modification = 0;
|
||||
public static int nombres_modifications_simultané_maxi = 100;
|
||||
public static int tolerance_rouge = 30;
|
||||
public static int tolerance_vert = 30;
|
||||
public static int tolerance_bleu = 30;
|
||||
|
||||
//** Variables de mise à jour du fichier d'analyse
|
||||
public static boolean MAJnameAnalysisFile =false;
|
||||
public static boolean MAJFichierAnalyse = false;
|
||||
public static String hash ="0";
|
||||
|
||||
//** Variables du fichier d'analyse
|
||||
public static String analyse_culture = "FR";
|
||||
public static String analyse_metaSujet="";
|
||||
public static String analyse_auteur="";
|
||||
public static String analyse_Initial_Creator="";
|
||||
public static String analyse_version="";
|
||||
public static String analyse_creationDate="";
|
||||
public static String analyse_titre="";
|
||||
public static String analyse_link_sujet="";
|
||||
public static String analyse_link_help="";
|
||||
public static String analyse_date="";
|
||||
public static boolean analyse_historiquePresent=false;
|
||||
public static boolean analyse_presenceMetaSujet=false;
|
||||
public static boolean analyse_controleDateCreation=false;
|
||||
public static boolean analyse_controle_Initial_Creator=false;
|
||||
public static boolean analyse_baremeABC=false;
|
||||
public static double analyse_progression=1;
|
||||
public static double analyse_bareme=20;
|
||||
public static int analyse_tolerance_characters = 5;
|
||||
public static double analyse_tolerance_text = 0.79;
|
||||
public static int analyse_number_match = 2;
|
||||
public static int analyse_mini_number_modification = 0;
|
||||
public static int analyse_nombres_modifications_simultané_maxi = 100;
|
||||
public static int analyse_tolerance_rouge = 30;
|
||||
public static int analyse_tolerance_vert = 30;
|
||||
public static int analyse_tolerance_bleu = 30;
|
||||
public static long analyse_size = 48000000;
|
||||
public static String analyse_nameZip = "feedbackMoodle";
|
||||
public static String analyse_hash = "";
|
||||
public static String analysis_filename = "";
|
||||
public static int analysis_nbr_feuilles = 0;
|
||||
public static String analysis_producteur = "";
|
||||
|
||||
|
||||
//** Variables pour l'interface du logiciel
|
||||
public static String Titre = "analyseCalc";
|
||||
public static String PathFilenameAnalysis="";
|
||||
public static boolean fichierAnalyseValide = false; //mise à jour de la valeur dans MEPTL.verificationFichierAnalyse
|
||||
public static int analyse_Nbre_Fichier_Student = 0;
|
||||
public static int analyse_index_Fichier_Student = 0;
|
||||
public static StringBuilder message = new StringBuilder();
|
||||
|
||||
|
||||
public static void initialiseCommandes() {
|
||||
|
||||
|
||||
//** LenodeAC du fichier d'analyse
|
||||
sujet = new nodeAC();
|
||||
sujetSauvegarde = new nodeAC();
|
||||
tree = new JTree();
|
||||
nodeACCSV = null;
|
||||
|
||||
//**version
|
||||
version ="V1.0.0"; // La version actuelle
|
||||
branch = "Origin";
|
||||
Annee ="2022";
|
||||
|
||||
//***************************************************
|
||||
//** Les commandes par défaut à travers la console **
|
||||
//***************************************************
|
||||
nameSujet = ""; //sujet par défaut
|
||||
analyse = false; //analyse des fichiers étudiants
|
||||
ecritCode = false; // -write : ecriture du code du sujet
|
||||
ecritSujet = false; // -sujet : ecriture 2 du code du sujet, uniquement lesnodeACs évalués
|
||||
ecritNodeAnalyse = false;
|
||||
ecritNoteCSV = false; // ecriture note.csv
|
||||
writefiles = false; // -writefiles permet d'écrire tous les fichiers XML après la lecture ennodeAC
|
||||
calculLeHashDuFichier = false; // -hash retourne le hash du fichier d'analyse
|
||||
sansFeeback = false; // pas de feedback étudiant
|
||||
verifHisto = false; // vérification des historiques correspond à la commande -verif
|
||||
verifHisto2 = false; // vérification des historiques lorsqu'il y a aussi analyse
|
||||
fourniCSV = false; // fourni le fichier CSV contenant la liste des étudiants
|
||||
badCommand = false ; //erreur dans les commandes
|
||||
noNote =false; // pas de note dans les feedbacks
|
||||
noLogo =false; // pas de logo dans les feedbacks
|
||||
newLogo=false; // un nouveau logo dans le feedback
|
||||
licence = false; // affiche la licence
|
||||
zipfeedback = false; // Les feedback dans une archive ZIP
|
||||
fichierStudentMoodle = false; // Les fichiers étudiants sont directement dans le dossier courant de l'application.
|
||||
fourniDossierDestination = false; //répertoire de destination des feedbacks et CSV;
|
||||
nameCSV = ""; //le nom du fichier contenant la liste des étudiants
|
||||
nameSVG =""; //le nom du nouveau logo
|
||||
contenuFichierSVG =""; // Le nouveau logo
|
||||
path ="";
|
||||
pathDestination =""; //Pour le mode console uniquement
|
||||
nomDeLaBranch = "Origin"; //Branche de développement
|
||||
Command =""; //récupère le texte de la commande dans la console
|
||||
|
||||
//** setting valeur par défaut
|
||||
culture = "FR";
|
||||
tolerance_characters = 5;
|
||||
tolerance_text = 0.79;
|
||||
number_match = 2;
|
||||
mini_number_modification = 0;
|
||||
nombres_modifications_simultané_maxi = 100;
|
||||
tolerance_rouge = 30;
|
||||
tolerance_vert = 30;
|
||||
tolerance_bleu = 30;
|
||||
|
||||
//** Variables de mise à jour du fichier d'analyse
|
||||
MAJnameAnalysisFile =false;
|
||||
MAJFichierAnalyse = false;
|
||||
hash ="0";
|
||||
|
||||
//** Variables du fichier d'analyse
|
||||
analyse_culture = "FR";
|
||||
analyse_metaSujet="";
|
||||
analyse_auteur="";
|
||||
analyse_Initial_Creator="";
|
||||
analyse_version="";
|
||||
analyse_creationDate="";
|
||||
analyse_titre="";
|
||||
analyse_link_sujet="";
|
||||
analyse_link_help="";
|
||||
analyse_date="";
|
||||
analyse_historiquePresent=false;
|
||||
analyse_presenceMetaSujet=false;
|
||||
analyse_controleDateCreation=false;
|
||||
analyse_controle_Initial_Creator=false;
|
||||
analyse_baremeABC=false;
|
||||
analyse_progression=1;
|
||||
analyse_bareme=20;
|
||||
analyse_tolerance_characters = 5;
|
||||
analyse_tolerance_text = 0.79;
|
||||
analyse_number_match = 2;
|
||||
analyse_mini_number_modification = 0;
|
||||
analyse_nombres_modifications_simultané_maxi = 100;
|
||||
analyse_tolerance_rouge = 30;
|
||||
analyse_tolerance_vert = 30;
|
||||
analyse_tolerance_bleu = 30;
|
||||
analyse_size = 48000000;
|
||||
analyse_nameZip = "feedbackMoodle";
|
||||
analyse_hash = "";
|
||||
analysis_filename = "";
|
||||
analysis_nbr_feuilles = 0;
|
||||
analysis_producteur = "";
|
||||
|
||||
|
||||
//** Variables pour l'interface du logiciel
|
||||
Titre = "analyseCalc";
|
||||
PathFilenameAnalysis="";
|
||||
fichierAnalyseValide = false; //mise à jour de la valeur dans MEPTL.verificationFichierAnalyse
|
||||
analyse_Nbre_Fichier_Student = 0;
|
||||
analyse_index_Fichier_Student = 0;
|
||||
message = new StringBuilder();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clôture avec une erreur de commande
|
||||
*/
|
||||
public static void clotureWithError() {
|
||||
System.out.println();
|
||||
System.out.println("\t\t┌─────────────────────────────────────────────┐");
|
||||
System.out.println("\t\t│ Vous avez commis une erreur dans votre │");
|
||||
System.out.println("\t\t│ commande. │");
|
||||
System.out.println("\t\t│ │");
|
||||
System.out.println("\t\t│ Lisez les informations ci-dessus et │");
|
||||
System.out.println("\t\t│ recommencez. │");
|
||||
System.out.println("\t\t│ │");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( `.° ) │");
|
||||
System.out.println("\t\t│ (\")__(\") .. à bientôt, analyseWriter. │");
|
||||
System.out.println("\t\t└─────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bye Bye the application
|
||||
*/
|
||||
public static void clotureApplication() {
|
||||
System.out.println();
|
||||
System.out.println("\t\t┌────────────────────────────────────────────────────┐");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( `.° ) Bravo, vous avez travaillé très dur! │");
|
||||
System.out.println("\t\t│ (\")__(\") ... Bye Bye analyseWriter. │");
|
||||
System.out.println("\t\t└────────────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
commandes.message.append("\n (')_(')");
|
||||
commandes.message.append("\n ( `.° ) Bravo, vous avez travaillé très dur!");
|
||||
commandes.message.append("\n (\")__(\") ... Bye Bye analyseWriter.");
|
||||
commandes.message.append("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static void clotureApplicationAvecErreur() {
|
||||
System.out.println();
|
||||
System.out.println("\t\t┌────────────────────────────────────────────────────┐");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( ;.; ) Une erreur c'est produite. │");
|
||||
System.out.println("\t\t│ (\")__(\") ... Bye Bye analyseWriter. │");
|
||||
System.out.println("\t\t└────────────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void clotureWithHelp() {
|
||||
System.out.println();
|
||||
System.out.println("\t\t┌─────────────────────────────────────────────────────┐");
|
||||
System.out.println("\t\t│ Au-dessus, vous avez la liste des commandes. │");
|
||||
System.out.println("\t\t│ Mais vous avez aussi la documentation sur le │");
|
||||
System.out.println("\t\t│ le serveur de github ou chapril. │");
|
||||
System.out.println("\t\t│ │");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( `.° ) │");
|
||||
System.out.println("\t\t│ (\")__(\") .. à bientôt, analyseWriter. │");
|
||||
System.out.println("\t\t└─────────────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
System.exit(0);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public static void clotureWithErrorFile(String filename) {
|
||||
int nbespace = 30-filename.length();
|
||||
if (nbespace<0) nbespace=1;
|
||||
System.out.println();
|
||||
System.out.println("\t\t┌───────────────────────────────────────────────────────────┐");
|
||||
System.out.println("\t\t│ Le fichier \""+ filename + "\" n'existe pas." + new String(new char[nbespace]).replace("\0", " ") +"│" );
|
||||
System.out.println("\t\t│ │");
|
||||
System.out.println("\t\t│ (')_(') │");
|
||||
System.out.println("\t\t│ ( `.° ) │");
|
||||
System.out.println("\t\t│ (\")__(\") .. see you soon, analyseWriter. │");
|
||||
System.out.println("\t\t└───────────────────────────────────────────────────────────┘");
|
||||
System.out.println();
|
||||
|
||||
commandes.message.append("\n");
|
||||
commandes.message.append("\n*************************");
|
||||
commandes.message.append("\nERREUR Le fichier \""+ filename + "\" n'existe pas.");
|
||||
commandes.message.append("\n*************************");
|
||||
commandes.message.append("\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Nettoyage de la console.<br/>
|
||||
* <br/>
|
||||
* @throws InterruptedException
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void CLS() throws InterruptedException, IOException {
|
||||
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package calcul;
|
||||
|
||||
public class StringSimilarity {
|
||||
/**
|
||||
* Calculates the similarity (a number within 0 and 1) between two strings.
|
||||
*/
|
||||
public static double similarity(String s1, String s2) {
|
||||
String longer = s1, shorter = s2;
|
||||
if (s1.length() < s2.length()) { // longer should always have greater length
|
||||
longer = s2; shorter = s1;
|
||||
}
|
||||
int longerLength = longer.length();
|
||||
if (longerLength == 0) { return 1.0; /* both strings are zero length */ }
|
||||
/* // If you have StringUtils, you can use it to calculate the edit distance:
|
||||
return (longerLength - StringUtils.getLevenshteinDistance(longer, shorter)) /
|
||||
(double) longerLength; */
|
||||
return (longerLength - editDistance(longer, shorter)) / (double) longerLength;
|
||||
|
||||
}
|
||||
|
||||
// Example implementation of the Levenshtein Edit Distance
|
||||
// See http://r...content-available-to-author-only...e.org/wiki/Levenshtein_distance#Java
|
||||
public static int editDistance(String s1, String s2) {
|
||||
s1 = s1.toLowerCase();
|
||||
s2 = s2.toLowerCase();
|
||||
|
||||
int[] costs = new int[s2.length() + 1];
|
||||
for (int i = 0; i <= s1.length(); i++) {
|
||||
int lastValue = i;
|
||||
for (int j = 0; j <= s2.length(); j++) {
|
||||
if (i == 0)
|
||||
costs[j] = j;
|
||||
else {
|
||||
if (j > 0) {
|
||||
int newValue = costs[j - 1];
|
||||
if (s1.charAt(i - 1) != s2.charAt(j - 1))
|
||||
newValue = Math.min(Math.min(newValue, lastValue),
|
||||
costs[j]) + 1;
|
||||
costs[j - 1] = lastValue;
|
||||
lastValue = newValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i > 0)
|
||||
costs[s2.length()] = lastValue;
|
||||
}
|
||||
return costs[s2.length()];
|
||||
}
|
||||
|
||||
public static void printSimilarity(String s, String t) {
|
||||
System.out.println(String.format(
|
||||
"%.3f is the similarity between \"%s\" and \"%s\"", similarity(s, t), s, t));
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package calcul;
|
||||
|
||||
public class calculIntervalleBaremeABCDE {
|
||||
|
||||
String messageHTMLColonne="";
|
||||
String messageHTMLLigne="";
|
||||
String messageLigne="";
|
||||
String messageColonne="";
|
||||
|
||||
double intervalle1;
|
||||
double intervalle2;
|
||||
double intervalle3;
|
||||
double intervalle4;
|
||||
|
||||
public calculIntervalleBaremeABCDE(Double progression) {
|
||||
|
||||
this.intervalle1 = Math.pow(0.2, 1/progression) ;
|
||||
this.intervalle2 = Math.pow(0.4, 1/progression) ;
|
||||
this.intervalle3 = Math.pow(0.6, 1/progression) ;
|
||||
this.intervalle4 = Math.pow(0.8, 1/progression) ;
|
||||
|
||||
|
||||
this.messageHTMLColonne = "<html>E=[0% → " + Math.round(intervalle1*100) + "%[<br>"
|
||||
+"D=["+ Math.round(this.intervalle1*100) + " → " + Math.round(this.intervalle2*100) + "%[<br>"
|
||||
+"C=["+ Math.round(this.intervalle2*100) + " → " + Math.round(this.intervalle3*100) + "%[<br>"
|
||||
+"B=["+ Math.round(this.intervalle3*100) + " → " + Math.round(this.intervalle4*100) + "%[<br>"
|
||||
+"A=["+ Math.round(this.intervalle4*100) +" → 100%[</html>";
|
||||
|
||||
this.messageHTMLLigne= "<html>E=[0% → " + Math.round(intervalle1*100) + "%["
|
||||
+"D=["+ Math.round(this.intervalle1*100) + " → " + Math.round(this.intervalle2*100) + "%["
|
||||
+"C=["+ Math.round(this.intervalle2*100) + " → " + Math.round(this.intervalle3*100) + "%["
|
||||
+"B=["+ Math.round(this.intervalle3*100) + " → " + Math.round(intervalle4*100) + "%["
|
||||
+"A=["+ Math.round(this.intervalle4*100) +"→ 100%[</html>";
|
||||
|
||||
this.messageLigne= "E=[0% → " + Math.round(intervalle1*100) + "%["
|
||||
+"D=["+ Math.round(this.intervalle1*100) + " → " + Math.round(this.intervalle2*100) + "%[ "
|
||||
+"C=["+ Math.round(this.intervalle2*100) + " → " + Math.round(this.intervalle3*100) + "%[ "
|
||||
+"B=["+ Math.round(this.intervalle3*100) + " → " + Math.round(intervalle4*100) + "%[ "
|
||||
+"A=["+ Math.round(this.intervalle4*100) +" → 100%[";
|
||||
|
||||
this.messageLigne= "E=[0% → " + Math.round(intervalle1*100) + "%[\n"
|
||||
+"D=["+ Math.round(this.intervalle1*100) + " → " + Math.round(this.intervalle2*100) + "%[\n"
|
||||
+"C=["+ Math.round(this.intervalle2*100) + " → " + Math.round(this.intervalle3*100) + "%[\n"
|
||||
+"B=["+ Math.round(this.intervalle3*100) + " → " + Math.round(intervalle4*100) + "%[\n"
|
||||
+"A=["+ Math.round(this.intervalle4*100) +" → 100%[";
|
||||
|
||||
}
|
||||
|
||||
public String getMessageHTMLColonne() {
|
||||
return messageHTMLColonne;
|
||||
}
|
||||
|
||||
public void setMessageHTMLColonne(String messageHTMLColonne) {
|
||||
this.messageHTMLColonne = messageHTMLColonne;
|
||||
}
|
||||
|
||||
public String getMessageHTMLLigne() {
|
||||
return messageHTMLLigne;
|
||||
}
|
||||
|
||||
public void setMessageHTMLLigne(String messageHTMLLigne) {
|
||||
this.messageHTMLLigne = messageHTMLLigne;
|
||||
}
|
||||
|
||||
public String getMessageLigne() {
|
||||
return messageLigne;
|
||||
}
|
||||
|
||||
public void setMessageLigne(String messageLigne) {
|
||||
this.messageLigne = messageLigne;
|
||||
}
|
||||
|
||||
public String getMessageColonne() {
|
||||
return messageColonne;
|
||||
}
|
||||
|
||||
public void setMessageColonne(String messageColonne) {
|
||||
this.messageColonne = messageColonne;
|
||||
}
|
||||
|
||||
public double getIntervalle1() {
|
||||
return intervalle1;
|
||||
}
|
||||
|
||||
public void setIntervalle1(double intervalle1) {
|
||||
this.intervalle1 = intervalle1;
|
||||
}
|
||||
|
||||
public double getIntervalle2() {
|
||||
return intervalle2;
|
||||
}
|
||||
|
||||
public void setIntervalle2(double intervalle2) {
|
||||
this.intervalle2 = intervalle2;
|
||||
}
|
||||
|
||||
public double getIntervalle3() {
|
||||
return intervalle3;
|
||||
}
|
||||
|
||||
public void setIntervalle3(double intervalle3) {
|
||||
this.intervalle3 = intervalle3;
|
||||
}
|
||||
|
||||
public double getIntervalle4() {
|
||||
return intervalle4;
|
||||
}
|
||||
|
||||
public void setIntervalle4(double intervalle4) {
|
||||
this.intervalle4 = intervalle4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package calcul;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.swing.JOptionPane;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class calculNombrePointEvaluation {
|
||||
|
||||
/**
|
||||
* Ensemble des points dans les différents node principaux.
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<String> calculPointDansToutExercice(){
|
||||
ArrayList<String> ListeNodeEvaluer = new ArrayList<String>();;
|
||||
for(int i = 0 ; i < calc.commandes.sujet.getNodes().size();i++) {
|
||||
if(!calc.commandes.sujet.getNodes().get(i).getNomElt().equals("setting")) {
|
||||
ListeNodeEvaluer.add(calc.commandes.sujet.getNodes().get(i).getNomElt() + " " +
|
||||
String.valueOf(calculNombreDepoint(calc.commandes.sujet.getNodes().get(i), 0)) + " " +
|
||||
String.valueOf(calc.commandes.sujet.getNodes().get(i).getAttributs().get("poids")));
|
||||
}
|
||||
}
|
||||
return ListeNodeEvaluer;
|
||||
}
|
||||
|
||||
|
||||
public static int calculNombreDepoint(nodeAC nod, int point) {
|
||||
|
||||
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")){
|
||||
if(nod.getAttributs().get("allContent")!=null) {
|
||||
Pattern pt = Pattern.compile("[0-9]{1,}$");
|
||||
Matcher match= pt.matcher(nod.getAttributs().get("allContent"));
|
||||
if(match.find()) {
|
||||
String s= match.group();
|
||||
try {
|
||||
point = point + Integer.valueOf(s);
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut allContent");
|
||||
}
|
||||
System.out.println("match point pour allcontent = " + s);
|
||||
}
|
||||
}
|
||||
|
||||
if(nod.getAttributs().get("evalNameInitialCreator")!=null) {
|
||||
try {
|
||||
point = point + Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator"));
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameInitialCreator");
|
||||
}
|
||||
}
|
||||
|
||||
if(nod.getAttributs().get("evalNameCreator")!=null) {
|
||||
try {
|
||||
point = point + Integer.valueOf(nod.getAttributs().get("evalNameCreator"));
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator");
|
||||
}
|
||||
}
|
||||
|
||||
if(nod.getAttributs().get("evalNameNode")!=null) {
|
||||
try {
|
||||
point = point + Integer.valueOf(nod.getAttributs().get("evalNameNode"));
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator");
|
||||
}
|
||||
}
|
||||
|
||||
Set<String> key = nod.getAttributs().keySet();
|
||||
for (String k : key) {
|
||||
if(nod.getAttributs().get(k).contains("‽")||nod.getAttributs().get(k).contains("‼")) {
|
||||
Pattern pt = Pattern.compile("[0-9]{1,}$");
|
||||
Matcher match= pt.matcher(nod.getAttributs().get(k));
|
||||
if(match.find()) {
|
||||
String s= match.group();
|
||||
try {
|
||||
point = point + Integer.valueOf(s);
|
||||
} catch (Exception e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut "+ k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0 ; i < nod.getNodes().size();i++) {
|
||||
if(nod.getNodes().get(i)!=null) {
|
||||
point = calculNombreDepoint(nod.getNodes().get(i), point);
|
||||
}
|
||||
}
|
||||
}
|
||||
return point;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package calcul;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class calculNotesProgression {
|
||||
String messageHTMLColonne="";
|
||||
String messageHTMLLigne="";
|
||||
String messageLigne="";
|
||||
String messageColonne="";
|
||||
|
||||
double Note25pourcent;
|
||||
double Note50pourcent;
|
||||
double Note75pourcent;
|
||||
|
||||
|
||||
public calculNotesProgression(Double progression, Double noteFrom) {
|
||||
double Note25pourcent = Math.pow(0.25, progression)*noteFrom ;
|
||||
double Note50pourcent = Math.pow(0.5, progression)*noteFrom ;
|
||||
double Note75pourcent = Math.pow(0.75, progression)*noteFrom ;
|
||||
DecimalFormat f = new DecimalFormat("#00.00");
|
||||
|
||||
this.messageHTMLColonne = "<html>00% correct → 00.00 / "+ noteFrom + "<br>"
|
||||
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + "<br>"
|
||||
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + "<br>"
|
||||
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + "<br>"
|
||||
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "<html>";
|
||||
|
||||
this.messageHTMLLigne = "<html>00% correct → 00.00 / "+ noteFrom + ""
|
||||
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "<html>";
|
||||
|
||||
this.messageLigne = "00% correct → 00.00 / "+ noteFrom + ""
|
||||
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + " ; "
|
||||
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "";
|
||||
|
||||
this.messageColonne = "00% correct → 00.00 / "+ noteFrom + "\n"
|
||||
+ "25% correct → "+ f.format(Note25pourcent) + " / "+ noteFrom + "\n"
|
||||
+ "50% correct → "+ f.format(Note50pourcent) + " / "+ noteFrom + "\n"
|
||||
+ "75% correct → "+ f.format(Note75pourcent) + " / "+ noteFrom + "\n"
|
||||
+ "100% correct → "+ f.format(noteFrom) + " / "+ noteFrom + "";
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getMessageHTMLColonne() {
|
||||
return messageHTMLColonne;
|
||||
}
|
||||
|
||||
|
||||
public void setMessageHTMLColonne(String messageHTMLColonne) {
|
||||
this.messageHTMLColonne = messageHTMLColonne;
|
||||
}
|
||||
|
||||
|
||||
public String getMessageHTMLLigne() {
|
||||
return messageHTMLLigne;
|
||||
}
|
||||
|
||||
|
||||
public void setMessageHTMLLigne(String messageHTMLLigne) {
|
||||
this.messageHTMLLigne = messageHTMLLigne;
|
||||
}
|
||||
|
||||
|
||||
public String getMessageLigne() {
|
||||
return messageLigne;
|
||||
}
|
||||
|
||||
|
||||
public void setMessageLigne(String messageLigne) {
|
||||
this.messageLigne = messageLigne;
|
||||
}
|
||||
|
||||
|
||||
public String getMessageColonne() {
|
||||
return messageColonne;
|
||||
}
|
||||
|
||||
|
||||
public void setMessageColonne(String messageColonne) {
|
||||
this.messageColonne = messageColonne;
|
||||
}
|
||||
|
||||
|
||||
public double getNote25pourcent() {
|
||||
return Note25pourcent;
|
||||
}
|
||||
|
||||
|
||||
public void setNote25pourcent(double note25pourcent) {
|
||||
Note25pourcent = note25pourcent;
|
||||
}
|
||||
|
||||
|
||||
public double getNote50pourcent() {
|
||||
return Note50pourcent;
|
||||
}
|
||||
|
||||
|
||||
public void setNote50pourcent(double note50pourcent) {
|
||||
Note50pourcent = note50pourcent;
|
||||
}
|
||||
|
||||
|
||||
public double getNote75pourcent() {
|
||||
return Note75pourcent;
|
||||
}
|
||||
|
||||
|
||||
public void setNote75pourcent(double note75pourcent) {
|
||||
Note75pourcent = note75pourcent;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package calcul;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public class formatDateWriter {
|
||||
|
||||
//** exemple de date correct 2016-01-30T16:52:51
|
||||
public static boolean isCorrect(String date) {
|
||||
Pattern p = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$");
|
||||
Matcher m = p.matcher(date);
|
||||
if(m.find()) return true;
|
||||
JOptionPane.showMessageDialog(null, "<html>Le format de la date n'est pas correct.<br>"
|
||||
+ "Exemple de format 2019-12-25T15:50:45</html>");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param libreoffice_date
|
||||
* @return
|
||||
*/
|
||||
public static Date DateLibreOffice(String libreoffice_date){
|
||||
boolean contientHeure = false;
|
||||
if(libreoffice_date.contains("T")) {
|
||||
libreoffice_date=libreoffice_date.replace("T", " ");
|
||||
contientHeure=true;
|
||||
}
|
||||
SimpleDateFormat simpledateformat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
Date d = null;
|
||||
if(!contientHeure) simpledateformat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
try {
|
||||
d = simpledateformat.parse(libreoffice_date);
|
||||
}catch(ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
import calc.commandes;
|
||||
|
||||
public final class about extends JFrame {
|
||||
|
||||
private static about instance;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public about() {
|
||||
initialize();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
setResizable(false);
|
||||
setTitle(commandes.Titre);
|
||||
setLocation(100, 100);
|
||||
setSize(518,415);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
getContentPane().setLayout(null);
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
setIconImage(img.getImage());
|
||||
|
||||
JPanel contentPane = (JPanel) getContentPane();
|
||||
|
||||
JLabel lblNewLabelTitre = new JLabel();
|
||||
lblNewLabelTitre.setIcon(new ImageIcon(about.class.getResource("/resources/accueilanalysecalc.png")));
|
||||
lblNewLabelTitre.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblNewLabelTitre.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
||||
lblNewLabelTitre.setBounds(10, 10, 429, 90);
|
||||
contentPane.add(lblNewLabelTitre);
|
||||
|
||||
JLabel lblNewLabelVersion = new JLabel("<HTML><B><U>Version :</U></B> " + commandes.version + " "+ commandes.nomDeLaBranch + "</HTML>");
|
||||
lblNewLabelVersion.setFont(new Font("Tahoma", Font.PLAIN, 16));
|
||||
lblNewLabelVersion.setBounds(20, 100, 240, 20);
|
||||
contentPane.add(lblNewLabelVersion);
|
||||
|
||||
JLabel lblNewLabelAnnee = new JLabel("<HTML><B><U>Année :</U></B> " + commandes.Annee + "</HTML>");
|
||||
lblNewLabelAnnee.setFont(new Font("Tahoma", Font.PLAIN, 16));
|
||||
lblNewLabelAnnee.setBounds(20, 120, 240, 20);
|
||||
contentPane.add(lblNewLabelAnnee);
|
||||
|
||||
JLabel lblCredit = new JLabel("Crédit");
|
||||
lblCredit.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
|
||||
lblCredit.setBounds(20, 268, 60, 20);
|
||||
getContentPane().add(lblCredit);
|
||||
|
||||
|
||||
JLabel lblNewLabelAuteur = new JLabel("Auteur : P. Rodriguez");
|
||||
lblNewLabelAuteur.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
lblNewLabelAuteur.setBounds(20, 286, 240, 20);
|
||||
contentPane.add(lblNewLabelAuteur);
|
||||
|
||||
JLabel lblInformationEnseignant = new JLabel("Enseignants à l'université d'Artois");
|
||||
lblInformationEnseignant.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
lblInformationEnseignant.setBounds(20, 299, 296, 20);
|
||||
getContentPane().add(lblInformationEnseignant);
|
||||
|
||||
JLabel lblCommentaire = new JLabel("<HTML>Outil permettant l’évaluation des fichiers réalisés avec un traitement de texte au format ODF.<br><br>"
|
||||
+ "Cet outil a été créé dans un esprit de partage.<br></HTML>");
|
||||
lblCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
lblCommentaire.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblCommentaire.setVerticalAlignment(SwingConstants.TOP);
|
||||
lblCommentaire.setBounds(20, 183, 472, 88);
|
||||
getContentPane().add(lblCommentaire);
|
||||
|
||||
JLabel lblLicence = new JLabel("<HTML><B><U>Licence : GNU GLP 3.0</U></B> </HTML>");
|
||||
lblLicence.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
lblLicence.setBounds(20, 330, 296, 35);
|
||||
getContentPane().add(lblLicence);
|
||||
|
||||
JButton btnNewButton = new JButton("<html><p {text-align: center;}>Vérifier la version<br>Accès à la documentation</p><html>");
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
String url = "https://forge.chapril.org/pablo/analyseWriter/releases";
|
||||
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||
}
|
||||
catch (java.io.IOException e1) {
|
||||
System.out.println(e1.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
btnNewButton.setBounds(290, 104, 202, 50);
|
||||
getContentPane().add(btnNewButton);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static about getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new about();
|
||||
}
|
||||
instance.setVisible(true);
|
||||
return instance;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,382 @@
|
||||
package fenetres;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.swing.JEditorPane;
|
||||
|
||||
import calcul.calculIntervalleBaremeABCDE;
|
||||
import calcul.calculNotesProgression;
|
||||
//import evaluer.evaluation;
|
||||
import list.listeAttributsAnalyseWriter;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class afficheText extends JEditorPane {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* Raffraichie l'affichage de la fenête create lorsque selection d'un nodeAC.
|
||||
* @param nod
|
||||
*/
|
||||
public void refreshAffichage(nodeAC nod) {
|
||||
|
||||
if(nod!=null) {
|
||||
setContentType("text/html");
|
||||
nodeAC nodeParent = nod.getParent();
|
||||
|
||||
String imageAllContent = "<img src="+afficheText.class.getResource("/resources/allcontentmini.png").toString()+">";
|
||||
String imageTitre = "<img src="+afficheText.class.getResource("/resources/titremini.png").toString()+">";
|
||||
String imageSaut = "<img src="+afficheText.class.getResource("/resources/sautmini.png").toString()+">";
|
||||
String imageaddmenu = "<img src="+afficheText.class.getResource("/resources/addmenumini.png").toString()+">";
|
||||
String imagerechercheIndex = "<img src="+afficheText.class.getResource("/resources/rechercheindexmini.png").toString()+">";
|
||||
String imagerechercheContenuExact = "<img src="+afficheText.class.getResource("/resources/recherchecontenumini.png").toString()+">";
|
||||
String imagereanalyseStyle = "<img src="+afficheText.class.getResource("/resources/evaluerstylemini.png").toString()+">";
|
||||
String imagereEvaleNode = "<img src="+afficheText.class.getResource("/resources/evalnodemini.png").toString()+">";
|
||||
String imagereRechercheAncragePage= "<img src="+afficheText.class.getResource("/resources/rechercheancragepagemini.png").toString()+">";
|
||||
String imagereRecherchePlusProcheVoisin= "<img src="+afficheText.class.getResource("/resources/recherchecontenuplusprochevoisinmini.png").toString()+">";
|
||||
String imagerePremierAuteur= "<img src="+afficheText.class.getResource("/resources/auteurcreateurmini.png").toString()+">";
|
||||
String imagereDernierEditeur= "<img src="+afficheText.class.getResource("/resources/auteurediteurmini.png").toString()+">";
|
||||
String imageAtraversAnalyseStyle= "<img src="+afficheText.class.getResource("/resources/atraversanalysestylemini.png").toString()+">";
|
||||
String imageEntetePasActive= "<img src="+afficheText.class.getResource("/resources/entetenonmini.png").toString()+">";
|
||||
String imagePiedPagePasActive= "<img src="+afficheText.class.getResource("/resources/piedpagenonmini.png").toString()+">";
|
||||
String imageEvalNameSequence= "<img src="+afficheText.class.getResource("/resources/evalnamesequencemini.png").toString()+">";
|
||||
String imageEvalNamePage= "<img src="+afficheText.class.getResource("/resources/evalnamepagemini.png").toString()+">";
|
||||
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()+">";
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append(baliseStyle.balise());
|
||||
|
||||
if(nodeParent!=null) sb.append("<p class=\"p1\">Parent = " + nodeParent.getNomElt() + "</p><br>");
|
||||
sb.append("<hr><br><h1>Nom du nodeAC : " + nod.getNomElt() + "</h1><br><hr>");
|
||||
|
||||
//*********************************************
|
||||
//** sous titre pour identifier les éléments **
|
||||
//*********************************************
|
||||
if(nod.getNomElt().equals("style:style")) {
|
||||
sb.append("<h2>Nom du style : " + nod.getAttributs().get("style:name")+ "</h2><br>");
|
||||
}
|
||||
if(nod.getNomElt().equals("draw:frame")) {
|
||||
// sb.append("<h2>Nom du frame : " + evaluation.withoutCodeAndPointPourRechercheContenuExact(nod.getAttributs().get("draw:name"))+ "</h2><br>");
|
||||
}
|
||||
if(nod.getNomElt().equals("style:master-page")) {
|
||||
if(nod.getAttributs().get("style:display-name")!=null) {
|
||||
sb.append("<h2>Nom du style de page : " + nod.getAttributs().get("style:display-name")+ "</h2><br>");
|
||||
}else {
|
||||
sb.append("<h2>Nom du style de page : " + nod.getAttributs().get("style:name")+ "</h2><br>");
|
||||
}
|
||||
}
|
||||
if(nod.getNomElt().equals("page")) {
|
||||
// sb.append("<h2>Numero absolue de la page : " + evaluation.withoutCodeAndPointPourRechercheContenuExact(nod.getAttributs().get("numeroabsolue"))
|
||||
// + " - Numerotation de la page : " + evaluation.withoutCodeAndPointPourRechercheContenuExact(nod.getAttributs().get("numero"))+ "</h2><br>");
|
||||
}
|
||||
|
||||
|
||||
//********************************************************
|
||||
//** Le logo d'analyseWriter lorsque le nodeAC est évalué **
|
||||
//********************************************************
|
||||
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")) {
|
||||
sb.append("<p><img src="+afficheText.class.getResource("/resources/evalwriter.png").toString()+"> Ce nodeAC est évalué.</p>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(nod.getAttributs().size()>0) {
|
||||
if(nod.getAttributs().size()==1) sb.append("<br><h4><u>L'ATTRIBUT DU NODE</u></h4>");
|
||||
if(nod.getAttributs().size()>1) sb.append("<br><h4><u>LES ATTRIBUTS DU NODE</u></h4>");
|
||||
}
|
||||
if(nod.getAttributs().size()<=0) {
|
||||
if(nod.getAttributs().size()==1) sb.append("<br><h4><u>PAS D'ATTRIBUT DANS CE NODE</u></h4>");
|
||||
}
|
||||
|
||||
List<String> Lesattributsdunode = new ArrayList<String>();
|
||||
Set<String> key = nod.getAttributs().keySet();
|
||||
for (String k : key) {
|
||||
Lesattributsdunode.add(k);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//permet le tri par ordre alphabétique des clés du dictionnaire
|
||||
Lesattributsdunode = Lesattributsdunode.stream().sorted().collect(Collectors.toList());
|
||||
|
||||
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")) {
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p4\"><b><u>Les attributs d'analyseWriter</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
if(Lesattributsdunode.get(i).equals("allContent")) {
|
||||
Pattern p = Pattern.compile("[1-9]$|[0-9]{2,}$");
|
||||
Matcher m = p.matcher(nod.getAttributs().get(Lesattributsdunode.get(i)));
|
||||
if(m.find()) {
|
||||
sb.append("<li class=\"p4\">"+imageAllContent + " <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) {
|
||||
sb.append("<li class=\"p4\">"+imageTitre + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("saut") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imageSaut + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("addmenu") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imageaddmenu + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("recherche_index") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imagerechercheIndex + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("recherche_contenu_exact") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imagerechercheContenuExact + " <b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("analyseStyle") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imagereanalyseStyle + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNameNode") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imagereEvaleNode + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("recherche_anchor-page-number") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imagereRechercheAncragePage + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("recherche_contenu_plus_proche_voisin") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imagereRecherchePlusProcheVoisin + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNameInitialCreator") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imagerePremierAuteur + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNameCreator") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imagereDernierEditeur + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("EvaluerATraversAnalyseStyle") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
|
||||
sb.append("<li class=\"p4\">"+imageAtraversAnalyseStyle + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalEntetePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEntetePasActive + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalPiedPagePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imagePiedPagePasActive + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNameSequence") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNameSequence + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNamePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNamePage + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNumeroPage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNumeroPage + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
if(Lesattributsdunode.get(i).equals("evalNumeroAbsoluePage") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
|
||||
sb.append("<li class=\"p4\">"+imageEvalNumeroAbsoluePage + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
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>");
|
||||
}
|
||||
|
||||
|
||||
// sb.append("<li class=\"p4\"><b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p2\"><b><u>Les attributs de Writer</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
sb.append("<li class=\"p2\"><b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
}
|
||||
|
||||
if(nod.getAttributs().get("evaluer")!=null) if(!nod.getAttributs().get("evaluer").equalsIgnoreCase("true")) {
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p3\"><b><u>Les attributs d'analyseWriter</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
sb.append("<li class=\"p3\"><b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p3\"><b><u>Les attributs de Writer</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
sb.append("<li class=\"p3\"><b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(nod.getAttributs().size()>0) {
|
||||
if(nod.getAttributs().get("evaluer")==null) {
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p3\"><b><u>Les attributs d'analyseWriter</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
sb.append("<li class=\"p3\"><b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
sb.append("<br>");
|
||||
sb.append("<ul>");
|
||||
sb.append("<li class=\"p3\"><b><u>Les attributs de Writer</u></b></li>");
|
||||
for(int i=0; i < Lesattributsdunode.size();i++) {
|
||||
if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(Lesattributsdunode.get(i))) {
|
||||
sb.append("<li class=\"p3\"><b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
|
||||
}
|
||||
}
|
||||
sb.append("</ul>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!nod.getNomElt().equals("fichier")&&!nod.getNomElt().equals("setting")&&!nod.getNomElt().equals("structurepage")) {
|
||||
if(!nod.retourneLesContenusEnfants("").isEmpty()) {
|
||||
sb.append("<br><br><h4><u>Contenu</u></h4><br>" + nod.retourneLesContenusEnfants("") );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setText("<html>"+sb.toString()+"</html>");
|
||||
}
|
||||
if(nod==null) {
|
||||
setText("");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le nombre de point d'un nodeAC.
|
||||
* @param nod
|
||||
* @param pointTotalNode
|
||||
*/
|
||||
public void AfficheTotalPoint(nodeAC nod, int pointTotalNode) {
|
||||
|
||||
setContentType("text/html");
|
||||
nodeAC nodeParent = nod.getParent();
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append(baliseStyle.balise());
|
||||
|
||||
if(nodeParent!=null) {
|
||||
sb.append("<p class=\"p1\">Parent = " + nodeParent.getNomElt() + "</p><br>");
|
||||
}
|
||||
sb.append("<hr><br><h1>Total des points dans le nodeAC : " + nod.getNomElt() + "</h1><br><hr>");
|
||||
|
||||
sb.append("<p class=\"p5\">Uniquement les nodes évalués</p>");
|
||||
sb.append("<p class=\"p5\">TOTAL POINT = " + String.valueOf(pointTotalNode) + "</p>");
|
||||
|
||||
setText("<html>"+sb.toString()+"</html>");
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le nombre de point et la réppartition dans les nodeAC principaux.
|
||||
* @param liste
|
||||
*/
|
||||
public void afficheListeDesPointsDansToutExercice(ArrayList<String> liste) {
|
||||
StringBuilder text = new StringBuilder();
|
||||
NumberFormat f = new DecimalFormat("##.00");
|
||||
text.append(baliseStyle.balise());
|
||||
text.append("<hr><h1><u>INFORMATIONS</u><h1><hr><br>");
|
||||
Double NbrPointDansExercice = 0.0;
|
||||
|
||||
for(int i = 0 ; i < liste.size(); i++) {
|
||||
String[] A = liste.get(i).split(" ");
|
||||
|
||||
double NbrPointApresPonderation = 0.0;
|
||||
int NbrPointBrut = 0;
|
||||
NbrPointBrut = Integer.valueOf(A[1]);
|
||||
NbrPointApresPonderation = NbrPointBrut*Double.valueOf(A[2]);
|
||||
|
||||
NbrPointDansExercice = NbrPointDansExercice + NbrPointApresPonderation;
|
||||
|
||||
if(NbrPointBrut>0) {
|
||||
text.append("<p><b><u>Dans le nodeAC "+ A[0] + "</u></b>.<br>"
|
||||
+ "Le nombre de point brut est de <b>" + A[1] + "</b><br>"
|
||||
+ "Le poids est de " + A[2]+ " soit un total de <span class=\"rouge\"><b>" + f.format(NbrPointApresPonderation) + "</b></span></p><br><hr>");
|
||||
}
|
||||
|
||||
}
|
||||
text.append("<br>");
|
||||
text.append("<h3>Le nombre de point total dans l'exercice est de : " + f.format(NbrPointDansExercice) + "</h3>");
|
||||
setContentType("text/html");
|
||||
setText("<html>"+text.toString()+"</html>");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le chargement du fichier d'analyse
|
||||
*/
|
||||
public void afficheChargementFichierAnalyse(){
|
||||
|
||||
|
||||
StringBuilder text = new StringBuilder();
|
||||
text.append(baliseStyle.balise());
|
||||
text.append("<hr><h1><u>INFORMATIONS</u><h1><hr><br>");
|
||||
text.append("<h3>Le titre de l'exercice est : <u>" + calc.commandes.analyse_titre+"</u></h3>");
|
||||
text.append("<p>Le sujet (metaSujet) est : <b>" + calc.commandes.analyse_metaSujet+"</b></p>");
|
||||
text.append("<p>L'auteur de l'exercice est : <b>" + calc.commandes.analyse_auteur+"</b></p>");
|
||||
if(calc.commandes.analyse_baremeABC==true) {
|
||||
text.append("<br><p>La notation est sous la forme d'une <b><u>note alphabétique ABCDE</u></b>.</p>");
|
||||
text.append("<p>La progression est de <b>" + String.valueOf(calc.commandes.analyse_progression)+ "</b></p>");
|
||||
calcul.calculIntervalleBaremeABCDE C = new calculIntervalleBaremeABCDE(calc.commandes.analyse_progression);
|
||||
text.append("<p>" + C.getMessageLigne() + "</p>");
|
||||
}else {
|
||||
text.append("<p>La notation est sous la forme d'une <b><u>note numérique</u></b>.</p>");
|
||||
text.append("<p>Le barème est sur <b>" + String.valueOf(calc.commandes.analyse_bareme)+ "</b></p>");
|
||||
text.append("<p>La progression est de <b>" + String.valueOf(calc.commandes.analyse_progression) + "</b></p>");
|
||||
calculNotesProgression C = new calculNotesProgression(calc.commandes.analyse_progression, calc.commandes.analyse_bareme);
|
||||
text.append("<p>" + C.getMessageLigne() + "</p>");
|
||||
}
|
||||
text.append("<br>");
|
||||
text.append("<p>Le nom du fichier : <b>" + calc.commandes.analysis_filename + "</b></p>");
|
||||
text.append("<p>Le hash de l'évaluation est : <b>" + calc.commandes.hash + "<b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<p>Historiques des modifications present : <b>" + calc.commandes.analyse_historiquePresent + "</b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<p>Verification de la presence metaSujet : <b>" + calc.commandes.analyse_presenceMetaSujet + "</b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<p>Contrôle la date de céation : <b>" + calc.commandes.analyse_controleDateCreation+ "</b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<p>Contrôle l'auteur initial du fichier : <b>" + calc.commandes.analyse_controle_Initial_Creator + "</b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<p>Dossier de l'analyse contenant les fichiers des étudiants :</p>");
|
||||
text.append("<p class=\"city\"><b>"+calc.commandes.path+"</b></p>");
|
||||
text.append("<br>");
|
||||
text.append("<br><p>Fichier d'analyse :</p>");
|
||||
text.append("<p class=\"city\"><b>"+calc.commandes.PathFilenameAnalysis+"</b></p>");
|
||||
|
||||
|
||||
setContentType("text/html");
|
||||
setText(text.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,161 @@
|
||||
package fenetres;
|
||||
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class allContent extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private JPanel contentPane;
|
||||
private JTextField textFieldPoint;
|
||||
private JLabel lblExplication;
|
||||
nodeAC nod;
|
||||
afficheText J;
|
||||
JComboBox<String> comboBoxValeur;
|
||||
String valeur="strict";
|
||||
int point=0;
|
||||
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
*/
|
||||
public allContent(nodeAC nod, afficheText J) {
|
||||
this.nod=nod;
|
||||
this.J=J;
|
||||
|
||||
|
||||
if(nod.getAttributs().get("allContent")!=null) {
|
||||
String value = nod.getAttributs().get("allContent");
|
||||
if(value.contains("strictSansEspace")) { value=value.replace("strictSansEspace", "");valeur="strictSansEspace";}
|
||||
if(value.contains("strict")) {value=value.replace("strict", "");valeur="strict";}
|
||||
if(value.contains("environ")) {value=value.replace("environ", "");valeur="environ";}
|
||||
|
||||
point = Integer.valueOf(value);
|
||||
}
|
||||
|
||||
setResizable(false);
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 556, 326);
|
||||
|
||||
setTitle("allContent");
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
setTitle("allContent" + calc.commandes.Titre + " " + calc.commandes.version + " " + calc.commandes.branch);
|
||||
setIconImage(img.getImage());
|
||||
|
||||
|
||||
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(null);
|
||||
|
||||
JButton btnNewButton = new JButton("Valide");
|
||||
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
btnNewButton.setBounds(394, 237, 121, 39);
|
||||
contentPane.add(btnNewButton);
|
||||
|
||||
JLabel lblValeurDeLattribut = new JLabel("Type d'évaluation");
|
||||
lblValeurDeLattribut.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
lblValeurDeLattribut.setBounds(10, 105, 130, 23);
|
||||
contentPane.add(lblValeurDeLattribut);
|
||||
|
||||
JLabel lblDescription = new JLabel("<html>Cet attribut permet d'évaluer le contenu du nodeAC et de celui des nodes enfants de ce nodeAC.<br>"
|
||||
+ "Par conséquent, tous les nodes enfants seront évalués.</html>");
|
||||
lblDescription.setLabelFor(this);
|
||||
lblDescription.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
lblDescription.setBounds(10, 11, 520, 50);
|
||||
contentPane.add(lblDescription);
|
||||
|
||||
comboBoxValeur = new JComboBox<String>();
|
||||
comboBoxValeur.setModel(new DefaultComboBoxModel<String>(new String[] {"strict", "strictSansEspace", "environ"}));
|
||||
comboBoxValeur.setSelectedItem(valeur);
|
||||
comboBoxValeur.setBounds(150, 106, 130, 22);
|
||||
contentPane.add(comboBoxValeur);
|
||||
|
||||
JLabel lblPoint = new JLabel("Combien de point?");
|
||||
lblPoint.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
lblPoint.setBounds(10, 72, 130, 22);
|
||||
contentPane.add(lblPoint);
|
||||
|
||||
textFieldPoint = new JTextField();
|
||||
textFieldPoint.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
textFieldPoint.setText("0");
|
||||
textFieldPoint.setBounds(150, 72, 43, 20);
|
||||
textFieldPoint.setColumns(6);
|
||||
textFieldPoint.setText(String.valueOf(point));
|
||||
contentPane.add(textFieldPoint);
|
||||
|
||||
|
||||
lblExplication = new JLabel("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.</html>");
|
||||
|
||||
if(comboBoxValeur.getSelectedItem().equals("strict")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.</html>");
|
||||
}
|
||||
if(comboBoxValeur.getSelectedItem().equals("strictSansEspace")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC doit être rigoureusement identique, CASE comprise, mais ignore les espaces en début et fin.</html>");
|
||||
}
|
||||
if(comboBoxValeur.getSelectedItem().equals("environ")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC peut être plus ou moins proche (voir le paramètre similude), la CASE est ignorée.</html>");
|
||||
}
|
||||
|
||||
lblExplication.setBounds(10, 158, 520, 56);
|
||||
contentPane.add(lblExplication);
|
||||
|
||||
|
||||
comboBoxValeur.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(comboBoxValeur.getSelectedItem().equals("strict")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC doit être rigoureusement identique, CASE comprise.</html>");
|
||||
}
|
||||
if(comboBoxValeur.getSelectedItem().equals("strictSansEspace")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC doit être rigoureusement identique, CASE comprise, mais ignore les espaces en début et fin.</html>");
|
||||
}
|
||||
if(comboBoxValeur.getSelectedItem().equals("environ")) {
|
||||
lblExplication.setText("<html>Dans le fichier de l'étudiants.<br>Le contenu du nodeAC peut être plus ou moins proche (voir le paramètre similude), la CASE est ignorée.</html>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
int point = Integer.valueOf(textFieldPoint.getText());
|
||||
if(point<0) point =0;
|
||||
nod.getAttributs().put("allContent", comboBoxValeur.getSelectedItem() + String.valueOf(point));
|
||||
nod.evaluerAllChildTrue();
|
||||
J.refreshAffichage(nod);
|
||||
dispose();
|
||||
} catch (Exception e2) {
|
||||
JOptionPane.showMessageDialog(null, "Le nombre de point doit être un entier.");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
setVisible(true);
|
||||
}
|
||||
}
|
@ -0,0 +1,379 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.swing.FocusManager;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import list.listeAttributWriterPasEvaluableAvecCodeEvaluateur;
|
||||
import list.listeAttributWriterValeurPasModifiable;
|
||||
import list.listeAttributsAnalyseWriter;
|
||||
import list.listeNodeFormatageDirectDeWriter;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
|
||||
public class attributs extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private JPanel contentPane;
|
||||
nodeAC nod;
|
||||
afficheText J;
|
||||
int indexSelect=0;
|
||||
|
||||
ArrayList<JLabel> Leslabels = new ArrayList<JLabel>();
|
||||
ArrayList<JTextField> Lesvaleurs = new ArrayList<JTextField>();
|
||||
ArrayList<JCheckBox> Lesevaluer = new ArrayList<JCheckBox>();
|
||||
ArrayList<JTextField> Lespoints = new ArrayList<JTextField>();
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
*/
|
||||
public attributs(nodeAC nod, afficheText J) {
|
||||
this.nod=nod;
|
||||
this.J=J;
|
||||
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 806, 669);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
setIconImage(img.getImage());
|
||||
setTitle(calc.commandes.Titre + " - Les attributs de Writer");
|
||||
|
||||
|
||||
|
||||
JPanel panelGauche = new JPanel();
|
||||
contentPane.add(panelGauche, BorderLayout.WEST);
|
||||
|
||||
JPanel panelHaut = new JPanel();
|
||||
contentPane.add(panelHaut, BorderLayout.NORTH);
|
||||
|
||||
JLabel lblNomNode = new JLabel(nod.getNomElt());
|
||||
lblNomNode.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelHaut.add(lblNomNode);
|
||||
|
||||
JPanel panelBas = new JPanel();
|
||||
contentPane.add(panelBas, BorderLayout.SOUTH);
|
||||
panelBas.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
|
||||
|
||||
JButton btnNewButton = new JButton("Verifier les codes d'évaluation");
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
}
|
||||
});
|
||||
panelBas.add(btnNewButton);
|
||||
|
||||
JButton btnValide = new JButton("Valider les modifications");
|
||||
btnValide.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
btnValide.setForeground(Color.RED);
|
||||
panelBas.add(btnValide);
|
||||
|
||||
JPanel panelDroite = new JPanel();
|
||||
contentPane.add(panelDroite, BorderLayout.EAST);
|
||||
JButton btnIntervalle = new JButton("Intervalle");
|
||||
btnIntervalle.setToolTipText("Intervalle entre deux valeurs numériques.");
|
||||
btnIntervalle.setIcon(new ImageIcon(attributs.class.getResource("/resources/intervallemini.png")));
|
||||
btnIntervalle.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "→" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
panelDroite.setLayout(new GridLayout(12, 1, 0, 0));
|
||||
|
||||
panelDroite.add(btnIntervalle);
|
||||
|
||||
JButton btnTextClean = new JButton("Text clean");
|
||||
btnTextClean.setToolTipText("<html>Texte nettoyé de tous les caractères spéciaux, chiffres et ignore la casse (équivalent à allContent=\"environ\").<br>Cette fonction ne peut pas être combinée avec les autres fonctions ci-dessous.<br>Ce n'est pas un opérateur OU contrairement à l'opérateur ↕.<br>La tolérance de texte (79% de similitude avec le texte de la consigne) paramètre dans les setting. (exemple : ¢‽2) </html>");
|
||||
btnTextClean.addActionListener(new ActionListener() {
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
Lesvaleurs.get(indexSelect).setText(Lesvaleurs.get(indexSelect).getText() + "¢");
|
||||
}
|
||||
});
|
||||
btnTextClean.setIcon(new ImageIcon(attributs.class.getResource("/resources/textcleanmini.png")));
|
||||
panelDroite.add(btnTextClean);
|
||||
|
||||
JButton btnOuStrict = new JButton("OU Strict");
|
||||
btnOuStrict.setToolTipText("<html>Fonction OU texte exact (sans traitement).<br>Cette fonction ne peut pas être combinée avec les autres fonctions OU.<br>Cette fonction peut être combinée avec la fonction ET.</html>");
|
||||
btnOuStrict.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "¦" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
btnOuStrict.setIcon(new ImageIcon(attributs.class.getResource("/resources/oustrictmini.png")));
|
||||
panelDroite.add(btnOuStrict);
|
||||
|
||||
JButton btnOuStrictSEps = new JButton("OU Strict s.esp");
|
||||
btnOuStrictSEps.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "≡" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
btnOuStrictSEps.setIcon(new ImageIcon(attributs.class.getResource("/resources/oustrictsepsmini.png")));
|
||||
btnOuStrictSEps.setToolTipText("<html>Fonction OU texte exact sans les espaces.<br>Cette fonction ne peut pas être combinée avec les autres fonctions OU.</html>");
|
||||
panelDroite.add(btnOuStrictSEps);
|
||||
|
||||
JButton btnOUEnviron = new JButton("OU Environ");
|
||||
btnOUEnviron.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "↑" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
btnOUEnviron.setIcon(new ImageIcon(attributs.class.getResource("/resources/ouenvironmini.png")));
|
||||
btnOUEnviron.setToolTipText("<html>Fonction OU, texte nettoyé des caractères spéciaux, chiffres, ignore la CASE MAIS SANS SIMILITUDE de texte. <br>Cette fonction ne peut pas être combinée avec les autres fonctions OU.</html>");
|
||||
panelDroite.add(btnOUEnviron);
|
||||
|
||||
JButton btnOUEnvironSimilitude = new JButton("OU Env. Sim.");
|
||||
btnOUEnvironSimilitude.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "↕" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
btnOUEnvironSimilitude.setToolTipText("<html>Fonction OU texte nettoyé des caractères spéciaux, chiffres et similitude de texte. <br>Cette fonction ne peut pas être combinée avec les autres fonctions OU.<br>La tolérance de texte (79% de similitude avec le texte de la consigne) paramètre dans les setting.</html>");
|
||||
btnOUEnvironSimilitude.setIcon(new ImageIcon(attributs.class.getResource("/resources/ouenvironsimilitudemini.png")));
|
||||
panelDroite.add(btnOUEnvironSimilitude);
|
||||
|
||||
JButton btnET = new JButton("ET contient text");
|
||||
btnET.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
String newValue = Lesvaleurs.get(indexSelect).getText().substring(0, j) + "×" + Lesvaleurs.get(indexSelect).getText().substring(j, Lesvaleurs.get(indexSelect).getText().length());
|
||||
Lesvaleurs.get(indexSelect).setText(newValue);
|
||||
}
|
||||
});
|
||||
btnET.setToolTipText("<html>Fonction ET contient le texte.<br>Ensemble des textes qui doivent être contenu dans la valeur de l'attribut ou le contenu du nodeAC.</html>");
|
||||
btnET.setIcon(new ImageIcon(attributs.class.getResource("/resources/etmini.png")));
|
||||
panelDroite.add(btnET);
|
||||
|
||||
JButton btnTouText = new JButton("Tout text");
|
||||
btnTouText.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int j = Lesvaleurs.get(indexSelect).getCaretPosition();
|
||||
System.out.println("position du cursor "+ j);
|
||||
Lesvaleurs.get(indexSelect).setText(Lesvaleurs.get(indexSelect).getText() + "†");
|
||||
}
|
||||
});
|
||||
btnTouText.setIcon(new ImageIcon(attributs.class.getResource("/resources/toutextmini.png")));
|
||||
btnTouText.setToolTipText("<html>N'importe quel texte mais pas null, ou pas la valeur none ou pas vide.<br>Toutes les autres fonctions sont ignorées.</html>");
|
||||
panelDroite.add(btnTouText);
|
||||
|
||||
JScrollPane scrollPaneCentre = new JScrollPane();
|
||||
contentPane.add(scrollPaneCentre, BorderLayout.CENTER);
|
||||
|
||||
JPanel panelCentre = new JPanel();
|
||||
scrollPaneCentre.setViewportView(panelCentre);
|
||||
panelCentre.setLayout(new MigLayout("", "[100px:n,grow][150px:n,grow 150][::80px][80px:n]", "[::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px]"));
|
||||
panelCentre.setLayout(new MigLayout("", "[1px]", "[1px]"));
|
||||
|
||||
JLabel lblNewLabel = new JLabel("Nom attribut");
|
||||
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel, "cell 0 0,grow");
|
||||
|
||||
JLabel lblNewLabel_1 = new JLabel("Valeurs");
|
||||
lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_1, "cell 0 0,grow");
|
||||
|
||||
JLabel lblNewLabel_2 = new JLabel("Evaluer");
|
||||
lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_2, "cell 0 0,grow");
|
||||
|
||||
JLabel lblNewLabel_3 = new JLabel("Point(s)");
|
||||
lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_3, "cell 0 0,grow");
|
||||
|
||||
|
||||
Set<String> key = nod.getAttributs().keySet();
|
||||
for (String k : key){
|
||||
if(!listeAttributsAnalyseWriter.isAttributAnalyseWriter(k)) {
|
||||
String value = nod.getAttributs().get(k);
|
||||
String point = "0";
|
||||
JCheckBox checkEval = new JCheckBox();
|
||||
boolean evaluer = false;
|
||||
if(value.contains("‽")||value.contains("‼")) {
|
||||
evaluer=true;
|
||||
if(value.contains("‽")) {
|
||||
point = value.substring(value.lastIndexOf("‽")+1,value.length());
|
||||
value = value.substring(0,value.lastIndexOf("‽"));
|
||||
}
|
||||
if(value.contains("‼")) {
|
||||
point = value.substring(value.lastIndexOf("‼")+1,value.length());
|
||||
value = value.substring(0,value.lastIndexOf("‼"));
|
||||
}
|
||||
}
|
||||
|
||||
JTextField txtFielPoints = new JTextField(point);
|
||||
JTextField txtFielValue = new JTextField(value);
|
||||
txtFielValue.addMouseListener(new MyMouseListener());
|
||||
txtFielPoints.setColumns(3);
|
||||
checkEval.setSelected(evaluer);
|
||||
|
||||
Leslabels.add(new JLabel(k));
|
||||
Lesvaleurs.add(txtFielValue);
|
||||
Lespoints.add(txtFielPoints);
|
||||
Lesevaluer.add(checkEval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Placement dans le panel des informations
|
||||
for(int i = 0 ; i<Leslabels.size();i++) {
|
||||
Leslabels.get(i).setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
Lesvaleurs.get(i).setColumns(10);
|
||||
panelCentre.add(Leslabels.get(i), "cell 0 "+i+1);
|
||||
panelCentre.add(Lesvaleurs.get(i), "cell 1 "+i+1 + ",grow");
|
||||
panelCentre.add(Lesevaluer.get(i), "cell 2 "+i+1);
|
||||
panelCentre.add(Lespoints.get(i), "cell 3 " + i+1 +",alignx left,growy");
|
||||
}
|
||||
|
||||
//Enabled false les valeurs ne peuvent pas être modifiées
|
||||
//Enabled false les evaluer si pas evaluable
|
||||
for(int i = 0 ; i<Leslabels.size();i++) {
|
||||
if(listeAttributWriterValeurPasModifiable.isModifiable(Leslabels.get(i).getText())) {Lesvaleurs.get(i).setEnabled(false);}
|
||||
if(listeAttributWriterPasEvaluableAvecCodeEvaluateur.isEvaluable(Leslabels.get(i).getText())) {Lesevaluer.get(i).setEnabled(false);Lespoints.get(i).setEnabled(false);}
|
||||
}
|
||||
|
||||
//*******************
|
||||
//** Bouton valide **
|
||||
//*******************
|
||||
btnValide.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
String codeEvaluateur = "‽";
|
||||
|
||||
// Le code evaluateur ‼ que dans les nodes des styles de paragraphe
|
||||
if(nod.chemin().contains("style:paragraph")) {
|
||||
nodeAC nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
|
||||
|
||||
if(nodStyleParent!=null) {
|
||||
|
||||
if(nodStyleParent.getAttributs().get("EvaluerATraversAnalyseStyle")!=null) {
|
||||
if(nodStyleParent.getAttributs().get("EvaluerATraversAnalyseStyle").equals("true")) {
|
||||
codeEvaluateur = "‼";
|
||||
}
|
||||
}
|
||||
if(listeNodeFormatageDirectDeWriter.isFormatageDirect(nod)) codeEvaluateur = "‼";
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("code évaluateur = " + codeEvaluateur);
|
||||
|
||||
for(int i = 0 ; i<Leslabels.size();i++) {
|
||||
|
||||
String value = Lesvaleurs.get(i).getText();
|
||||
if(value.contains("‽")) value = value.substring(0,value.lastIndexOf("‽"));
|
||||
if(value.contains("‼")) value = value.substring(0,value.lastIndexOf("‼"));
|
||||
|
||||
String point = "0";
|
||||
if(Lesevaluer.get(i).isSelected()) {
|
||||
value = value + codeEvaluateur;
|
||||
int pointNumeric = 0;
|
||||
try {
|
||||
pointNumeric = Integer.valueOf(Lespoints.get(i).getText());
|
||||
point = String.valueOf(pointNumeric);
|
||||
} catch (Exception e2) {
|
||||
JOptionPane.showMessageDialog(null, "La valeur pour l'attribut " + Leslabels.get(i) + " n'est pas un entier");
|
||||
}
|
||||
}
|
||||
|
||||
if(Lesevaluer.get(i).isSelected()) value = value + point;
|
||||
|
||||
|
||||
nod.getAttributs().put(Leslabels.get(i).getText(), value);
|
||||
|
||||
J.refreshAffichage(nod);
|
||||
dispose();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
addMouseListener((MouseListener) new MouseAdapter() {
|
||||
public void mousePressed(MouseEvent me) {
|
||||
System.out.println(me);
|
||||
Component focusOwner = FocusManager.getCurrentManager().getFocusOwner();
|
||||
System.out.println(focusOwner.getName());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class MyMouseListener extends MouseAdapter {
|
||||
public void mouseClicked(MouseEvent evt) {
|
||||
if (evt.getClickCount() == 3) {
|
||||
System.out.println("triple-click");
|
||||
} else if (evt.getClickCount() == 2) {
|
||||
System.out.println("double-click");
|
||||
}
|
||||
else if (evt.getClickCount() == 1) {
|
||||
System.out.println("click");
|
||||
}
|
||||
Component focusOwner = FocusManager.getCurrentManager().getFocusOwner();
|
||||
indexSelect = Lesvaleurs.indexOf(focusOwner);
|
||||
System.out.println("indexSelect = " + indexSelect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package fenetres;
|
||||
|
||||
public class baliseStyle {
|
||||
|
||||
public baliseStyle() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static String balise() {
|
||||
return "<style type=\"text/css\">"
|
||||
+ "h1 {margin-bottom: 0.25cm;font-size: 20pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
|
||||
+ "h2 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:center;font-weight: bold;}"
|
||||
+ "h3 {margin-bottom: 0.25cm;font-size: 16pt;font-family:\"Arial\";text-align:left;font-weight: bold;}"
|
||||
+ "h4 {text-align:left;font-family: \"Arial\"; font-size: 16pt; font-weight: bold; line-height: 110%;}"
|
||||
+ "p {font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "hr { display: block; margin-top: 0.5em; margin-bottom: 8em; margin-left: 2em; margin-right: 2em; border-style: inset; border-width: 4px;}"
|
||||
+ "spanpablo { float: right; width: 8em; font-size: 250%; font-family: algerian, courier; line-height: 80%; margin-right: 1%; color: red; text-align: center}"
|
||||
+ ".p1{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "bleu{color:blue;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: #AAAAAA; margin-left: 0cm; white-space: pre;}"
|
||||
+ ".city { background-color: transparent;color: #008B8B;padding: 10px;}"
|
||||
+ ".rouge { background-color: #8B0000;color: white;padding: 10px;}"
|
||||
+ "li.p2{color:green;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "li.p4{color:#FF8C00;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "li.p3{color:red;font-family:\"Arial\";font-size: 14pt;margin-bottom: 0cm; margin-top: 0cm; line-height: 0%; background: transparent; margin-left: 0cm; white-space: pre;}"
|
||||
+ "p.p4{margin-left: 0px; margin-bottom: 0cm; margin-top: 4px; line-height: 115%}"
|
||||
+ "p.p5 {color: navy;text-indent: 30px;}"
|
||||
+ ".center { display: block;margin-left: auto;margin-right: auto;width: 50%}"
|
||||
+ "</style>";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,847 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.Enumeration;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JSplitPane;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.DefaultTreeCellRenderer;
|
||||
import javax.swing.tree.TreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
import javax.swing.tree.TreeSelectionModel;
|
||||
|
||||
import calc.commandes;
|
||||
import fenetres.create_act.actAPropos;
|
||||
import fenetres.create_act.actAbout;
|
||||
import fenetres.create_act.actAddMenuFalse;
|
||||
import fenetres.create_act.actAddMenuTrue;
|
||||
import fenetres.create_act.actAfficheInformationFichierAnalyse;
|
||||
import fenetres.create_act.actAttribut;
|
||||
import fenetres.create_act.actCoefficient;
|
||||
import fenetres.create_act.actCollapseAll;
|
||||
import fenetres.create_act.actCollapseNode;
|
||||
import fenetres.create_act.actDeleteNode;
|
||||
import fenetres.create_act.actDocumentation;
|
||||
import fenetres.create_act.actDownNode;
|
||||
import fenetres.create_act.actEvalNameNodeNon;
|
||||
import fenetres.create_act.actEvalNameNodeOui;
|
||||
import fenetres.create_act.actEvalNamePageNon;
|
||||
import fenetres.create_act.actEvalNamePageOui;
|
||||
import fenetres.create_act.actEvalueFalse;
|
||||
import fenetres.create_act.actEvalueTrue;
|
||||
import fenetres.create_act.actEvaluer;
|
||||
import fenetres.create_act.actEvaluerTousEnfantsFalse;
|
||||
import fenetres.create_act.actEvaluerTousEnfantsTrue;
|
||||
import fenetres.create_act.actExit;
|
||||
import fenetres.create_act.actExpandAll;
|
||||
import fenetres.create_act.actExpandNode;
|
||||
import fenetres.create_act.actNewFichierAnalyse;
|
||||
import fenetres.create_act.actNodeFichier;
|
||||
import fenetres.create_act.actOpen;
|
||||
import fenetres.create_act.actSave;
|
||||
import fenetres.create_act.actSaveAs;
|
||||
import fenetres.create_act.actSetting;
|
||||
import fenetres.create_act.actSupprimeTitre;
|
||||
import fenetres.create_act.actTitre1;
|
||||
import fenetres.create_act.actTitre2;
|
||||
import fenetres.create_act.actTitre3;
|
||||
import fenetres.create_act.actTitrePrincipal;
|
||||
import fenetres.create_act.actTotalPoint;
|
||||
import fenetres.create_act.actTotalPointNode;
|
||||
import fenetres.create_act.actTousLesNodesEvaluer;
|
||||
import fenetres.create_act.actTutoriels;
|
||||
import fenetres.create_act.actUpNode;
|
||||
import fenetres.create_act.actsautfalse;
|
||||
import fenetres.create_act.actsauttrue;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
|
||||
|
||||
|
||||
public final class create extends JFrame {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// les élément de create
|
||||
private static JTree tree = new JTree();
|
||||
private static DefaultMutableTreeNode selectNode;
|
||||
private static afficheText textNodeSelect = new afficheText();
|
||||
private JToolBar toolBarPrincipal;
|
||||
|
||||
|
||||
private JMenuBar menuBar = new JMenuBar();
|
||||
private static JButton buttonEvaluate;
|
||||
|
||||
private static JToggleButton tglbtnTousLesNodes;
|
||||
|
||||
private JPanel panelPrincipal;
|
||||
|
||||
|
||||
private static create instance;
|
||||
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public create() {
|
||||
try {
|
||||
initialize();
|
||||
} catch (UnsupportedLookAndFeelException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
public static create getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new create();
|
||||
}
|
||||
instance.setVisible(true);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
* @throws UnsupportedLookAndFeelException
|
||||
*/
|
||||
private void initialize() throws UnsupportedLookAndFeelException {
|
||||
|
||||
setSize(1200,800);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
|
||||
setTitle(commandes.Titre + " " + commandes.version + " " + commandes.branch);
|
||||
setIconImage(img.getImage());
|
||||
|
||||
setLocationRelativeTo( null );
|
||||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
|
||||
// Construction et injection de la barre de menu
|
||||
setJMenuBar( this.createMenuBar() );
|
||||
tree.setVisibleRowCount(30);
|
||||
|
||||
// Ajoute le menu contextuel de la tree
|
||||
tree.setComponentPopupMenu(null);
|
||||
|
||||
this.createToolBar();
|
||||
|
||||
panelPrincipal = new JPanel();
|
||||
getContentPane().add(panelPrincipal, BorderLayout.NORTH);
|
||||
|
||||
this.createPopupMenuTree(null);
|
||||
|
||||
// The content of the window
|
||||
if(commandes.fichierAnalyseValide) tree = commandes.tree;
|
||||
|
||||
JScrollPane leftScrollPane = new JScrollPane( );
|
||||
leftScrollPane.setPreferredSize( new Dimension(400, 0) );
|
||||
JScrollPane rightScrollPane = new JScrollPane( );
|
||||
|
||||
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftScrollPane, rightScrollPane );
|
||||
splitPane.setBounds(10, 10, 1364, 783);
|
||||
rightScrollPane.setViewportView(textNodeSelect);
|
||||
textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));
|
||||
|
||||
leftScrollPane.setViewportView(tree);
|
||||
tree.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
|
||||
getContentPane().add(splitPane, BorderLayout.CENTER);
|
||||
panelPrincipal.setLayout(new GridLayout(1, 1, 0, 0));
|
||||
panelPrincipal.add(toolBarPrincipal);
|
||||
|
||||
|
||||
|
||||
|
||||
// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top");
|
||||
// panelPrincipal.add(bRecherche2, "cell 0 1,alignx left,aligny top");
|
||||
|
||||
|
||||
// panelPrincipal.add(label, "cell 2 1,alignx left,aligny center");
|
||||
|
||||
if(commandes.fichierAnalyseValide) constructionTree();
|
||||
|
||||
this.setExtendedState(MAXIMIZED_BOTH);
|
||||
|
||||
ListenerAction();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selection du nodeAC du tree et d'un nodeAC CXML
|
||||
*/
|
||||
private void ListenerAction() {
|
||||
|
||||
/**
|
||||
* Selection d'un nodeAC dans le JTree.
|
||||
*/
|
||||
tree.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if(tree.getSelectionPath()!=null) {
|
||||
selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
|
||||
nodeAC nod = (nodeAC) selectNode.getUserObject();
|
||||
createPopupMenuTree(nod);
|
||||
textNodeSelect.refreshAffichage(nod);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Fermeture de la fenêtre.
|
||||
*/
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
dispose();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// chckbxtoolBarRecherche.addChangeListener(new ChangeListener() {
|
||||
// public void stateChanged(ChangeEvent e) {
|
||||
// if(chckbxtoolBarRecherche.isSelected()) {
|
||||
//// panelPrincipal.add(bRecherche);
|
||||
// panelPrincipal.add(bRecherche, "cell 0 1,alignx left,aligny top");
|
||||
// bRecherche.setVisible(true);
|
||||
// bRecherche.setEnabled(true);
|
||||
// }else {
|
||||
// bRecherche.setVisible(false);
|
||||
// bRecherche.setEnabled(false);
|
||||
// panelPrincipal.remove(bRecherche);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Création du menu contextuel du tree
|
||||
* @return
|
||||
*/
|
||||
private void createPopupMenuTree(nodeAC nod) {
|
||||
|
||||
if(nod!=null) {
|
||||
|
||||
boolean nodeSetting = false;
|
||||
boolean nodeFormatageDirectePasDeTitrePasAddMenu = false;
|
||||
|
||||
|
||||
nodeAC nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
|
||||
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());
|
||||
mnEvaluer.add(new actEvalueFalse());
|
||||
|
||||
//Menu arbre
|
||||
JMenu mnManageTree = new JMenu("Arbre");
|
||||
mnManageTree.add(new actUpNode());
|
||||
mnManageTree.add(new actDownNode());
|
||||
mnManageTree.addSeparator();
|
||||
mnManageTree.add(new actExpandAll());
|
||||
mnManageTree.add(new actExpandNode());
|
||||
mnManageTree.addSeparator();
|
||||
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")));
|
||||
mnSaut.add(new actsauttrue());
|
||||
mnSaut.add(new actsautfalse());
|
||||
|
||||
//Menu saut niveau = 1
|
||||
//Menu Saut
|
||||
JMenu mnSautNiveau1 = new JMenu("Saut de ligne avant");
|
||||
mnSautNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/sautmini.png")));
|
||||
mnSautNiveau1.add(new actsauttrue());
|
||||
mnSautNiveau1.add(new actsautfalse());
|
||||
|
||||
|
||||
//Menu Titre niveau > 1
|
||||
JMenu mnTitre = new JMenu("Titre");
|
||||
mnTitre.setIcon( new ImageIcon(create.class.getResource("/resources/titremini.png")));
|
||||
mnTitre.add(new actTitrePrincipal());
|
||||
mnTitre.add(new actTitre1());
|
||||
mnTitre.add(new actTitre2());
|
||||
mnTitre.add(new actTitre3());
|
||||
mnTitre.addSeparator();
|
||||
mnTitre.add(new actSupprimeTitre());
|
||||
|
||||
//Menu Titre niveau = 1
|
||||
JMenu mnTitreNiveau1 = new JMenu("Titre");
|
||||
mnTitreNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/titremini.png")));
|
||||
mnTitreNiveau1.add(new actTitrePrincipal());
|
||||
mnTitreNiveau1.add(new actTitre1());
|
||||
mnTitreNiveau1.add(new actTitre2());
|
||||
mnTitreNiveau1.add(new actTitre3());
|
||||
mnTitreNiveau1.addSeparator();
|
||||
mnTitreNiveau1.add(new actSupprimeTitre());
|
||||
|
||||
//Menu ajoute un lien de menu niveau 1
|
||||
JMenu mnAddMenuNiveau1= new JMenu("Lien"); //addMenu
|
||||
mnAddMenuNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/addmenumini.png")));
|
||||
mnAddMenuNiveau1.add(new actAddMenuTrue());
|
||||
mnAddMenuNiveau1.add(new actAddMenuFalse());
|
||||
|
||||
//Menu ajoute un lien de menu niveau sup 1
|
||||
JMenu mnAddMenuNiveauSup1= new JMenu("Lien"); //addMenu
|
||||
mnAddMenuNiveauSup1.setIcon( new ImageIcon(create.class.getResource("/resources/addmenumini.png")));
|
||||
mnAddMenuNiveauSup1.add(new actAddMenuTrue());
|
||||
mnAddMenuNiveauSup1.add(new actAddMenuFalse());
|
||||
|
||||
|
||||
//Menu Evaluer présence d'un nodeAC pour les nodes de niveau > 1
|
||||
JMenu mnEvalNameNode = new JMenu("Evaluer la présence du nodeAC");
|
||||
mnEvalNameNode.setIcon(new ImageIcon(create.class.getResource("/resources/evalnodemini.png")));
|
||||
mnEvalNameNode.add(new actEvalNameNodeOui());
|
||||
mnEvalNameNode.add(new actEvalNameNodeNon());
|
||||
|
||||
|
||||
//Menu evalNamePage (pour les nodes page)
|
||||
JMenu mnEvalNamePage = new JMenu("Evaluer le nom de la page");
|
||||
mnEvalNamePage.setIcon(new ImageIcon(create.class.getResource("/resources/evalnamepagemini.png")));
|
||||
mnEvalNamePage.add(new actEvalNamePageOui());
|
||||
mnEvalNamePage.add(new actEvalNamePageNon());
|
||||
|
||||
|
||||
//Menu Représentation dans le feedback
|
||||
JMenu mnPourFeedback = new JMenu("Pour représentation feedback");
|
||||
mnPourFeedback.add(mnSaut);
|
||||
if(!nodeFormatageDirectePasDeTitrePasAddMenu) {
|
||||
mnPourFeedback.addSeparator();
|
||||
mnPourFeedback.add(mnTitre);
|
||||
mnPourFeedback.addSeparator();
|
||||
mnPourFeedback.add(mnAddMenuNiveauSup1);
|
||||
}
|
||||
|
||||
|
||||
//***************************
|
||||
//** Menu nodeAC niveau = 1 ***
|
||||
//***************************
|
||||
JMenu mnNiveau1 = new JMenu("Attributs aW, niveau 1 ");
|
||||
mnNiveau1.setIcon( new ImageIcon(create.class.getResource("/resources/attributanalysewritermini.png")));
|
||||
mnNiveau1.add(new actCoefficient());
|
||||
mnNiveau1.addSeparator();
|
||||
mnNiveau1.add(mnSautNiveau1);
|
||||
mnNiveau1.addSeparator();
|
||||
mnNiveau1.add(mnTitreNiveau1);
|
||||
mnNiveau1.addSeparator();
|
||||
mnNiveau1.add(mnAddMenuNiveau1);
|
||||
|
||||
|
||||
|
||||
//*********************************************
|
||||
//** La popupMenu qui s'affiche sur le tree ***
|
||||
//*********************************************
|
||||
JPopupMenu mnPopupTree = new JPopupMenu();
|
||||
if(!nodeSetting) {
|
||||
mnPopupTree.add(mnEvaluer);
|
||||
}
|
||||
if(nod.getLevel()==1 ) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnNiveau1);
|
||||
}
|
||||
|
||||
//Pour les nodes de niveau supérieur à 1
|
||||
if(nod.getLevel()>1 ) {
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnPourFeedback);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actAttribut());
|
||||
}
|
||||
|
||||
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(mnManageTree);
|
||||
mnPopupTree.addSeparator();
|
||||
mnPopupTree.add(new actDeleteNode());
|
||||
|
||||
|
||||
tree.setComponentPopupMenu(mnPopupTree);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Methode de construction de la barre de menu */
|
||||
private JMenuBar createMenuBar() {
|
||||
|
||||
// La barre de menu à proprement parler
|
||||
menuBar = new JMenuBar();
|
||||
|
||||
// Définition du menu déroulant "File" et de son contenu
|
||||
JMenu mnuFile = new JMenu( "Fichier" );
|
||||
mnuFile.setMnemonic( 'F' );
|
||||
|
||||
/*JMenuItem mnuNewFile =*/
|
||||
mnuFile.add( new actOpen() );
|
||||
mnuFile.add( new actNewFichierAnalyse() );
|
||||
mnuFile.addSeparator();
|
||||
mnuFile.add( new actSave() );
|
||||
mnuFile.add( new actSaveAs() );
|
||||
mnuFile.addSeparator();
|
||||
mnuFile.add( new actExit() );
|
||||
|
||||
menuBar.add(mnuFile);
|
||||
|
||||
// Définition du menu déroulant "Edit" et de son contenu
|
||||
JMenu mnuEdit = new JMenu( "Edition" );
|
||||
mnuEdit.setMnemonic( 'E' );
|
||||
|
||||
// mnuEdit.add( actUndo );
|
||||
// mnuEdit.add( actRedo );
|
||||
// mnuEdit.addSeparator();
|
||||
// mnuEdit.add( actCopy );
|
||||
// mnuEdit.add( actCut );
|
||||
// mnuEdit.add( actPaste );
|
||||
|
||||
menuBar.add(mnuEdit);
|
||||
|
||||
JMenu mnAffiche = new JMenu("Affichage");
|
||||
menuBar.add(mnAffiche);
|
||||
|
||||
// chckbxtoolBarRecherche = new JCheckBoxMenuItem("Barre outils recherche nodeAC");
|
||||
// chckbxtoolBarRecherche.setSelected(true);
|
||||
// mnAffiche.add(chckbxtoolBarRecherche);
|
||||
|
||||
// Définition du menu Node
|
||||
JMenu mnNode = new JMenu("Modifier");
|
||||
mnNode.add( new actNodeFichier() );
|
||||
mnNode.addSeparator();
|
||||
menuBar.add(mnNode);
|
||||
|
||||
//Menu arbre
|
||||
JMenu mnManageTree = new JMenu("Arbre");
|
||||
mnManageTree.add(new actUpNode());
|
||||
mnManageTree.add(new actDownNode());
|
||||
mnManageTree.addSeparator();
|
||||
mnManageTree.add(new actExpandAll());
|
||||
mnManageTree.add(new actExpandNode());
|
||||
mnManageTree.addSeparator();
|
||||
mnManageTree.add(new actCollapseAll());
|
||||
mnManageTree.add(new actCollapseNode());
|
||||
mnNode.add(mnManageTree);
|
||||
mnNode.addSeparator();
|
||||
|
||||
//Définition Evaluer
|
||||
JMenu mnEvaluer = new JMenu("Evaluer");
|
||||
mnEvaluer.add(new actEvalueTrue());
|
||||
mnEvaluer.add(new actEvalueFalse());
|
||||
mnNode.add(mnEvaluer);
|
||||
|
||||
|
||||
|
||||
// Définition du menu déroulant "Création évaluation" et de son contenu
|
||||
JMenu mnuExercice = new JMenu( "Création évaluation" );
|
||||
mnuExercice.setMnemonic( 'N' );
|
||||
mnuExercice.add(new actEvaluer());
|
||||
|
||||
menuBar.add(mnuExercice);
|
||||
|
||||
// Définition du menu déroulant "Help" et de son contenu
|
||||
JMenu mnuHelp = new JMenu( "Aide" );
|
||||
mnuHelp.setMnemonic( 'H' );
|
||||
|
||||
mnuHelp.add( new actAPropos());
|
||||
mnuHelp.add( new actDocumentation());
|
||||
|
||||
menuBar.add( mnuHelp );
|
||||
|
||||
return menuBar;
|
||||
}
|
||||
|
||||
/* Methode de construction de la barre d'outils */
|
||||
private void createToolBar() {
|
||||
toolBarPrincipal = new JToolBar();
|
||||
toolBarPrincipal.setFloatable(false);
|
||||
toolBarPrincipal.setRollover(true);
|
||||
|
||||
toolBarPrincipal.setName("outils principaux");
|
||||
|
||||
JButton buttonLoadFile = toolBarPrincipal.add( new actOpen() );
|
||||
buttonLoadFile.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyse.png")));
|
||||
buttonLoadFile.setHideActionText(true);
|
||||
toolBarPrincipal.add(buttonLoadFile);
|
||||
|
||||
JButton btnNewFichierAnalyse = toolBarPrincipal.add( new actNewFichierAnalyse() );
|
||||
btnNewFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierODF.png")));
|
||||
btnNewFichierAnalyse.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnNewFichierAnalyse);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
buttonEvaluate = toolBarPrincipal.add( new actEvaluer() );
|
||||
buttonEvaluate.setIcon(new ImageIcon(create.class.getResource("/resources/evaluate.png")));
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
JButton btnAfficheInformationFichierAnalyse = toolBarPrincipal.add( new actAfficheInformationFichierAnalyse() );
|
||||
btnAfficheInformationFichierAnalyse.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyseInfo.png")));
|
||||
btnAfficheInformationFichierAnalyse.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnAfficheInformationFichierAnalyse);
|
||||
|
||||
JButton btnNodeFichier = toolBarPrincipal.add( new actNodeFichier() );
|
||||
btnNodeFichier.setIcon(new ImageIcon(create.class.getResource("/resources/nodeFichier.png")));
|
||||
btnNodeFichier.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnNodeFichier);
|
||||
|
||||
JButton btnSetting = toolBarPrincipal.add( new actSetting());
|
||||
btnSetting.setIcon(new ImageIcon(create.class.getResource("/resources/setting.png")));
|
||||
toolBarPrincipal.add(btnSetting);
|
||||
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
JButton btnEvaluerTrue = toolBarPrincipal.add( new actEvalueTrue() );
|
||||
btnEvaluerTrue.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertrue.png")));
|
||||
btnEvaluerTrue.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnEvaluerTrue);
|
||||
|
||||
JButton btnEvaluerFalse = toolBarPrincipal.add(new actEvalueFalse() );
|
||||
btnEvaluerFalse.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerfalse.png")));
|
||||
btnEvaluerFalse.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnEvaluerFalse);
|
||||
|
||||
JButton btnEvaluerTouteLaBrancheEtLesEnfantTrue = toolBarPrincipal.add( new actEvaluerTousEnfantsTrue() );
|
||||
btnEvaluerTouteLaBrancheEtLesEnfantTrue.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")));
|
||||
btnEvaluerTouteLaBrancheEtLesEnfantTrue.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnEvaluerTouteLaBrancheEtLesEnfantTrue);
|
||||
|
||||
JButton btnEvaluerTouteLaBrancheEtLesEnfantFalse = toolBarPrincipal.add( new actEvaluerTousEnfantsFalse() );
|
||||
btnEvaluerTouteLaBrancheEtLesEnfantFalse.setIcon(new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsfaux.png")));
|
||||
btnEvaluerTouteLaBrancheEtLesEnfantTrue.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnEvaluerTouteLaBrancheEtLesEnfantFalse);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
|
||||
JButton btnAttribut = new JButton(new actAttribut());
|
||||
btnAttribut.setText("");
|
||||
btnAttribut.setIcon(new ImageIcon(create.class.getResource("/resources/attribut.png")));
|
||||
toolBarPrincipal.add(btnAttribut);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
JButton btnTotalPoint = new JButton(new actTotalPoint());
|
||||
btnTotalPoint.setToolTipText("Nombre de point total dans l'exercice.");
|
||||
btnTotalPoint.setText("");
|
||||
btnTotalPoint.setIcon(new ImageIcon(create.class.getResource("/resources/totalpoint.png")));
|
||||
toolBarPrincipal.add(btnTotalPoint);
|
||||
|
||||
JButton btnTotalPointNode = toolBarPrincipal.add( new actTotalPointNode() );
|
||||
btnTotalPointNode.setIcon(new ImageIcon(create.class.getResource("/resources/totalpointnode.png")));
|
||||
btnTotalPointNode.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnTotalPointNode);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
|
||||
tglbtnTousLesNodes = new JToggleButton("");
|
||||
tglbtnTousLesNodes.setAction(new actTousLesNodesEvaluer());
|
||||
tglbtnTousLesNodes.setIcon(new ImageIcon(create.class.getResource("/resources/lesnodesevaluer.png")));
|
||||
toolBarPrincipal.add(tglbtnTousLesNodes);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
JButton btnAbout = toolBarPrincipal.add( new actAbout() );
|
||||
btnAbout.setIcon(new ImageIcon(create.class.getResource("/resources/apropos.png")));
|
||||
btnAbout.setHideActionText( true );
|
||||
toolBarPrincipal.add(btnAbout);
|
||||
|
||||
|
||||
JButton btnNewButton = toolBarPrincipal.add( new actTutoriels());
|
||||
btnNewButton.setIcon(new ImageIcon(create.class.getResource("/resources/tutoriel.png")));
|
||||
btnNewButton.setHideActionText(true);
|
||||
toolBarPrincipal.add(btnNewButton);
|
||||
|
||||
toolBarPrincipal.addSeparator();
|
||||
|
||||
JButton buttonExit = toolBarPrincipal.add( new actExit() );
|
||||
buttonExit.setHideActionText( true );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void closeWindows() {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void closeDirectlyWindows() {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
// public static void expandOrCollapsePath (JTree tree,TreePath treePath,int level,int currentLevel,boolean expand) {
|
||||
// System.out.println("Exp level="+currentLevel+", exp="+expand + ", level=" + level);
|
||||
// if (expand && level<=currentLevel && level>0) return;
|
||||
//
|
||||
// TreeNode treeNode = ( TreeNode ) treePath.getLastPathComponent();
|
||||
// TreeModel treeModel=tree.getModel();
|
||||
// if ( treeModel.getChildCount(treeNode) >= 0 ) {
|
||||
// for ( int i = 0; i < treeModel.getChildCount(treeNode); i++ ) {
|
||||
// TreeNode n = ( TreeNode )treeModel.getChild(treeNode, i);
|
||||
// TreePath path = treePath.pathByAddingChild( n );
|
||||
// expandOrCollapsePath(tree,path,level,currentLevel+1,expand);
|
||||
// }
|
||||
// if (!expand && currentLevel<level) return;
|
||||
// }
|
||||
// if (expand) {
|
||||
// tree.expandPath( treePath );
|
||||
//// System.err.println("Path expanded at level "+currentLevel+"-"+treePath);
|
||||
// } else {
|
||||
// tree.collapsePath(treePath);
|
||||
//// System.err.println("Path collapsed at level "+currentLevel+"-"+treePath);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* Construction du Tree avec le nodeAC sujet.
|
||||
*/
|
||||
public static void constructionTree() {
|
||||
|
||||
|
||||
DefaultMutableTreeNode root = null;
|
||||
|
||||
commandes.tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
|
||||
commandes.tree.setExpandsSelectedPaths(true);
|
||||
commandes.tree.setInvokesStopCellEditing(true);
|
||||
|
||||
tree.setExpandsSelectedPaths(true);
|
||||
tree.setInvokesStopCellEditing(true);
|
||||
|
||||
//Construction si c'est un fichier d'analyse
|
||||
if(commandes.sujet.getNomElt().equals("classeur")) {
|
||||
root = new DefaultMutableTreeNode(commandes.sujet,true);
|
||||
root = addNodeMutable(commandes.sujet, root);
|
||||
|
||||
commandes.tree = new JTree(root);
|
||||
|
||||
DefaultTreeCellRenderer cellRenderer = (DefaultTreeCellRenderer) commandes.tree.getCellRenderer();
|
||||
|
||||
|
||||
cellRenderer.setOpenIcon(new ImageIcon(create.class.getResource("/resources/treeOpen.png")));
|
||||
cellRenderer.setClosedIcon(new ImageIcon(create.class.getResource("/resources/treeClose.png")));
|
||||
cellRenderer.setLeafIcon(new ImageIcon(create.class.getResource("/resources/treeLeaf.png")));
|
||||
|
||||
cellRenderer.setBackgroundNonSelectionColor(new Color(255, 255, 221));
|
||||
cellRenderer.setBackgroundSelectionColor(new Color(0, 0, 128));
|
||||
cellRenderer.setBorderSelectionColor(Color.black);
|
||||
cellRenderer.setTextSelectionColor(Color.white);
|
||||
cellRenderer.setTextNonSelectionColor(Color.blue);
|
||||
|
||||
|
||||
tree.setCellRenderer(cellRenderer);
|
||||
|
||||
// tree.setCellRenderer(new MyTreeCellRenderer());
|
||||
|
||||
tree.setModel(commandes.tree.getModel()) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Permet la construction du tree.
|
||||
* @param nod
|
||||
* @param parent
|
||||
* @return
|
||||
*/
|
||||
private static DefaultMutableTreeNode addNodeMutable(nodeAC nod, DefaultMutableTreeNode parent) {
|
||||
if(nod!=null) {
|
||||
DefaultMutableTreeNode node1 = null;
|
||||
for(int i = 0 ; i < nod.getNodes().size(); i++) {
|
||||
if(!nod.getNodes().get(i).getNomElt().equals("settings")) {
|
||||
node1 = new DefaultMutableTreeNode(nod.getNodes().get(i));
|
||||
addNodeMutable(nod.getNodes().get(i), node1);
|
||||
parent.add(node1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
|
||||
public static JTree getTree() {
|
||||
return tree;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static DefaultMutableTreeNode getSelectNode() {
|
||||
return selectNode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static afficheText getTextNodeSelect() {
|
||||
return textNodeSelect;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static JToggleButton getTglbtnTousLesNodes() {
|
||||
return tglbtnTousLesNodes;
|
||||
}
|
||||
|
||||
public static JButton getButtonEvaluate() {
|
||||
return buttonEvaluate;
|
||||
}
|
||||
|
||||
public static void expandAll() {
|
||||
Enumeration<?> topLevelNodes = ((TreeNode) tree.getModel().getRoot()).children();
|
||||
while(topLevelNodes.hasMoreElements()) {
|
||||
DefaultMutableTreeNode N = (DefaultMutableTreeNode) topLevelNodes.nextElement();
|
||||
tree.expandPath(new TreePath(N.getPath()));
|
||||
expandNode( N);
|
||||
}
|
||||
}
|
||||
|
||||
public static void collapseAll() {
|
||||
Enumeration<?> topLevelNodes = ((TreeNode) tree.getModel().getRoot()).children();
|
||||
while(topLevelNodes.hasMoreElements()) {
|
||||
DefaultMutableTreeNode N = (DefaultMutableTreeNode) topLevelNodes.nextElement();
|
||||
tree.collapsePath(new TreePath(N.getPath()));
|
||||
collapseNode(N);
|
||||
}
|
||||
}
|
||||
|
||||
public static void expandNode(DefaultMutableTreeNode N) {
|
||||
Enumeration<?> topLevelNodes = ((TreeNode) N).children();
|
||||
while(topLevelNodes.hasMoreElements()) {
|
||||
DefaultMutableTreeNode N1 = (DefaultMutableTreeNode) topLevelNodes.nextElement();
|
||||
tree.expandPath(new TreePath(N1.getPath()));
|
||||
expandNode(N1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void collapseNode(DefaultMutableTreeNode N) {
|
||||
Enumeration<?> topLevelNodes = ((TreeNode) N).children();
|
||||
while(topLevelNodes.hasMoreElements()) {
|
||||
DefaultMutableTreeNode N1 = (DefaultMutableTreeNode) topLevelNodes.nextElement();
|
||||
tree.collapsePath(new TreePath(N1.getPath()));
|
||||
collapseNode( N1 );
|
||||
}
|
||||
tree.collapsePath(new TreePath(N.getPath()));
|
||||
}
|
||||
|
||||
|
||||
// void saySomething(String eventDescription, TreeExpansionEvent e) {
|
||||
// System.out.println(eventDescription + "; " + "path = " + e.getPath());
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Required by TreeExpansionListener interface.
|
||||
// public void treeExpanded(TreeExpansionEvent e) {
|
||||
// saySomething("Tree-expanded event detected", e);
|
||||
// }
|
||||
//
|
||||
// // Required by TreeExpansionListener interface.
|
||||
// public void treeCollapsed(TreeExpansionEvent e) {
|
||||
// saySomething("Tree-collapsed event detected", e);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//class MyTreeWillExpandListener implements TreeWillExpandListener {
|
||||
//
|
||||
//
|
||||
// public void treeWillExpand(TreeExpansionEvent evt) throws ExpandVetoException {
|
||||
// JTree tree = (JTree) evt.getSource();
|
||||
//
|
||||
// TreePath path = evt.getPath();
|
||||
// boolean veto = false;
|
||||
// if (veto) {
|
||||
// throw new ExpandVetoException(evt);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void treeWillCollapse(TreeExpansionEvent evt) throws ExpandVetoException {
|
||||
// JTree tree = (JTree) evt.getSource();
|
||||
//
|
||||
// TreePath path = evt.getPath();
|
||||
// boolean veto = false;
|
||||
// if (veto) {
|
||||
// throw new ExpandVetoException(evt);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//class MyTreeExpansionListener implements TreeExpansionListener {
|
||||
//
|
||||
// public ArrayList<TreePath> Chemin = new ArrayList<TreePath>();
|
||||
//
|
||||
// public ArrayList<TreePath> getChemin() {
|
||||
// return Chemin;
|
||||
// }
|
||||
//
|
||||
// public void setChemin(ArrayList<TreePath> chemin) {
|
||||
// Chemin = chemin;
|
||||
// }
|
||||
//
|
||||
// public void treeExpanded(TreeExpansionEvent evt) {
|
||||
// TreePath path = evt.getPath();
|
||||
// Chemin.add(path);
|
||||
// System.out.println("treeExpanded");
|
||||
// }
|
||||
//
|
||||
// public void treeCollapsed(TreeExpansionEvent evt) {
|
||||
// TreePath path = evt.getPath();
|
||||
// Chemin.remove(path);
|
||||
// System.out.println("treeCollapsed");
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
@ -0,0 +1,33 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.about;
|
||||
import fenetres.create;
|
||||
|
||||
public class actAPropos extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Informations" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/aproposmini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_M );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Informations (CTRL+I)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
about.getInstance();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.about;
|
||||
import fenetres.create;
|
||||
|
||||
public class actAbout extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Informations" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/aproposmini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_I );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Informations (CTRL+I)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
about.getInstance();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
|
||||
public class actAddMenuFalse extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "false" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "false" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.addMenu(false);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actAddMenuTrue extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "true" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "true" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.addMenu(true);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
public class actAfficheInformationFichierAnalyse extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Affiche informations" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Affiche les informations du fichier d'analyse." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import fenetres.attributs;
|
||||
import fenetres.create;
|
||||
import list.listeAttributsAnalyseWriter;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actAttribut extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer les attributs Writer" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/attributmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/attributmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer les attributs du traitement de texte Writer" );
|
||||
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
|
||||
int nbrAttribut = nod.getAttributs().size();
|
||||
|
||||
Set<String> key = nod.getAttributs().keySet();
|
||||
for (String k : key) {
|
||||
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k)) {
|
||||
nbrAttribut--;
|
||||
}
|
||||
}
|
||||
|
||||
if(nbrAttribut>0) {
|
||||
if(nod.getLevel()>1 && !nod.chemin().contains("setting")) {
|
||||
new attributs(nod,fenetres.create.getTextNodeSelect());
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Vous ne pouvez pas modifier les attributs de ce nodeAC.");
|
||||
}
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Ce nodeAC ne contient pas d'attribut Writer.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.baliseStyle;
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actCoefficient extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Coefficient (poids)" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/poidsmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Coefficient (poids)" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
double poids = 1.00;
|
||||
if(nod.getAttributs().get("poids")!=null) {
|
||||
try {
|
||||
poids = Double.valueOf(nod.getAttributs().get("poids"));
|
||||
} catch (Exception e2) {
|
||||
System.out.println(e2.toString());
|
||||
}
|
||||
}
|
||||
|
||||
String a = JOptionPane.showInputDialog(null,"Quel est le coefficient de cette partie de l'évaluation?",poids);
|
||||
|
||||
if(!a.isEmpty()) {
|
||||
try {
|
||||
poids = Double.valueOf(a);
|
||||
if(poids<=0) {
|
||||
nod.poids(Double.valueOf(1));
|
||||
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>poids=1.</h2>");
|
||||
}else {
|
||||
nod.poids(Double.valueOf(poids));
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
|
||||
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>La valeur n'a pas été modifiée.</h2>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actCollapseAll extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Tout réduire" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/collapseallmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Tout réduire" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.collapseAll();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actCollapseNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Réduire ce node" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/collapsenodemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Réduire ce node" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.collapseNode(fenetres.create.getSelectNode());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
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 fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actDeleteNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Supprime" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/supprimemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
|
||||
if(fenetres.create.getTree().getSelectionPath()!=null) {
|
||||
int a = JOptionPane.showConfirmDialog(null,"Voulez-vous supprimer le nodeAC " + fenetres.create.getSelectNode().toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if(a == JOptionPane.YES_NO_OPTION) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
if(!(nod.getNomElt().equals("setting")||nod.getNomElt().equals("csv")||nod.getNomElt().equals("import_moodle")||nod.getNomElt().equals("zip")
|
||||
||nod.getNomElt().equals("plagiarism")||nod.getNomElt().equals("text:similarity")||nod.getNomElt().equals("color") ||nod.getNomElt().equals("translation") )) {
|
||||
|
||||
nod.getParent().supprimeNodeEnfant(nod);
|
||||
fenetres.create.constructionTree();
|
||||
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null,"Vous ne devez pas supprimer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actDocumentation extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Documentation" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/documentationmini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_D );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Documentation (CTRL+D)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Desktop d = Desktop.getDesktop();
|
||||
try {
|
||||
d.open(new File(create.class.getResource("/resources/documentation.pdf").getPath()));
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
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 fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actDownNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Descendre le nodeAC" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/downnodemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Descendre le nodeAC" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(fenetres.create.getTree().getSelectionPath()!=null) {
|
||||
int a = JOptionPane.showConfirmDialog(null,"Voulez-vous descendre le nodeAC " + fenetres.create.getSelectNode().toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if(a == JOptionPane.YES_NO_OPTION) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
if(!nod.chemin().contains("setting")) {
|
||||
nod.getParent().downNodeEnfant(nod);
|
||||
fenetres.create.constructionTree();
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null,"Vous ne devez pas déplacer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
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 fenetres.baliseStyle;
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalInitialCreator extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer la présence du premier auteur (créateur)" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence du premier auteur (créateur)" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/auteurcreateurmini.png")) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalNameInitialCreator")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator"));
|
||||
}
|
||||
|
||||
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("evalNameInitialCreator", 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>evalNameInitialCreator=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalNameInitialCreator", 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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalNameNodeNon extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Supprime l'évaluation de la présence du nodeAC" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du nodeAC" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.supprimeAttribut("evalNameNode");
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.baliseStyle;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalNameNodeOui extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Oui, combien de point?" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce nodeAC" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalNameNode")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalNameNode"));
|
||||
}
|
||||
|
||||
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("evalNameNode", 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>evalNameNode=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalNameNode", 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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalNamePageNon extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Supprime évaluer le nom de la page" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du nom de la page." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.supprimeAttribut("evalNamePage");
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.baliseStyle;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalNamePageOui extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Oui, combien de point?" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom de la page" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalNamePage")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalNamePage"));
|
||||
}
|
||||
|
||||
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("evalNamePage", 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>evalNamePage=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalNamePage", 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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalueFalse extends AbstractAction {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue(ACCELERATOR_KEY,
|
||||
KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));
|
||||
putValue(Action.NAME, "Evaluer false");
|
||||
putValue(Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluerfalsemini.png")));
|
||||
putValue(Action.SHORT_DESCRIPTION, "Ne pas évaluer ce nodeAC par l'application.");
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.evaluerFalse();
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvalueTrue extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.ALT_DOWN_MASK));
|
||||
putValue( Action.NAME, "Evaluer true" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertruemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer ce nodeAC par l'application" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.evaluerTrue();
|
||||
if(nod.getLevel()==1) {
|
||||
nod.addMenu(true);
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
import fenetres.evaluate;
|
||||
|
||||
public class actEvaluer extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/evaluate.png") ) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_E );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer un node (CTRL+E)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new evaluate();
|
||||
create.getInstance().dispose();
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvaluerTousEnfantsFalse extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer toute la branche" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer toute la branche de la racine à la feuille." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
if(!nod.getNomElt().equals("fichier")) {
|
||||
nod.evaluerAllChildFalse();
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actEvaluerTousEnfantsTrue extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer toute la branche" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfantsmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/evaluertouslesenfants.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer toute la branche de la racine à la feuille." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
if(!nod.getNomElt().equals("fichier")) {
|
||||
nod.evaluerAllChildTrue();
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actExit extends AbstractAction {
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Quitter" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/exitmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/exit.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_Q );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
create.getInstance().dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actExpandAll extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Tout étendre" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/expandallmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Tout étendre" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.expandAll();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actExpandNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Etendre ce node" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/expandnodemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Etendre ce node" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.expandNode(fenetres.create.getSelectNode());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import AnalyseCalc.Classeur2;
|
||||
import calc.commandes;
|
||||
import fenetres.evaluate;
|
||||
import nodeAC.Ecriture;
|
||||
import nodeAC.LecturesDossiers;
|
||||
import nodeAC.constructionNodeAvecString;
|
||||
import outils.verificationFichierAnalyse;
|
||||
|
||||
public class actNewFichierAnalyse extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierODF.png")));
|
||||
putValue( Action.NAME, "Génère un nouveau fichier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierODFmini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_N );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Générer un nouveau fichier d'analyse (CTRL+N)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
chooser.setDialogTitle("Choisir un fichier ODF");
|
||||
|
||||
chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
|
||||
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("Format ODF", "ods");
|
||||
chooser.setFileFilter(filter);
|
||||
chooser.setAcceptAllFileFilterUsed(true);
|
||||
|
||||
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||
|
||||
// réinitialise les commandes
|
||||
calc.commandes.initialiseCommandes();
|
||||
|
||||
calc.commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
|
||||
calc.commandes.PathFilenameAnalysis = chooser.getCurrentDirectory().getAbsolutePath();
|
||||
String cheminVersFichier = chooser.getSelectedFile().getAbsolutePath();
|
||||
calc.commandes.nameSujet = chooser.getSelectedFile().getName();
|
||||
|
||||
|
||||
try {
|
||||
new LecturesDossiers(cheminVersFichier);
|
||||
constructionNodeAvecString A = new constructionNodeAvecString();
|
||||
|
||||
;
|
||||
calc.commandes.sujet = A.NewNode(LecturesDossiers.getEC().getListeContentTableur().get(0));
|
||||
|
||||
// Manque la transformation d'un nodeAC en nodeAC pour l'analyse
|
||||
//calc.commandes.sujet = ...
|
||||
|
||||
calc.commandes.sujet.getAttributs().put("analysis_filename","sujet.xml");
|
||||
|
||||
Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
|
||||
|
||||
|
||||
// Ecriture.ecritureNodeEnXML(ClasseurAnalyse, "ClasseurAnalyse", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
|
||||
|
||||
|
||||
//calc.commandes.sujet = ecritureSujet.nodePourEcritureSujet(calc.commandes.sujet,b,0);
|
||||
|
||||
calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start");
|
||||
calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
|
||||
calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes");
|
||||
calc.commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change");
|
||||
|
||||
Classeur2 ClasseurAnalyse = new Classeur2(calc.commandes.sujet,0,Ecriture.typeFichier.fichier_analyse);
|
||||
// ClasseurAnalyse.ecritureClasseur(commandes.path);
|
||||
|
||||
calc.commandes.sujet = ClasseurAnalyse.convertClasseurToNode(Ecriture.typeFichier.fichier_analyse);
|
||||
|
||||
// Ecriture.ecritureNodeEnXML(calc.commandes.sujet, "sujet2", calc.commandes.path, Ecriture.typeFichier.fichier_etudiant);
|
||||
|
||||
|
||||
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
|
||||
|
||||
new verificationFichierAnalyse();
|
||||
System.out.println("Fichier d'analyse valide = " + calc.commandes.fichierAnalyseValide);
|
||||
|
||||
if(calc.commandes.fichierAnalyseValide) {
|
||||
fenetres.create.constructionTree();
|
||||
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
|
||||
}else {
|
||||
fenetres.create.getTextNodeSelect().setText("<h1>Le fichier n'est pas valise</h1>");
|
||||
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
|
||||
}
|
||||
|
||||
} catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (Exception e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(null);
|
||||
}
|
||||
|
||||
|
||||
calc.commandes.ecritCode = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.create;
|
||||
import fenetres.proprieteFichierAnalyse;
|
||||
|
||||
public class actNodeFichier extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Modifier les paramètres de l'évaluation" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/nodeFichiermini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/nodeFichier.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Modifier les paramètres de l'évaluation" );
|
||||
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
proprieteFichierAnalyse.getInstance();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
import fenetres.filechooserXML;
|
||||
|
||||
public class actOpen extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Ouvrir un fichier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalysemini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new filechooserXML();
|
||||
if(calc.commandes.fichierAnalyseValide) {
|
||||
fenetres.create.constructionTree();
|
||||
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
|
||||
}else {
|
||||
fenetres.create.constructionTree();
|
||||
fenetres.create.getTextNodeSelect().setContentType("text/plain");
|
||||
fenetres.create.getTextNodeSelect().setText(calc.commandes.message.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
import fenetres.create;
|
||||
import nodeAC.Ecriture;
|
||||
|
||||
public class actSave extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Enregister" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon( create.class.getResource("/resources/save.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Enregistrer (CTRL+S)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Pattern p = Pattern.compile("[.xml]\\b");
|
||||
Matcher m = p.matcher(calc.commandes.nameSujet);
|
||||
|
||||
String message="";
|
||||
|
||||
if(m.find()) {
|
||||
message="\"Voulez-vous enregistrer le fichier \"" + calc.commandes.nameSujet + "\"\n"
|
||||
+ "Dans le dossier " + calc.commandes.PathFilenameAnalysis;
|
||||
}else {
|
||||
message="\"Voulez-vous enregistrer le fichier \"" + calc.commandes.nameSujet + ".xml\"\n"
|
||||
+ "Dans le dossier " + calc.commandes.PathFilenameAnalysis;
|
||||
calc.commandes.nameSujet = calc.commandes.nameSujet + ".xml";
|
||||
}
|
||||
|
||||
int input = JOptionPane.showConfirmDialog(null, message);
|
||||
|
||||
if(input==0) {
|
||||
try {
|
||||
// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(calc.commandes.nameSujet);
|
||||
if(calc.commandes.sujet.retourneFirstEnfantsByName("settings")==null) {
|
||||
Ecriture.addSetting(calc.commandes.sujet);
|
||||
}
|
||||
Ecriture.ecritureNodeEnXML(calc.commandes.sujet, calc.commandes.nameSujet , calc.commandes.PathFilenameAnalysis, Ecriture.typeFichier.fichier_analyse);
|
||||
// Run.ecritureNodeEnXML(calc.commandes.sujet, calc.commandes.nameSujet ,calc.commandes.PathFilenameAnalysis,"sujet");
|
||||
|
||||
if(m.find()) {
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + " a été réenregistré.\n\n"
|
||||
+ "Il se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}else {
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été réenregistré.\n\n"
|
||||
+ "Il se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}
|
||||
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFileChooser;
|
||||
|
||||
import fenetres.create;
|
||||
import nodeAC.Ecriture;
|
||||
|
||||
|
||||
public class actSaveAs extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Enregistrer sous..." );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/save_as.png") ));
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_A );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Enregistrer sous..." );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JFileChooser fileChooser = new JFileChooser();
|
||||
fileChooser.setDialogTitle("Enregistrer sous...");
|
||||
File file = null;
|
||||
|
||||
if(!calc.commandes.nameSujet.isEmpty()) {
|
||||
file = new File(calc.commandes.PathFilenameAnalysis ); //+ "\\" + utils.filename + ".xml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
fileChooser.setCurrentDirectory(file);
|
||||
|
||||
int userSelection = fileChooser.showSaveDialog(null);
|
||||
|
||||
if (userSelection == JFileChooser.APPROVE_OPTION) {
|
||||
File fileToSave = fileChooser.getSelectedFile();
|
||||
try {
|
||||
|
||||
// verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(fileToSave.getName());
|
||||
|
||||
if(calc.commandes.sujet.retourneFirstEnfantsByName("settings")==null) {
|
||||
Ecriture.addSetting(calc.commandes.sujet);
|
||||
}
|
||||
Ecriture.ecritureNodeEnXML(calc.commandes.sujet, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),Ecriture.typeFichier.fichier_analyse);
|
||||
calc.commandes.nameSujet = fileToSave.getName();
|
||||
calc.commandes.PathFilenameAnalysis = fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\"));
|
||||
|
||||
Pattern p = Pattern.compile("[.xml]\\b");
|
||||
Matcher m = p.matcher(calc.commandes.nameSujet);
|
||||
|
||||
if(m.find()) {
|
||||
file = new File(calc.commandes.PathFilenameAnalysis + "\\" + calc.commandes.nameSujet);
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + " a été renregistré.\n\nIl se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}else {
|
||||
file = new File(calc.commandes.PathFilenameAnalysis + "\\" + calc.commandes.nameSujet + ".xml");
|
||||
fenetres.create.getTextNodeSelect().setText("Le fichier \"" + calc.commandes.nameSujet + ".xml\" a été renregistré.\n\nIl se trouve dans le dossier " + calc.commandes.PathFilenameAnalysis);
|
||||
}
|
||||
|
||||
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
System.out.println("Save as file: " + fileToSave.getAbsolutePath());
|
||||
}
|
||||
System.out.println( "Save as" );
|
||||
}
|
||||
|
||||
}
|
@ -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 fenetres.create;
|
||||
import fenetres.setting;
|
||||
|
||||
public class actSetting extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Settings" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/settingmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/setting.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Modifier les paramètres" );
|
||||
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
setting.getInstance();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actSupprimeTitre extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Supprimer le titre" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime le titre" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
if(nod.getAttributs().get("titre")!=null) {
|
||||
nod.supprimeAttribut("titre");
|
||||
}
|
||||
if(nod.getAttributs().get("titre1")!=null) {
|
||||
nod.supprimeAttribut("titre1");
|
||||
}
|
||||
if(nod.getAttributs().get("titre2")!=null) {
|
||||
nod.supprimeAttribut("titre2");
|
||||
}
|
||||
if(nod.getAttributs().get("titre3")!=null) {
|
||||
nod.supprimeAttribut("titre3");
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actTitre1 extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Titre 1" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Titre 1" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
String titre = "";
|
||||
if(nod.getAttributs().get("titre1")!=null) {
|
||||
titre = nod.getAttributs().get("titre1");
|
||||
}
|
||||
|
||||
String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
|
||||
nod.titre1(a);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actTitre2 extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Titre 2" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Titre 2" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
String titre = "";
|
||||
if(nod.getAttributs().get("titre2")!=null) {
|
||||
titre = nod.getAttributs().get("titre2");
|
||||
}
|
||||
|
||||
String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
|
||||
nod.titre2(a);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actTitre3 extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Titre 3" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Titre 3" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
String titre = "";
|
||||
if(nod.getAttributs().get("titre3")!=null) {
|
||||
titre = nod.getAttributs().get("titre3");
|
||||
}
|
||||
|
||||
String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
|
||||
nod.titre3(a);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actTitrePrincipal extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Titre principal" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Titre principal" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
String titre = "";
|
||||
if(nod.getAttributs().get("titre")!=null) {
|
||||
titre = nod.getAttributs().get("titre");
|
||||
}
|
||||
|
||||
String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre);
|
||||
nod.titre(a);
|
||||
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import calcul.calculNombrePointEvaluation;
|
||||
import fenetres.create;
|
||||
|
||||
public class actTotalPoint extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Nombre de point" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Nombre de point total dans l'exercice" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointmini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpoint.png")) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
fenetres.create.getTextNodeSelect().afficheListeDesPointsDansToutExercice(calculNombrePointEvaluation.calculPointDansToutExercice());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import calcul.calculNombrePointEvaluation;
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actTotalPointNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Nombre de point" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Nombre de point brut dans le nodeAC" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointnodemini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpointnode.png")) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
fenetres.create.getTextNodeSelect().AfficheTotalPoint(nod,calculNombrePointEvaluation.calculNombreDepoint(nod,0));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package fenetres.create_act;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import fenetres.create;
|
||||
|
||||
public class actTousLesNodesEvaluer extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/touslesnodesmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Affiche tous les nodes" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(fenetres.create.getTglbtnTousLesNodes().isSelected()) {
|
||||
try {
|
||||
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
|
||||
calc.commandes.sujet.supprimeTousLesNodesEvaluerFalseOuNull();
|
||||
calc.commandes.fichierAnalyseValide=false;
|
||||
fenetres.create.getTextNodeSelect().setContentType("text/html");
|
||||
fenetres.create.getTextNodeSelect().setText("<hr><h1>Affiche uniquement les nodes évalués par l'application.</h1><hr>"
|
||||
+ "<br><h2><u>Le chemin vers chaque node évalué est constitué de node évalué.</u><br>"
|
||||
+ "Si vous enregistrez maintenant, vous enregistrez le fichier d'analyse avec <u>uniquement</u> les nodes évalués.</h2>");
|
||||
fenetres.create.getButtonEvaluate().setEnabled(false);
|
||||
fenetres.create.constructionTree();
|
||||
} catch (CloneNotSupportedException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}else {
|
||||
try {
|
||||
calc.commandes.sujet = calc.commandes.sujetSauvegarde.clone();
|
||||
fenetres.create.getButtonEvaluate().setEnabled(true);
|
||||
} catch (CloneNotSupportedException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
fenetres.create.getTextNodeSelect().setContentType("text/html");
|
||||
fenetres.create.getTextNodeSelect().setText("<hr><h1>Affiche tous les nodes évalués ou pas.</h1><hr>");
|
||||
calc.commandes.fichierAnalyseValide=true;
|
||||
fenetres.create.constructionTree();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
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 fenetres.create;
|
||||
|
||||
public class actTutoriels extends AbstractAction {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Tutoriels" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/tutorielmini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Tutoriels" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
|
||||
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||
}
|
||||
catch (java.io.IOException e1) {
|
||||
JOptionPane.showMessageDialog(null, e1.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
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 javax.swing.tree.DefaultMutableTreeNode;
|
||||
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actUpNode extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Monter le nodeAC" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/upnodemini.png")) );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Monter le nodeAC" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(fenetres.create.getTree().getSelectionPath()!=null) {
|
||||
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) fenetres.create.getTree().getSelectionPath().getLastPathComponent();
|
||||
|
||||
int a = JOptionPane.showConfirmDialog(null,"Voulez-vous monter le nodeAC " + selectNode.toString() + "?", "Sélectionner un choix", JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if(a == JOptionPane.YES_NO_OPTION) {
|
||||
nodeAC nod = (nodeAC) selectNode.getUserObject();
|
||||
if(!nod.chemin().contains("setting")) {
|
||||
nod.getParent().upNodeEnfant(nod);
|
||||
fenetres.create.constructionTree();
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null,"Vous ne devez pas déplacer ce nodeAC !", "Oh non!!!", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
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 fenetres.baliseStyle;
|
||||
import fenetres.create;
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actevalNameCreator extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "Evaluer la présence du dernier éditeur" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence du dernier éditeur" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/auteurediteurmini.png")) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject();
|
||||
int point = 0;
|
||||
if(nod.getAttributs().get("evalNameCreator")!=null) {
|
||||
point = Integer.valueOf(nod.getAttributs().get("evalNameCreator"));
|
||||
}
|
||||
|
||||
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("evalNameCreator", 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>evalNameCreator=0.</h2>");
|
||||
}else {
|
||||
nod.getAttributs().put("evalNameCreator", 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);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
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.TreeNode;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actsautfalse extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "false" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "false" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) 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 nodeAC ne peut pas être évaluer." );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
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.TreeNode;
|
||||
|
||||
import nodeAC.nodeAC;
|
||||
|
||||
public class actsauttrue extends AbstractAction{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue( Action.NAME, "true" );
|
||||
putValue( Action.SHORT_DESCRIPTION, "true" );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
nodeAC nod = (nodeAC) 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 nodeAC ne peut pas être évaluer." );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,860 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import fenetres.create_act.actAbout;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
|
||||
|
||||
public class evaluate extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private JToolBar toolBar;
|
||||
private JPanel contentPane;
|
||||
private JLabel lblPath;
|
||||
private JLabel lblFileAnalyse;
|
||||
private JLabel lblFichierCSV;
|
||||
private JLabel lblFichierSVG;
|
||||
private JCheckBox chckbxfichiersEtudaints;
|
||||
private JCheckBox chckbxZipfeedback;
|
||||
private JCheckBox chckbxnoFeedback;
|
||||
private JCheckBox chckbxNoNote;
|
||||
private JCheckBox chckCSVNotes;
|
||||
private JCheckBox chckbxNoLogo;
|
||||
private JCheckBox chckbxVerif;
|
||||
private JCheckBox chckbxNewLogo;
|
||||
private afficheText txtpnmessages;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
*/
|
||||
public evaluate() {
|
||||
|
||||
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
|
||||
this.setIconImage(img.getImage());
|
||||
setTitle(calc.commandes.Titre + " " + calc.commandes.version + " " + calc.commandes.branch);
|
||||
|
||||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
setBounds(100, 100, 980, 700);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
createMenu();
|
||||
createToolBar();
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
|
||||
contentPane.add(toolBar, BorderLayout.NORTH);
|
||||
|
||||
JPanel panelWest = new JPanel();
|
||||
contentPane.add(panelWest, BorderLayout.WEST);
|
||||
panelWest.setLayout(new MigLayout("", "[309px][]", "[38.00][71px][71px][][71px][][74.00][][]"));
|
||||
|
||||
JLabel lblTITRE = new JLabel("<HTML><U>PARAMETRES</U></HTML>");
|
||||
lblTITRE.setForeground(Color.RED);
|
||||
lblTITRE.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
lblTITRE.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
panelWest.add(lblTITRE, "cell 0 0,alignx left,aligny center");
|
||||
|
||||
lblFileAnalyse = new JLabel("<HTML><B><U>Fichier de l'analyse</U></B> : </HTML>");
|
||||
lblFileAnalyse.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblFileAnalyse.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFileAnalyse, "flowy,cell 0 1,alignx left,growy");
|
||||
|
||||
chckbxfichiersEtudaints = new JCheckBox("Les fichiers ne sont pas dans des dossiers nominatifs");
|
||||
chckbxfichiersEtudaints.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxfichiersEtudaints.isSelected()) {
|
||||
calc.commandes.fichierStudentMoodle=true;
|
||||
}else {
|
||||
calc.commandes.fichierStudentMoodle=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxfichiersEtudaints.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
chckbxfichiersEtudaints.setToolTipText("Cochez si les fichiers des étudiants ne sont pas dans des dossier nominatifs");
|
||||
panelWest.add(chckbxfichiersEtudaints, "flowy,cell 0 2,grow");
|
||||
|
||||
lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||
lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFichierCSV, "flowy,cell 0 4,grow");
|
||||
|
||||
lblFichierSVG = new JLabel("<HTML><B><U>Fichier SVG</U></B> :</HTML>");
|
||||
lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFichierSVG, "flowy,cell 0 6,growx");
|
||||
|
||||
chckCSVNotes = new JCheckBox("Créer un fichier CSV des notes");
|
||||
chckCSVNotes.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckCSVNotes.isSelected()) {
|
||||
calc.commandes.ecritNoteCSV=true;
|
||||
}else {
|
||||
calc.commandes.ecritNoteCSV=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckCSVNotes.setToolTipText("Cochez si vous voulez importer les notes dans un fichier CSV.");
|
||||
panelWest.add(chckCSVNotes, "cell 0 4,grow");
|
||||
|
||||
lblPath = new JLabel();
|
||||
lblPath.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblPath.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
lblPath.setText("<HTML><B><U>Dossier de l'analyse</U></B> : " + calc.commandes.path.substring(calc.commandes.path.lastIndexOf("\\")+1,calc.commandes.path.length()) + "</HTML>");
|
||||
panelWest.add(lblPath, "cell 0 1,grow");
|
||||
|
||||
chckbxnoFeedback = new JCheckBox("Pas de feedback");
|
||||
chckbxnoFeedback.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxnoFeedback.isSelected()) {
|
||||
calc.commandes.sansFeeback=true;
|
||||
}else {
|
||||
calc.commandes.sansFeeback=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxnoFeedback.setToolTipText("Cochez si vous ne voulez pas générer des feedbacks");
|
||||
chckbxnoFeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxnoFeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxZipfeedback = new JCheckBox("Zip les feedbacks");
|
||||
chckbxZipfeedback.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxZipfeedback.isSelected()) {
|
||||
calc.commandes.zipfeedback=true;
|
||||
}else {
|
||||
calc.commandes.zipfeedback=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxZipfeedback.setToolTipText("Cochez si vous voulez placer tous les feedbacks dans une archive ZIP");
|
||||
chckbxZipfeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxZipfeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxNoNote = new JCheckBox("Pas de note dans les feedbacks");
|
||||
chckbxNoNote.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxNoNote.isSelected()) {
|
||||
calc.commandes.noNote=true;
|
||||
}else {
|
||||
calc.commandes.noNote=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxNoNote.setToolTipText("Cochez si vous voulez pas faire apparaître les notes dans les feedbacks");
|
||||
chckbxNoNote.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNoNote, "cell 0 2,grow");
|
||||
|
||||
chckbxVerif = new JCheckBox("Vérification des historiques avant analyse");
|
||||
chckbxVerif.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxVerif.isSelected()) {
|
||||
calc.commandes.verifHisto2=true;
|
||||
}else {
|
||||
calc.commandes.verifHisto2=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxVerif.setToolTipText("Cochez si vous voulez vérifier les échanges de fichiers entre les étudiants.");
|
||||
chckbxVerif.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxVerif, "cell 0 2,grow");
|
||||
|
||||
chckbxNewLogo = new JCheckBox("Nouveau logo");
|
||||
chckbxNewLogo.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxNewLogo.isSelected()) {
|
||||
calc.commandes.newLogo=true;
|
||||
}else {
|
||||
calc.commandes.newLogo=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxNewLogo.setToolTipText("Cochez si vous voulez remplacer le logo par celui au-dessus.");
|
||||
chckbxNewLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNewLogo, "cell 0 6");
|
||||
|
||||
chckbxNoLogo = new JCheckBox("Pas de logo");
|
||||
chckbxNoLogo.addChangeListener(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
if(chckbxNoLogo.isSelected()) {
|
||||
calc.commandes.noLogo=true;
|
||||
}else {
|
||||
calc.commandes.noLogo=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
chckbxNoLogo.setToolTipText("Cochez si vous voulez pas de logo dans les feedbacks.");
|
||||
chckbxNoLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNoLogo, "cell 0 6");
|
||||
|
||||
|
||||
JPanel panelCentre = new JPanel();
|
||||
contentPane.add(panelCentre, BorderLayout.CENTER);
|
||||
panelCentre.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
JScrollPane scrollPane = new JScrollPane();
|
||||
panelCentre.add(scrollPane);
|
||||
|
||||
|
||||
txtpnmessages = new afficheText();
|
||||
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 16));
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText(baliseStyle.balise() + "<hr><h1 class\"city\">*** Charger un fichier d'analyse. ***</h1><hr>");
|
||||
scrollPane.setViewportView(txtpnmessages);
|
||||
|
||||
this.setExtendedState(MAXIMIZED_BOTH);
|
||||
|
||||
|
||||
|
||||
ListenerAction();
|
||||
|
||||
refreshLabel();
|
||||
setVisible(true);
|
||||
// Pro();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ListenerAction() {
|
||||
|
||||
/*Some piece of code*/
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void createMenu() {
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
menuBar.setFont(new Font("Segoe UI", Font.BOLD, 14));
|
||||
setJMenuBar(menuBar);
|
||||
|
||||
JMenu mnNewMenu = new JMenu("Fichier");
|
||||
mnNewMenu.setMnemonic( 'F' );
|
||||
menuBar.add(mnNewMenu);
|
||||
mnNewMenu.add( actSave );
|
||||
mnNewMenu.add( actSaveas );
|
||||
mnNewMenu.addSeparator();
|
||||
mnNewMenu.add( actExit );
|
||||
|
||||
|
||||
JMenu mnMenu_Fichier = new JMenu("Fichier d'analyse");
|
||||
menuBar.add(mnMenu_Fichier);
|
||||
mnMenu_Fichier.add( actOpen );
|
||||
mnMenu_Fichier.addSeparator();
|
||||
mnMenu_Fichier.add( actAboutFichierAnalyse );
|
||||
// mnMenu_Fichier.add( actCodeFichierAnalyse );
|
||||
mnMenu_Fichier.add( actModifierFichierAnalyse );
|
||||
|
||||
JMenu mnMenu_Liste_Etudiant = new JMenu("Liste des étudiants");
|
||||
menuBar.add(mnMenu_Liste_Etudiant);
|
||||
// mnMenu_Liste_Etudiant.add(actChargeListeEtudiantCSV);
|
||||
mnMenu_Liste_Etudiant.addSeparator();
|
||||
// mnMenu_Liste_Etudiant.add(actAfficheListeEtudiant );
|
||||
// mnMenu_Liste_Etudiant.add(actVerifCSV );
|
||||
|
||||
|
||||
JMenu mnMenu_Logo = new JMenu("Logo");
|
||||
menuBar.add(mnMenu_Logo);
|
||||
// mnMenu_Logo.add(actChargeLogo);
|
||||
|
||||
JMenu mnMenu_Evaluation = new JMenu("Evaluation des étudiants");
|
||||
menuBar.add(mnMenu_Evaluation);
|
||||
mnMenu_Evaluation.add(actSelectFolder);
|
||||
mnMenu_Evaluation.addSeparator();
|
||||
mnMenu_Evaluation.add(actEvaluate);
|
||||
mnMenu_Evaluation.addSeparator();
|
||||
mnMenu_Evaluation.add(actVerifHistorique);
|
||||
|
||||
JMenu mnMenu_Informations = new JMenu("Informations");
|
||||
menuBar.add(mnMenu_Informations);
|
||||
mnMenu_Informations.add(actTutoriels);
|
||||
mnMenu_Informations.addSeparator();
|
||||
mnMenu_Informations.add( new actAbout() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void createToolBar() {
|
||||
toolBar = new JToolBar();
|
||||
JButton btnSelectFileAnalyse = toolBar.add( actOpen );
|
||||
btnSelectFileAnalyse.setHideActionText( true );
|
||||
btnSelectFileAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
|
||||
|
||||
|
||||
// JButton btnInformationAnalyse = toolBar.add( actCodeFichierAnalyse );
|
||||
// btnInformationAnalyse.setHideActionText(true);
|
||||
// btnInformationAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo2.png")));
|
||||
|
||||
|
||||
JButton btnAfficheCodeFichierAnalyse = toolBar.add( actAboutFichierAnalyse );
|
||||
btnAfficheCodeFichierAnalyse.setHideActionText(true);
|
||||
btnAfficheCodeFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo.png")));
|
||||
toolBar.add(btnAfficheCodeFichierAnalyse);
|
||||
|
||||
JButton btnModifierFichierAnalyse = toolBar.add(actModifierFichierAnalyse);
|
||||
btnModifierFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
|
||||
btnModifierFichierAnalyse.setHideActionText(true);
|
||||
toolBar.add(btnModifierFichierAnalyse);
|
||||
|
||||
toolBar.addSeparator();
|
||||
|
||||
JButton btnEvaluerLesFichiers = toolBar.add(actEvaluate);
|
||||
btnEvaluerLesFichiers.setHideActionText(true);
|
||||
|
||||
// JButton btnFichierCSV = toolBar.add(actChargeListeEtudiantCSV );
|
||||
// btnFichierCSV.setHideActionText(true);
|
||||
// btnFichierCSV.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSV.png")));
|
||||
// toolBar.add(btnFichierCSV);
|
||||
|
||||
// JButton btnInfoListeEtudiant = toolBar.add(actAfficheListeEtudiant);
|
||||
// btnInfoListeEtudiant.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfo.png")));
|
||||
// btnInfoListeEtudiant.setHideActionText(true);
|
||||
// toolBar.add(btnInfoListeEtudiant);
|
||||
|
||||
// JButton btnVerificationCSVavecFichierAnalyse = toolBar.add( actVerifCSV );
|
||||
// btnVerificationCSVavecFichierAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfoXML.png")));
|
||||
// btnVerificationCSVavecFichierAnalyse.setHideActionText(true);
|
||||
// toolBar.add(btnVerificationCSVavecFichierAnalyse);
|
||||
|
||||
toolBar.addSeparator();
|
||||
|
||||
// JButton btnFichierSVG = toolBar.add(actChargeLogo);
|
||||
// btnFichierSVG.setHideActionText(true);
|
||||
// btnFichierSVG.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierSVG.png")));
|
||||
// toolBar.add(btnFichierSVG);
|
||||
|
||||
toolBar.addSeparator();
|
||||
|
||||
JButton btnSelectFolder = toolBar.add(actSelectFolder);
|
||||
btnSelectFolder.setIcon(new ImageIcon(evaluate.class.getResource("/resources/open.png")));
|
||||
btnSelectFolder.setHideActionText(true);
|
||||
toolBar.add(btnSelectFolder);
|
||||
|
||||
btnEvaluerLesFichiers.setIcon(new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
|
||||
toolBar.add(btnEvaluerLesFichiers);
|
||||
|
||||
JButton btnVerifHistorique = toolBar.add(actVerifHistorique);
|
||||
btnVerifHistorique.setIcon(new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
|
||||
btnVerifHistorique.setHideActionText(true);
|
||||
toolBar.add(btnVerifHistorique);
|
||||
|
||||
toolBar.addSeparator();
|
||||
|
||||
JButton btnAbout = toolBar.add(new actAbout());
|
||||
btnAbout.setIcon(new ImageIcon(evaluate.class.getResource("/resources/apropos.png")));
|
||||
btnAbout.setHideActionText(true);
|
||||
toolBar.add(btnAbout);
|
||||
|
||||
JButton btnTutoriels = toolBar.add(actTutoriels);
|
||||
btnTutoriels.setIcon(new ImageIcon(evaluate.class.getResource("/resources/tutoriel.png")));
|
||||
toolBar.add(btnTutoriels);
|
||||
|
||||
toolBar.addSeparator();
|
||||
|
||||
JButton btnExit = toolBar.add(actExit);
|
||||
btnExit.setIcon(new ImageIcon(evaluate.class.getResource("/resources/exit.png")));
|
||||
btnExit.setHideActionText(true);
|
||||
toolBar.add(btnExit);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Raffraichi les informations
|
||||
*/
|
||||
private void refreshLabel() {
|
||||
if(!calc.commandes.fichierAnalyseValide) {
|
||||
}
|
||||
}
|
||||
// if(!verificationFichierAnalyse.messageErreur.toString().isEmpty())
|
||||
// txtpnmessages.setText(MEPTL.verificationFichierAnalyse.messageErreur.toString());
|
||||
//
|
||||
// chckbxfichiersEtudaints.setEnabled(false);
|
||||
// chckbxZipfeedback.setEnabled(false);
|
||||
// chckbxnoFeedback.setEnabled(false);
|
||||
// chckbxNoNote.setEnabled(false);
|
||||
// chckCSVNotes.setEnabled(false);
|
||||
// chckbxNewLogo.setEnabled(false);
|
||||
// chckbxNoLogo.setEnabled(false);
|
||||
// chckbxVerif.setEnabled(false);
|
||||
// }else {
|
||||
// chckbxfichiersEtudaints.setEnabled(true);
|
||||
// chckbxZipfeedback.setEnabled(true);
|
||||
// chckbxnoFeedback.setEnabled(true);
|
||||
// chckbxNoNote.setEnabled(true);
|
||||
// chckCSVNotes.setEnabled(true);
|
||||
// chckbxNewLogo.setEnabled(true);
|
||||
// chckbxNoLogo.setEnabled(true);
|
||||
// chckbxVerif.setEnabled(true);
|
||||
//
|
||||
// txtpnmessages.afficheChargementFichierAnalyse();
|
||||
// }
|
||||
//
|
||||
// lblPath.setText("<HTML><B><U>Dossier de l'analyse</U></B> : " + calc.commandes.path.substring(calc.commandes.path.lastIndexOf("\\")+1,calc.commandes.path.length()) + "</HTML>");
|
||||
// lblFileAnalyse.setText("<HTML><B><U>Fichier de l'analyse</U></B> : " + calc.commandes.analysis_filename + "</HTML>");
|
||||
// lblFichierSVG.setText("<HTML><B><U>Fichier SVG</U></B> : " + calc.commandes.nameSVG.substring(calc.commandes.nameSVG.lastIndexOf("\\")+1,calc.commandes.nameSVG.length()) + "</HTML>");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B> : " + calc.commandes.nameCSV + "</HTML>");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* evaluer l'ensemble des fichiers des étudiants
|
||||
*/
|
||||
private AbstractAction actEvaluate = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/evaluate.png")));
|
||||
putValue( Action.NAME, "Evaluer les fichiers" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/evaluatemini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_E );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer les fichiers (CTRL+E)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// Thread t2 = new Thread(new evaluerLesFichiersEtudiants(txtpnmessages));
|
||||
// t2.start();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Ouvre et affiche un fichier XML
|
||||
*/
|
||||
private AbstractAction actOpen = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
|
||||
putValue( Action.NAME, "Ouvrir un nouveau fichier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalysemini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed( ActionEvent e ) {
|
||||
new filechooserXML();
|
||||
refreshLabel();
|
||||
System.out.println( "Open" );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sélectionne le dossier courant contenant les fichiers des étudiants
|
||||
*/
|
||||
private AbstractAction actSelectFolder = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/open.png")));
|
||||
putValue( Action.NAME, "Dossier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/openmini.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Dossier d'analyse (CTRL+U)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed( ActionEvent e ) {
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
|
||||
chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
|
||||
chooser.setDialogTitle("Sélectionner le dossier contenant les fichiers des étudiants.");
|
||||
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
chooser.setAcceptAllFileFilterUsed(false);
|
||||
|
||||
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||
calc.commandes.path = chooser.getSelectedFile().getAbsolutePath();
|
||||
} else {
|
||||
System.out.println("No Selection ");
|
||||
}
|
||||
|
||||
refreshLabel();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Verification
|
||||
*/
|
||||
private AbstractAction actVerifHistorique = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/verifhistorique.png")));
|
||||
putValue( Action.NAME, "Evaluer l'historique des modification" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/verifhistoriquemini.png")));
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_H );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'historique des modification (CTRL+H)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_H, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
@Override
|
||||
public void actionPerformed( ActionEvent e ) {
|
||||
calc.commandes.verifHisto = true;
|
||||
calc.commandes.analyse = false;
|
||||
if(!calc.commandes.path.isEmpty()) {
|
||||
}else {
|
||||
txtpnmessages.setText("*** Veuillez sélectionner un dossier d'analyse. ***");
|
||||
}
|
||||
calc.commandes.verifHisto = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
// * Gènère un nouveau fichier d'analyse à partir d'un fichier ODF
|
||||
// */
|
||||
// private AbstractAction actNewFichierAnalyse = new AbstractAction() {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// {
|
||||
// putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierODF.png")));
|
||||
// putValue( Action.NAME, "Génère un nouveau fichier d'analyse" );
|
||||
// putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierODFmini.png")) );
|
||||
// putValue( Action.MNEMONIC_KEY, KeyEvent.VK_N );
|
||||
// putValue( Action.SHORT_DESCRIPTION, "Générer un nouveau fichier d'analyse (CTRL+N)" );
|
||||
// putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK) );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void actionPerformed( ActionEvent e ) {
|
||||
// JFileChooser chooser = new JFileChooser();
|
||||
// chooser.setDialogTitle("Choisir un fichier ODF");
|
||||
//
|
||||
// chooser.setCurrentDirectory(new java.io.File(calc.commandes.path));
|
||||
// chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||
// FileNameExtensionFilter filter = new FileNameExtensionFilter("Format ODF", "odt");
|
||||
// chooser.setFileFilter(filter);
|
||||
// chooser.setAcceptAllFileFilterUsed(true);
|
||||
//
|
||||
// if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
|
||||
// System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||
// System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||
// calc.commandes.path = chooser.getCurrentDirectory().getAbsolutePath();
|
||||
// calc.commandes.PathFilenameAnalysis = chooser.getSelectedFile().getAbsolutePath();
|
||||
// calc.commandes.nameSujet = chooser.getSelectedFile().getName();
|
||||
//
|
||||
// Run b = null;
|
||||
// try {
|
||||
// b = new Run(calc.commandes.PathFilenameAnalysis);
|
||||
// nodeAC nodSujet = Run.XMLContent(b.getLectDossiers().getEC().getListeContentWriter().get(0));
|
||||
//
|
||||
// nodSujet.supprimeTousLesNodesEnfantWithThisName("text:change-start"); //historique des modification
|
||||
// nodSujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
|
||||
//
|
||||
// calc.commandes.sujetSauvegarde = nodSujet.clone();
|
||||
//
|
||||
// nodSujet = meptl.LectureFichierEtudiantSousFormeDeNode(nodSujet,b,0);
|
||||
// nodSujet.getAttributs().put("analysis_filename","sujet.xml");
|
||||
// nodSujet = ecritureSujet.nodePourEcritureSujet(nodSujet,b,0);
|
||||
// Run.ecritureNodeEnXML(nodSujet, "sujet",calc.commandes.path,"Sujet");
|
||||
// txtpnmessages.setContentType("text/plain");
|
||||
// txtpnmessages.setText(Run.ecritureNode(nodSujet, 0).toString()
|
||||
// + "\n\n"
|
||||
// +"\n*************************"
|
||||
// +"\nLe fichier sujet.xml a été généré dans le dossier :"
|
||||
// +"\n" + calc.commandes.path
|
||||
// +"\n*************************");
|
||||
// calc.commandes.sujet = nodSujet;
|
||||
// new verificationFichierAnalyse();
|
||||
//
|
||||
// } catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
|
||||
// e1.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
// calc.commandes.nameSujet = "";
|
||||
// calc.commandes.PathFilenameAnalysis = "";
|
||||
// System.out.println("No Selection ");
|
||||
// calc.commandes.fichierAnalyseValide=false;
|
||||
// refreshLabel();
|
||||
// }
|
||||
//
|
||||
//
|
||||
// calc.commandes.ecritCode = true;
|
||||
// }
|
||||
// };
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Information sur le fichier d'analyse
|
||||
*/
|
||||
private AbstractAction actAboutFichierAnalyse = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Informations du fichier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseInfo2mini.png")));
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_K );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Informations du fichier d'analyse (CTRL+K)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_K, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
if(calc.commandes.fichierAnalyseValide) {
|
||||
txtpnmessages.afficheChargementFichierAnalyse();
|
||||
}else {
|
||||
txtpnmessages.setText(baliseStyle.balise() + "<hr class=\"city\"><h1>*** Veuillez charger un fichier d'analyse ***</h1><hr>");
|
||||
}
|
||||
|
||||
|
||||
System.out.println( "Refresh Labels and texts" );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Quitter l'application
|
||||
*/
|
||||
private AbstractAction actExit = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Quitter" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/exitmini.png")));
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/exit.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_Q );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Quitter (CRTL+Q)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_DOWN_MASK ) );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter analyseWriter?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Enregistre L'évaluation
|
||||
*/
|
||||
private AbstractAction actSave = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Enregistrer la zone de texte" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/savemini.png")));
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte (CRTL+S)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Enregistre sous l'évaluation
|
||||
*/
|
||||
private AbstractAction actSaveas = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Enregistrer la zone de texte sous ..." );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/saveasmini.png")));
|
||||
putValue( Action.SHORT_DESCRIPTION, "Enregistrer la zone de texte sous ..." );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private AbstractAction actSavePreference = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Enregistrer prefrences" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/savepreferencemini.png")) );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/savepreference.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_W );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Enregistrer prefrences" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.ALT_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
if(calc.commandes.fichierAnalyseValide) {
|
||||
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Charger un fichier Writer (.odt) ou un fichier d'évaluaton (.xml).");
|
||||
}
|
||||
System.out.println( "Configuration" );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Affiche les tutoriels sur Youtube
|
||||
*/
|
||||
private AbstractAction actTutoriels = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Tutoriels" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/tutorielmini.png")));
|
||||
putValue(Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/tutoriel.png")));
|
||||
putValue( Action.SHORT_DESCRIPTION, "Tutoriels" );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
try {
|
||||
String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
|
||||
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||
}
|
||||
catch (java.io.IOException e1) {
|
||||
System.out.println(e1.getMessage());
|
||||
}
|
||||
System.out.println( "Affiche les tutoriels." );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Affiche le code XMl du fichier d'analyse
|
||||
*/
|
||||
private AbstractAction actModifierFichierAnalyse = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Modifier le fichier d'analyse" );
|
||||
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModifmini.png")) );
|
||||
putValue(Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyseModif.png")));
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_M );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Modifier le fichier d'analyse (CTRL+M)" );
|
||||
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK) );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
create.getInstance();
|
||||
dispose();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
// * Permet l'évaluation des fichiers des étudaints.
|
||||
// * @throws ParserConfigurationException
|
||||
// * @throws SAXException
|
||||
// * @throws IOException
|
||||
// * @throws CloneNotSupportedException
|
||||
// */
|
||||
// private void evaluerLesFichiersEtudiants() throws ParserConfigurationException, SAXException, IOException, CloneNotSupportedException {
|
||||
//
|
||||
// calc.commandes.analyse=true;
|
||||
// progressBarre.setVisible(true);
|
||||
//
|
||||
// if(chckbxfichiersEtudaints.isSelected()) calc.commandes.fichierStudentMoodle=true;
|
||||
// if(chckbxZipfeedback.isSelected()) calc.commandes.zipfeedback=true;
|
||||
// if(chckbxnoFeedback.isSelected()) calc.commandes.sansFeeback=true;
|
||||
// if(chckbxNoNote.isSelected()) calc.commandes.noNote=true;
|
||||
// if(chckCSVNotes.isSelected()) calc.commandes.ecritNoteCSV=true;
|
||||
// if(chckbxNewLogo.isSelected()) calc.commandes.newLogo=true;
|
||||
// if(chckbxNoLogo.isSelected()) calc.commandes.noLogo = true;
|
||||
// if(chckbxVerif.isSelected()) calc.commandes.verifHisto2 = true;
|
||||
//
|
||||
// meptl.analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV();
|
||||
//
|
||||
// txtpnmessages.setText(calc.commandes.message.toString());
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,112 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
|
||||
import calc.commandes;
|
||||
import nodeAC.constructionNodeAvecString;
|
||||
|
||||
|
||||
public class filechooserXML extends JFileChooser {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
public filechooserXML() {
|
||||
setDialogTitle("Choisir un fichier d'analyse");
|
||||
|
||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichier d'analyse .XML", "xml");
|
||||
setFileFilter(filter);
|
||||
|
||||
if(!calc.commandes.PathFilenameAnalysis.isEmpty()) {
|
||||
File file = new File(calc.commandes.PathFilenameAnalysis ); //+ "\\" + utils.filename + ".xml"
|
||||
setCurrentDirectory(file);
|
||||
}
|
||||
|
||||
|
||||
setPreferredSize(new Dimension(550, 420));
|
||||
|
||||
int response = showOpenDialog(null);
|
||||
if(response == JFileChooser.APPROVE_OPTION) {
|
||||
calc.commandes.initialiseCommandes();
|
||||
|
||||
File file = new File(getSelectedFile().getAbsolutePath());
|
||||
System.out.println(file.getPath() + "\n" + file.getName());
|
||||
String ext = file.getName().substring(file.getName().lastIndexOf("."));
|
||||
|
||||
if(ext.equals(".xml")){
|
||||
openFileXML(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void openFileXML(File file) {
|
||||
calc.commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("\\"));
|
||||
calc.commandes.PathFilenameAnalysis = getCurrentDirectory().getPath();
|
||||
calc.commandes.nameSujet = file.getName().toString();
|
||||
|
||||
BufferedReader br;
|
||||
try {
|
||||
br = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
new FileInputStream(file.getAbsoluteFile()), "UTF-8"));
|
||||
String line;
|
||||
StringBuilder targetString = new StringBuilder();
|
||||
while ((line = br.readLine()) != null) {
|
||||
targetString.append(line);
|
||||
}
|
||||
|
||||
//node.node2(targetString);
|
||||
constructionNodeAvecString A = new constructionNodeAvecString();
|
||||
commandes.sujet = A.NewNode(targetString.toString().replace("\t","").replace("\r", "").replace("\n", ""));
|
||||
|
||||
calc.commandes.sujetSauvegarde = calc.commandes.sujet.clone();
|
||||
|
||||
|
||||
// Vérification de la conformité du fichier d'analyse
|
||||
if(!fichierSujetValide()) JOptionPane.showMessageDialog(null, "Le fichier d'analyse n'est pas valide.");
|
||||
|
||||
//Chargement des paramètres du fichier d'analyse
|
||||
// meptl.chargementParametresFichierAnalyse();
|
||||
|
||||
// Rechercher des erreurs dans le fichier d'analyse
|
||||
// new verificationFichierAnalyse();
|
||||
|
||||
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (FileNotFoundException e1) {
|
||||
e1.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verification rapide du fichier.
|
||||
* @return
|
||||
*/
|
||||
public static boolean fichierSujetValide () {
|
||||
if(calc.commandes.sujet==null) {System.out.println("Le fichier est null."); return false;}
|
||||
if(!calc.commandes.sujet.getNomElt().equals("classeur")) {System.out.println("Ce n'est pas un classeur."); calc.commandes.fichierAnalyseValide=true; return false;}
|
||||
calc.commandes.fichierAnalyseValide=false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package fenetres;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
import java.awt.SystemColor;
|
||||
|
||||
public class mainApp extends JFrame implements ActionListener{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private JFrame frmEvalwriter;
|
||||
|
||||
JButton btnCreate;
|
||||
JButton actCharge;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
mainApp window = new mainApp();
|
||||
window.frmEvalwriter.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the application.
|
||||
*/
|
||||
public mainApp() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
|
||||
|
||||
frmEvalwriter = new JFrame();
|
||||
frmEvalwriter.setResizable(false);
|
||||
frmEvalwriter.setTitle(calc.commandes.Titre);
|
||||
frmEvalwriter.setBounds(100, 100, 500, 380);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
frmEvalwriter.setLocation(( (screenWidth) - frmEvalwriter.getWidth()) / 2, (screenHeight - frmEvalwriter.getHeight()) / 2);
|
||||
|
||||
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frmEvalwriter.getContentPane().setLayout(null);
|
||||
ImageIcon img = new ImageIcon(mainApp.class.getResource("/resources/evalcalc.png"));
|
||||
frmEvalwriter.setIconImage(img.getImage());
|
||||
|
||||
btnCreate = new JButton("Créer ou modifier un fichier d'analyse");
|
||||
btnCreate.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
btnCreate.setIcon(new ImageIcon(mainApp.class.getResource("/resources/fichierAnalyseModif.png")));
|
||||
btnCreate.setFont(new Font("Arial", Font.BOLD, 16));
|
||||
btnCreate.addActionListener(this);
|
||||
|
||||
btnCreate.setBounds(34, 180, 420, 60);
|
||||
frmEvalwriter.getContentPane().add(btnCreate);
|
||||
|
||||
actCharge = new JButton("Evaluer les fichiers des étudiants");
|
||||
actCharge.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
actCharge.setIcon(new ImageIcon(mainApp.class.getResource("/resources/evaluate.png")));
|
||||
actCharge.setBackground(SystemColor.inactiveCaption);
|
||||
actCharge.addActionListener(this);
|
||||
actCharge.setFont(new Font("Arial", Font.BOLD, 16));
|
||||
actCharge.setBounds(34, 110, 420, 60);
|
||||
frmEvalwriter.getContentPane().add(actCharge);
|
||||
|
||||
JLabel lblNewLabel = new JLabel();
|
||||
lblNewLabel.setIcon(new ImageIcon(mainApp.class.getResource("/resources/accueilanalysecalc.png")));
|
||||
lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
|
||||
lblNewLabel.setBounds(33, 25, 421, 74);
|
||||
frmEvalwriter.getContentPane().add(lblNewLabel);
|
||||
|
||||
JButton btnNewButton = new JButton("Version & Documentation");
|
||||
btnNewButton.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
about.getInstance();
|
||||
}
|
||||
});
|
||||
btnNewButton.setFont(new Font("Arial", Font.PLAIN, 14));
|
||||
btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
|
||||
btnNewButton.setBounds(34, 270, 200, 60);
|
||||
frmEvalwriter.getContentPane().add(btnNewButton);
|
||||
|
||||
JButton btnTutoriels = new JButton("Tutoriels");
|
||||
btnTutoriels.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
String url = "https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ";
|
||||
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||||
}
|
||||
catch (java.io.IOException e1) {
|
||||
System.out.println(e1.getMessage());
|
||||
}
|
||||
System.out.println( "Affiche les tutoriels." );
|
||||
}
|
||||
});
|
||||
btnTutoriels.setIcon(new ImageIcon(mainApp.class.getResource("/resources/tutoriel.png")));
|
||||
btnTutoriels.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
btnTutoriels.setFont(new Font("Arial", Font.PLAIN, 14));
|
||||
btnTutoriels.setBounds(254, 270, 200, 60);
|
||||
frmEvalwriter.getContentPane().add(btnTutoriels);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if(e.getSource()==btnCreate) {
|
||||
create.getInstance();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
if(e.getSource()==actCharge) {
|
||||
new evaluate();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,606 @@
|
||||
package fenetres;
|
||||
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
import calcul.calculNotesProgression;
|
||||
import calcul.formatDateWriter;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
public final class proprieteFichierAnalyse extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private JPanel contentPane;
|
||||
private JTextField textFieldTitre;
|
||||
private JTextField textFieldAuteur;
|
||||
private JTextField textFieldMetaSujet;
|
||||
private JTextField textFieldNoteFrom;
|
||||
private JTextField textFieldProgression;
|
||||
private JTextField textFieldDateCreation;
|
||||
private JComboBox<String> comboBoxPresenceMetaSujet;
|
||||
private JComboBox<String> comboBoxBaremeABC;
|
||||
private JComboBox<String> comboBoxhistoriquePresent;
|
||||
private JComboBox<String> comboBoxcontrole_Initial_Creator;
|
||||
private JComboBox<String> comboBoxcontroleDateCreation;
|
||||
private JLabel lblNewLabel_8;
|
||||
private JLabel lblNewLabel_9;
|
||||
private JTextField textFieldInitial_Creator;
|
||||
private JLabel lblNewLabel_10;
|
||||
private JLabel lblNewLabel_11;
|
||||
private JTextField textFieldlink_help;
|
||||
private JLabel lblNewLabel_12;
|
||||
private JTextField textFieldlink_sujet;
|
||||
private JButton btnAideTitre;
|
||||
private JButton btnAideAuteur;
|
||||
private JButton btnAideMetaSujet;
|
||||
private JButton btnAidePresenceMetaSujet;
|
||||
private JButton btnAideBaremeABC;
|
||||
private JButton btnAideNoteFrom;
|
||||
private JButton btnAideProgression;
|
||||
private JButton btnAideHistoriquePresent;
|
||||
private JButton btnAideDateCreation;
|
||||
private JButton btnAideControleDateCreation;
|
||||
private JButton btnAideInitial_Creator;
|
||||
private JButton btnAidecontrole_Initial_Creator;
|
||||
private JButton btnVoirBaremeABC;
|
||||
private JButton btnVoirBaremeNumeric;
|
||||
private static proprieteFichierAnalyse instance;
|
||||
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
*/
|
||||
public proprieteFichierAnalyse() {
|
||||
setIconImage(Toolkit.getDefaultToolkit().getImage(proprieteFichierAnalyse.class.getResource("/resources/evalwriter.ico")));
|
||||
setBounds(0, 0, 630, 639);
|
||||
setResizable(false);
|
||||
setTitle("Propriété du fichier d'analyse");
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
|
||||
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
|
||||
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(null);
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new MigLayout("", "[260px][260px][10,grow 20]", "[18px][18px][18px][30px][18px][18px][18px][30px][45px][18px][18px][18px][][][][18px:24px:48px,grow]"));
|
||||
|
||||
JLabel lblNewLabel = new JLabel("Titre de l'exercice");
|
||||
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel, "cell 0 0,alignx left,aligny center");
|
||||
|
||||
textFieldTitre = new JTextField();
|
||||
textFieldTitre.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldTitre, "cell 1 0,grow");
|
||||
textFieldTitre.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("titre")!=null){
|
||||
textFieldTitre.setText(calc.commandes.sujet.getAttributs().get("titre"));
|
||||
}
|
||||
|
||||
btnAideTitre = new JButton("");
|
||||
btnAideTitre.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Le titre de l'exercice apparaît<br>dans les feedbacks des étudiants.</html>");
|
||||
}
|
||||
});
|
||||
btnAideTitre.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideTitre, "cell 2 0");
|
||||
|
||||
JLabel lblNewLabel_1 = new JLabel("Auteur");
|
||||
lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_1, "cell 0 1,alignx left,aligny center");
|
||||
|
||||
textFieldAuteur = new JTextField();
|
||||
textFieldAuteur.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldAuteur, "cell 1 1,grow");
|
||||
textFieldAuteur.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("auteur")!=null){
|
||||
textFieldAuteur.setText(calc.commandes.sujet.getAttributs().get("auteur"));
|
||||
}
|
||||
|
||||
btnAideAuteur = new JButton("");
|
||||
btnAideAuteur.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>L'auteur de l'exercice apparaît<br>dans les feedbacks des étudiants.</html>");
|
||||
}
|
||||
});
|
||||
btnAideAuteur.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideAuteur, "cell 2 1");
|
||||
|
||||
JLabel lblNewLabel_2 = new JLabel("metaSujet");
|
||||
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_2, "cell 0 2,alignx left,aligny center");
|
||||
|
||||
textFieldMetaSujet = new JTextField();
|
||||
textFieldMetaSujet.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldMetaSujet, "cell 1 2,grow");
|
||||
textFieldMetaSujet.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("metaSujet")!=null){
|
||||
textFieldMetaSujet.setText(calc.commandes.sujet.getAttributs().get("metaSujet"));
|
||||
}
|
||||
|
||||
btnAideMetaSujet = new JButton("");
|
||||
btnAideMetaSujet.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>La propriété personnalisé Sujet apparaît dans les feedbacks.<br>"
|
||||
+ "Elle est placée sous la note des étudiants.<br>"
|
||||
+ "Si la donnée personnalisé Sujet dans les fichiers des étudiants est présente,<br>"
|
||||
+ "alors il peut y avoir comparaison avec cet valeur (voir la valeur logique suivante).</html>");
|
||||
}
|
||||
});
|
||||
btnAideMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideMetaSujet, "cell 2 2");
|
||||
|
||||
JLabel lblNewLabel_3 = new JLabel("<HTML><p>Propriété personnalisé Sujet obligatoire<br>dans les fichiers des étudiants.</p></HTML>" );
|
||||
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_3, "cell 0 3,alignx left,aligny center");
|
||||
|
||||
comboBoxPresenceMetaSujet = new JComboBox<String>();
|
||||
comboBoxPresenceMetaSujet.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
comboBoxPresenceMetaSujet.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
|
||||
contentPane.add(comboBoxPresenceMetaSujet, "cell 1 3,growx,aligny top");
|
||||
if(calc.commandes.sujet.getAttributs().get("presenceMetaSujet")!=null){
|
||||
comboBoxPresenceMetaSujet.setSelectedItem(calc.commandes.sujet.getAttributs().get("presenceMetaSujet").toLowerCase());
|
||||
}
|
||||
|
||||
btnAidePresenceMetaSujet = new JButton("");
|
||||
btnAidePresenceMetaSujet.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Si la donnée personnalisé Sujet dans les fichiers des étudiants ne correspond pas,<br>"
|
||||
+ "à la valeur au-dessus alors le fichier n'est pas le fichier du sujet.<br>"
|
||||
+ "La note de l'étudiant sera nulle."
|
||||
+ "<br><br>L'étudiant doit utiliser le fichier remis par l'enseignant.<br>"
|
||||
+ "Cette technique peut être utilisée durant les contrôles.<br></html>");
|
||||
}
|
||||
});
|
||||
btnAidePresenceMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAidePresenceMetaSujet, "cell 2 3");
|
||||
|
||||
JLabel lblNewLabel_4 = new JLabel("Barème alphabétique ABCDE");
|
||||
lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_4, "cell 0 4,alignx left");
|
||||
|
||||
comboBoxBaremeABC = new JComboBox<String>();
|
||||
comboBoxBaremeABC.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
|
||||
comboBoxBaremeABC.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
contentPane.add(comboBoxBaremeABC, "cell 1 4,growx");
|
||||
if(calc.commandes.sujet.getAttributs().get("baremeABC")!=null){
|
||||
comboBoxBaremeABC.setSelectedItem(calc.commandes.sujet.getAttributs().get("baremeABC").toLowerCase());
|
||||
}
|
||||
|
||||
btnAideBaremeABC = new JButton("");
|
||||
btnAideBaremeABC.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showMessageDialog(null, "<html>Permet d'utiliser une notation alphabétique à 5 niveaux (de A à E).<br>"
|
||||
+ "Si le coefficient de progression est de 1 alors la largeur des intervalles est de 20%.");
|
||||
}
|
||||
});
|
||||
btnAideBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideBaremeABC, "flowx,cell 2 4");
|
||||
|
||||
|
||||
|
||||
JLabel lblNoteFrom = new JLabel("Barème");
|
||||
lblNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNoteFrom, "cell 0 5,alignx left");
|
||||
|
||||
textFieldNoteFrom = new JTextField();
|
||||
textFieldNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldNoteFrom, "cell 1 5,growx");
|
||||
textFieldNoteFrom.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("bareme")!=null){
|
||||
textFieldNoteFrom.setText(calc.commandes.sujet.getAttributs().get("bareme"));
|
||||
}
|
||||
|
||||
btnAideNoteFrom = new JButton("");
|
||||
btnAideNoteFrom.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showMessageDialog(null, "<html>La notation par défaut est numérique.<br>"
|
||||
+ "La note maximale est par défaut de 20 points.<br>"
|
||||
+ "La note maximale doit être une valeur supérieur strictement 0 point.<br><br>"
|
||||
+ "Si le coefficient de progression est de 1 alors un exercice à 50% correct<br>"
|
||||
+ "aura la note (maximale/2).");
|
||||
}
|
||||
});
|
||||
btnAideNoteFrom.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideNoteFrom, "flowx,cell 2 5");
|
||||
|
||||
JLabel lblNewLabel_5 = new JLabel("Coef. de progression");
|
||||
lblNewLabel_5.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_5, "cell 0 6,alignx left");
|
||||
|
||||
textFieldProgression = new JTextField();
|
||||
contentPane.add(textFieldProgression, "cell 1 6,growx");
|
||||
textFieldProgression.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("progression")!=null){
|
||||
textFieldProgression.setText(calc.commandes.sujet.getAttributs().get("progression"));
|
||||
}
|
||||
|
||||
btnAideProgression = new JButton("");
|
||||
btnAideProgression.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showMessageDialog(null, "<html>Le coefficient de progression permet de régler la difficulté de l'exercice.<br><br>"
|
||||
+ "Le coefficient de progression d'affiche dans les feedbacks des étudiants.<br><br>"
|
||||
+ "Le coefficient de progression doit être compris entre ]0 et 10[.<br>"
|
||||
+ " Un coef. inférieur à 1 signifie qu'il est facile d'atteindre la note maximale<br>"
|
||||
+ " Un coef. supérieur à 1 signifie qu'il est difficile d'atteindre la note maximale.");
|
||||
}
|
||||
});
|
||||
btnAideProgression.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideProgression, "cell 2 6");
|
||||
|
||||
JLabel lblNewLabel_6 = new JLabel("<html>Le suivi des modifications activé dans les <br>fichiers des étudiants.</html>");
|
||||
lblNewLabel_6.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_6, "cell 0 7,alignx left");
|
||||
|
||||
comboBoxhistoriquePresent = new JComboBox<String>();
|
||||
comboBoxhistoriquePresent.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
|
||||
comboBoxhistoriquePresent.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
contentPane.add(comboBoxhistoriquePresent, "cell 1 7,growx,aligny top");
|
||||
if(calc.commandes.sujet.getAttributs().get("historiquePresent")!=null){
|
||||
comboBoxhistoriquePresent.setSelectedItem(calc.commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
|
||||
}
|
||||
|
||||
btnAideHistoriquePresent = new JButton("");
|
||||
btnAideHistoriquePresent.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors le suivi des modifications doit être activé dans les fichiers des étudiants.<br>"
|
||||
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
|
||||
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br>"
|
||||
+ "L'enseignant aura activé le suivi des modifications et protégé le suivi par un mot de passe.<br><br>"
|
||||
+ "Cette technique peut être utilisée durant les contrôles.<br>"
|
||||
+ "Elle permettra de rechercher les fichiers échangés entre les étudiants en comparant les modifications.</html>");
|
||||
}
|
||||
});
|
||||
btnAideHistoriquePresent.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideHistoriquePresent, "cell 2 7");
|
||||
|
||||
|
||||
JLabel lblNewLabel_7 = new JLabel("<html>Date de création du fichier transmis <br>aux étudiants.</html>");
|
||||
lblNewLabel_7.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_7, "cell 0 8,alignx left");
|
||||
|
||||
textFieldDateCreation = new JTextField();
|
||||
textFieldDateCreation.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldDateCreation, "cell 1 8,growx");
|
||||
textFieldDateCreation.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("creationDate")!=null){
|
||||
textFieldDateCreation.setText(calc.commandes.sujet.getAttributs().get("creationDate"));
|
||||
}
|
||||
|
||||
btnAideDateCreation = new JButton("");
|
||||
btnAideDateCreation.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Ne modifier pas cette date.<br>"
|
||||
+ "Sauf, si vous avez remis aux étudiants un nouveau fichier avec une autre date de création.<br>"
|
||||
+ "Exemple de format 2019-12-25T15:50:45.</html>");
|
||||
}
|
||||
});
|
||||
btnAideDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideDateCreation, "cell 2 8");
|
||||
|
||||
lblNewLabel_8 = new JLabel("<html>La date de création dans les fichers des étudiants doit être le même que celui du fichier fourni.</html>");
|
||||
lblNewLabel_8.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_8, "cell 0 9,alignx trailing");
|
||||
|
||||
comboBoxcontroleDateCreation = new JComboBox<String>();
|
||||
comboBoxcontroleDateCreation.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
|
||||
comboBoxcontroleDateCreation.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
contentPane.add(comboBoxcontroleDateCreation, "cell 1 9,growx,aligny top");
|
||||
if(calc.commandes.sujet.getAttributs().get("controleDateCreation")!=null){
|
||||
comboBoxcontroleDateCreation.setSelectedItem(calc.commandes.sujet.getAttributs().get("controleDateCreation").toLowerCase());
|
||||
}
|
||||
|
||||
btnAideControleDateCreation = new JButton("");
|
||||
btnAideControleDateCreation.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors la date de création du fichier de l'étudiant doit être identique à celle-ci.<br>"
|
||||
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
|
||||
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br><br>"
|
||||
+ "Cette technique peut être utilisée durant les contrôles.<br>"
|
||||
+ "Elle permettra de rechercher les fichiers réïnitialisés pour effacer l'historique.</html>");
|
||||
}
|
||||
});
|
||||
btnAideControleDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideControleDateCreation, "cell 2 9,aligny top");
|
||||
|
||||
lblNewLabel_9 = new JLabel("Auteur du fichier fourni aux étudiants.");
|
||||
lblNewLabel_9.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_9, "cell 0 10,alignx left");
|
||||
|
||||
textFieldInitial_Creator = new JTextField();
|
||||
textFieldInitial_Creator.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldInitial_Creator, "cell 1 10,growx");
|
||||
textFieldInitial_Creator.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("Initial_Creator")!=null){
|
||||
textFieldInitial_Creator.setText(calc.commandes.sujet.getAttributs().get("Initial_Creator"));
|
||||
}
|
||||
|
||||
btnAideInitial_Creator = new JButton("");
|
||||
btnAideInitial_Creator.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Le premier auteur du fichier (créateur).<br>"
|
||||
+ "Ne modifier pas, sauf si vous avez fourni un nouveau fichier aux étudiants avec un autre créateur.<html>");
|
||||
}
|
||||
});
|
||||
btnAideInitial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAideInitial_Creator, "cell 2 10");
|
||||
|
||||
lblNewLabel_10 = new JLabel("<html>L'auteur des fichiers des étudiants doit être celui du fichier fourni.</html>");
|
||||
lblNewLabel_10.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_10, "cell 0 11,alignx trailing");
|
||||
|
||||
comboBoxcontrole_Initial_Creator = new JComboBox<String>();
|
||||
comboBoxcontrole_Initial_Creator.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
|
||||
comboBoxcontrole_Initial_Creator.setFont(new Font("Tahoma", Font.BOLD, 12));
|
||||
contentPane.add(comboBoxcontrole_Initial_Creator, "cell 1 11,growx,aligny top");
|
||||
if(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator")!=null){
|
||||
comboBoxcontrole_Initial_Creator.setSelectedItem(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator").toLowerCase());
|
||||
}
|
||||
|
||||
btnAidecontrole_Initial_Creator = new JButton("");
|
||||
btnAidecontrole_Initial_Creator.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JOptionPane.showInternalMessageDialog(null, "<html>Si vrai alors le créateur du fichier des étudiants doit correspondre avec cet auteur.<br>"
|
||||
+ "Si ce n'est pas le cas, l'étudiant aura une note nulle.<br><br>"
|
||||
+ "Cette technique peut être utilisée pour les contrôles.<html>");
|
||||
}
|
||||
});
|
||||
btnAidecontrole_Initial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
|
||||
contentPane.add(btnAidecontrole_Initial_Creator, "cell 2 11");
|
||||
|
||||
lblNewLabel_11 = new JLabel("Lien URL de l'aide");
|
||||
lblNewLabel_11.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_11, "cell 0 12,alignx left");
|
||||
|
||||
textFieldlink_help = new JTextField();
|
||||
textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldlink_help, "cell 1 12,growx");
|
||||
textFieldlink_help.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("link_help")!=null){
|
||||
textFieldlink_help.setText(calc.commandes.sujet.getAttributs().get("link_help"));
|
||||
}
|
||||
|
||||
lblNewLabel_12 = new JLabel("Lien URL du sujet");
|
||||
lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(lblNewLabel_12, "cell 0 13,alignx left");
|
||||
|
||||
textFieldlink_sujet = new JTextField();
|
||||
contentPane.add(textFieldlink_sujet, "cell 1 13,growx");
|
||||
textFieldlink_sujet.setColumns(10);
|
||||
if(calc.commandes.sujet.getAttributs().get("link_sujet")!=null){
|
||||
textFieldlink_sujet.setText(calc.commandes.sujet.getAttributs().get("link_sujet"));
|
||||
}
|
||||
|
||||
btnVoirBaremeABC = new JButton("");
|
||||
btnVoirBaremeABC.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
double progression = Double.valueOf(textFieldProgression.getText());
|
||||
calcul.calculIntervalleBaremeABCDE C = new calcul.calculIntervalleBaremeABCDE(progression);
|
||||
JOptionPane.showMessageDialog(null, C.getMessageHTMLColonne());
|
||||
}
|
||||
});
|
||||
btnVoirBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
|
||||
contentPane.add(btnVoirBaremeABC, "cell 2 4");
|
||||
|
||||
btnVoirBaremeNumeric = new JButton("");
|
||||
btnVoirBaremeNumeric.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
double progression = Double.valueOf(textFieldProgression.getText());
|
||||
double noteFrom = Double.valueOf(textFieldNoteFrom.getText());
|
||||
calculNotesProgression C = new calculNotesProgression(progression,noteFrom);
|
||||
JOptionPane.showMessageDialog(null, C.getMessageHTMLColonne());
|
||||
}
|
||||
});
|
||||
btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
|
||||
contentPane.add(btnVoirBaremeNumeric, "cell 2 5");
|
||||
|
||||
JButton btnNewButton = new JButton("Valide");
|
||||
btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(btnNewButton, "cell 1 15,grow");
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
|
||||
if(verifCoefProgression()&&verifBareme()&&formatDateWriter.isCorrect(textFieldDateCreation.getText())) {
|
||||
calc.commandes.sujet.getAttributs().put("titre", textFieldTitre.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("auteur", textFieldAuteur.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("metaSujet", textFieldMetaSujet.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("presenceMetaSujet", comboBoxPresenceMetaSujet.getSelectedItem().toString() );
|
||||
calc.commandes.sujet.getAttributs().put("baremeABC", comboBoxBaremeABC.getSelectedItem().toString() );
|
||||
calc.commandes.sujet.getAttributs().put("bareme", textFieldNoteFrom.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("progression", textFieldProgression.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("historiquePresent", comboBoxhistoriquePresent.getSelectedItem().toString() );
|
||||
calc.commandes.sujet.getAttributs().put("creationDate", textFieldDateCreation.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("controleDateCreation", comboBoxcontroleDateCreation.getSelectedItem().toString() );
|
||||
calc.commandes.sujet.getAttributs().put("Initial_Creator", textFieldInitial_Creator.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("controle_Initial_Creator", comboBoxcontrole_Initial_Creator.getSelectedItem().toString() );
|
||||
calc.commandes.sujet.getAttributs().put("link_help", textFieldlink_help.getText() );
|
||||
calc.commandes.sujet.getAttributs().put("link_sujet", textFieldlink_sujet.getText() );
|
||||
|
||||
// meptl.chargementParametresFichierAnalyse();
|
||||
fenetres.create.getTextNodeSelect().afficheChargementFichierAnalyse();
|
||||
|
||||
instance.dispose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
comboBoxBaremeABC.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
String resultat = (String) comboBoxBaremeABC.getSelectedItem();
|
||||
if(resultat.equals("true")) {
|
||||
lblNoteFrom.setEnabled(false);
|
||||
textFieldNoteFrom.setEnabled(false);
|
||||
textFieldNoteFrom.setEditable(false);
|
||||
}else {
|
||||
lblNoteFrom.setEnabled(true);
|
||||
textFieldNoteFrom.setEnabled(true);
|
||||
textFieldNoteFrom.setEditable(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Fermeture de la fenêtre.
|
||||
*/
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous quitter cette fenêtre?", "Quitter", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
dispose();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Refresh();
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lorsque le combobox du barème ABC est sélectionner.
|
||||
*/
|
||||
private void Refresh() {
|
||||
if(comboBoxBaremeABC.getSelectedItem().equals("true")) {
|
||||
textFieldNoteFrom.setEditable(false);
|
||||
}else {
|
||||
textFieldNoteFrom.setEditable(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourn true si pas d'erreur dans le coefficient de progression
|
||||
* @return
|
||||
*/
|
||||
private boolean verifCoefProgression() {
|
||||
double progression;
|
||||
try {
|
||||
progression = Double.valueOf(textFieldProgression.getText());
|
||||
}catch (Exception e) {
|
||||
JOptionPane.showMessageDialog(null, "Le coef. de progression doit être une valeur numérique.");
|
||||
return false;
|
||||
}
|
||||
if(progression<0) {
|
||||
JOptionPane.showMessageDialog(null, "Le coef. de progression doit être positif.");
|
||||
return false;
|
||||
}
|
||||
if(progression>100) {
|
||||
JOptionPane.showMessageDialog(null, "Le coef. de progression doit être inférieur strictement à 10.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne true si pas d'erreur dans le barème.<br>
|
||||
* @return
|
||||
*/
|
||||
private boolean verifBareme() {
|
||||
double bareme;
|
||||
try {
|
||||
bareme = Double.valueOf(textFieldNoteFrom.getText());
|
||||
}catch (Exception e) {
|
||||
JOptionPane.showMessageDialog(null, "Le barème doit être une valeur numérique.");
|
||||
return false;
|
||||
}
|
||||
if(bareme<0) {
|
||||
JOptionPane.showMessageDialog(null, "Le barème doit être positif.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static proprieteFichierAnalyse getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new proprieteFichierAnalyse();
|
||||
}
|
||||
instance.actualise();
|
||||
instance.setVisible(true);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
public void actualise() {
|
||||
if(calc.commandes.sujet.getAttributs().get("titre")!=null){
|
||||
textFieldTitre.setText(calc.commandes.sujet.getAttributs().get("titre"));
|
||||
}else {
|
||||
textFieldTitre.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("auteur")!=null){
|
||||
textFieldAuteur.setText(calc.commandes.sujet.getAttributs().get("auteur"));
|
||||
}else {
|
||||
textFieldAuteur.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("metaSujet")!=null){
|
||||
textFieldMetaSujet.setText(calc.commandes.sujet.getAttributs().get("metaSujet"));
|
||||
}else {
|
||||
textFieldMetaSujet.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("bareme")!=null){
|
||||
textFieldNoteFrom.setText(calc.commandes.sujet.getAttributs().get("bareme"));
|
||||
}else {
|
||||
textFieldNoteFrom.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("progression")!=null){
|
||||
textFieldProgression.setText(calc.commandes.sujet.getAttributs().get("progression"));
|
||||
}else {
|
||||
textFieldProgression.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("creationDate")!=null){
|
||||
textFieldDateCreation.setText(calc.commandes.sujet.getAttributs().get("creationDate"));
|
||||
}else {
|
||||
textFieldDateCreation.setText("");
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("presenceMetaSujet")!=null){
|
||||
comboBoxPresenceMetaSujet.setSelectedItem(calc.commandes.sujet.getAttributs().get("presenceMetaSujet").toLowerCase());
|
||||
}else {
|
||||
comboBoxPresenceMetaSujet.setSelectedItem(String.valueOf(calc.commandes.analyse_presenceMetaSujet));
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("baremeABC")!=null){
|
||||
comboBoxBaremeABC.setSelectedItem(calc.commandes.sujet.getAttributs().get("baremeABC").toLowerCase());
|
||||
}else {
|
||||
comboBoxBaremeABC.setSelectedItem(String.valueOf(calc.commandes.analyse_baremeABC));
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("historiquePresent")!=null){
|
||||
comboBoxhistoriquePresent.setSelectedItem(calc.commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
|
||||
}else {
|
||||
comboBoxhistoriquePresent.setSelectedItem(String.valueOf(calc.commandes.analyse_historiquePresent));
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator")!=null){
|
||||
comboBoxcontrole_Initial_Creator.setSelectedItem(calc.commandes.sujet.getAttributs().get("controle_Initial_Creator").toLowerCase());
|
||||
}else {
|
||||
comboBoxcontrole_Initial_Creator.setSelectedItem(String.valueOf(calc.commandes.analyse_controle_Initial_Creator));
|
||||
}
|
||||
if(calc.commandes.sujet.getAttributs().get("controleDateCreation")!=null){
|
||||
comboBoxcontroleDateCreation.setSelectedItem(calc.commandes.sujet.getAttributs().get("controleDateCreation").toLowerCase());
|
||||
}else {
|
||||
comboBoxcontroleDateCreation.setSelectedItem(String.valueOf(calc.commandes.analyse_controleDateCreation));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package list;
|
||||
|
||||
public class listeAttributWriterPasEvaluableAvecCodeEvaluateur {
|
||||
|
||||
public listeAttributWriterPasEvaluableAvecCodeEvaluateur(){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des attributs Writer qui ne peuvent pas être évaluer par un code évaluateurs
|
||||
* @param nameAttribut
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEvaluable(String nameAttribut) {
|
||||
if(nameAttribut.equals("style:page-layout-name")) return true;
|
||||
if(nameAttribut.equals("style:family")) return true;
|
||||
if(nameAttribut.equals("text:name")) return true;
|
||||
if(nameAttribut.equals("text:style-name")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package list;
|
||||
|
||||
public class listeAttributWriterValeurPasModifiable {
|
||||
|
||||
public listeAttributWriterValeurPasModifiable() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static boolean isModifiable(String nameAttribut) {
|
||||
if(nameAttribut.equals("style:name")) return true;
|
||||
if(nameAttribut.equals("style:display-name")) return true;
|
||||
if(nameAttribut.equals("style:next-style-name")) return true;
|
||||
if(nameAttribut.equals("style:parent-style-name")) return true;
|
||||
if(nameAttribut.equals("style:family")) return true;
|
||||
if(nameAttribut.equals("style:master-page-name")) return true;
|
||||
if(nameAttribut.equals("style:page_number"))return true;
|
||||
if(nameAttribut.equals("style:page-layout-name")) return true;
|
||||
if(nameAttribut.equals("numeroabsolue")) return true;
|
||||
if(nameAttribut.equals("numero")) return true;
|
||||
if(nameAttribut.equals("draw:style-name")) return true;
|
||||
if(nameAttribut.equals("text:style-name")) return true;
|
||||
if(nameAttribut.equals("text:name")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package list;
|
||||
|
||||
public class listeAttributsAnalyseWriter {
|
||||
|
||||
public listeAttributsAnalyseWriter() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* retourne true si c'est un attribut utilisé par analyseWriter.<br>
|
||||
* @param attribut
|
||||
* @return
|
||||
*/
|
||||
public static boolean isAttributAnalyseWriter(String attribut) {
|
||||
|
||||
if(attribut.equals("evaluer")) return true;
|
||||
if(attribut.equals("menu")) return true;
|
||||
if(attribut.equals("saut")) return true;
|
||||
if(attribut.equals("titre")) return true;
|
||||
if(attribut.equals("titre1")) return true;
|
||||
if(attribut.equals("titre2")) return true;
|
||||
if(attribut.equals("titre3")) return true;
|
||||
if(attribut.equals("poids")) return true;
|
||||
if(attribut.equals("analyseStyle")) return true;
|
||||
if(attribut.equals("allContent")) return true;
|
||||
if(attribut.equals("index")) return true;
|
||||
if(attribut.equals("recherche_index")) return true;
|
||||
if(attribut.equals("recherche_contenu_exact")) return true;
|
||||
if(attribut.equals("evalNameNode")) 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;
|
||||
|
||||
|
||||
//Les attribut placer dans le node fichier du fichier d'analyse
|
||||
if(attribut.equals("analysis_filename")) return true;
|
||||
if(attribut.equals("auteur")) return true;
|
||||
if(attribut.equals("baremeABC")) return true;
|
||||
if(attribut.equals("controleDateCreation")) return true;
|
||||
if(attribut.equals("controle_Initial_Creator")) return true;
|
||||
if(attribut.equals("creationDate")) return true;
|
||||
if(attribut.equals("date")) return true;
|
||||
if(attribut.equals("dateModification")) return true;
|
||||
if(attribut.equals("dureeEdition")) return true;
|
||||
if(attribut.equals("filename")) return true;
|
||||
if(attribut.equals("hash")) return true;
|
||||
if(attribut.equals("historiquePresent")) return true;
|
||||
if(attribut.equals("link_help")) return true;
|
||||
if(attribut.equals("link_sujet")) return true;
|
||||
if(attribut.equals("metaSujet")) return true;
|
||||
if(attribut.equals("notefrom")) return true;
|
||||
if(attribut.equals("presenceMetaSujet")) return true;
|
||||
if(attribut.equals("producteur")) return true;
|
||||
if(attribut.equals("progression")) return true;
|
||||
if(attribut.equals("version")) return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|