V4.0.2 MAJ - Verification des champs du fichier CSV

MAJ - documentation
This commit is contained in:
pablo rodriguez 2022-05-31 19:37:46 +02:00
parent f1e71f1cb5
commit 3223be2cc0
24 changed files with 742 additions and 40 deletions

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -1,2 +1 @@
/app/
/resources/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

BIN
icons/documentation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

299
icons/documentation.svg Normal file
View File

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\documentation.png"
sodipodi:docname="documentation.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<linearGradient
id="k"
gradientTransform="matrix(7.99974,0,0,7.9977797,-863.30581,-7811.3988)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="translate(10.661607,-2.6314354)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="translate(12)" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-930.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1552.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-269.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1511.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="28.119342"
inkscape:cx="27.521058"
inkscape:zoom="10.028684"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-intersection-paths="true"
inkscape:snap-smooth-nodes="true">
<sodipodi:guide
id="guide14"
orientation="1,0"
position="-0.26024984,-3.5581931" />
<sodipodi:guide
position="0.48659243,3.8856433"
orientation="0.70710678,-0.70710678"
id="guide3385" />
<sodipodi:guide
position="-1.4160772,5.1837263"
orientation="0,-1"
id="guide3467" />
<sodipodi:guide
position="0.59328418,2.5519965"
orientation="-0.70710678,-0.70710678"
id="guide3469" />
<sodipodi:guide
position="5.4008111,11.501107"
orientation="0,-1"
id="guide1694" />
<sodipodi:guide
position="5.2619527,11.418425"
orientation="1,0"
id="guide1696" />
<sodipodi:guide
position="1.6458943,8.1147503"
orientation="0,-1"
id="guide1869" />
<sodipodi:guide
position="1.7360697,8.1974326"
orientation="1,0"
id="guide1909" />
<sodipodi:guide
position="1.6458943,2.5595338"
orientation="0,-1"
id="guide2101" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"
transform="translate(-1.1803834,-2.0081471)">
<g
id="g4419"
transform="matrix(1.177261,0,0,1.177261,-0.47302742,-1.904195)"
style="stroke-width:0.849429">
<path
style="fill:#999999;stroke:none;stroke-width:0.224744px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 10.438917,9.7906819 9.6778977,9.1391568 V 11.424438 L 10.438917,11.88727 V 9.7906819"
id="path4103" />
<g
id="g4404"
style="stroke-width:0.849429">
<g
id="g4409"
style="stroke-width:0.849429">
<path
style="fill:#0000ff;stroke:none;stroke-width:0.0674234;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
d="M 5.9839444,3.6671348 2.4580616,6.9708093 v 5.6378987 c 0,0.641719 0.4266914,1.158586 1.0684101,1.158586 h 5.4260255 c 0.6417188,0 1.1580688,-0.516867 1.1580688,-1.158586 V 4.8257206 c 0,-0.6417187 -0.51635,-1.1585856 -1.1580688,-1.1585856 z"
id="path1431"
sodipodi:nodetypes="ccssssssc" />
<path
style="fill:#000000;stroke:none;stroke-width:0.0674234;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
d="m 4.825359,6.929468 c 0.6417186,0 1.1585855,-0.5168668 1.1585855,-1.1585855 V 3.7084761 L 2.4580615,6.929468 Z"
id="rect1162" />
</g>
</g>
<rect
style="fill:#000000;stroke:none;stroke-width:0.0674234;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect2358"
width="4.1764035"
height="2.0965881"
x="6.2625132"
y="9.7906818"
rx="0"
ry="0" />
<text
xml:space="preserve"
style="font-size:1.76389px;line-height:1.25;font-family:'C.A. Gatintas';-inkscape-font-specification:'C.A. Gatintas';text-align:center;text-anchor:middle;fill:#ffffff;stroke-width:0.224744"
x="8.2416925"
y="11.400863"
id="text3396"><tspan
sodipodi:role="line"
id="tspan3394"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:1.76389px;font-family:arial;-inkscape-font-specification:arial;fill:#ffffff;stroke-width:0.224744"
x="8.2416925"
y="11.400863">DOC</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
icons/fichierCSVInfoXML.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\fichierCSVInfoXML.png"
sodipodi:docname="fichier_csv_student_xml.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<linearGradient
id="k"
gradientTransform="matrix(7.9997399,0,0,7.9977797,-859.65069,-7810.3942)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="translate(12)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="translate(12)" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-930.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1552.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-269.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1511.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#b"
id="linearGradient4157"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(7.9997394,0,0,7.997779,-859.65065,-7810.3935)"
x1="122.75008"
y1="991.62115"
x2="111.74973"
y2="977.11713" />
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="g4208"
inkscape:document-units="mm"
inkscape:cy="14.965968"
inkscape:cx="37.149567"
inkscape:zoom="9.421375"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false">
<sodipodi:guide
id="guide14"
orientation="1,0"
position="-2.471617e-08,4.4381936" />
<sodipodi:guide
position="6.6200247,5.8336321"
orientation="-0.71816555,0.69587229"
id="guide5772" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"
transform="translate(-0.92013353,-0.34176359)">
<g
id="g923"
transform="matrix(0.08485361,0,0,0.08631596,0.60989086,1.0161972)">
<g
id="g4208"
transform="translate(-2.3167326,1.6267735)">
<path
style="fill:url(#k);stroke-width:1"
d="m 30.858625,-5.2831881 c -0.273281,0 -0.546539,0.012177 -0.81863,0.038373 -4.00264,0.7638359 -4.983554,2.4736221 -4.911777,6.5469042 V 127.88268 c 4.37e-4,4.57068 1.977252,6.54647 6.549036,6.5469 H 132.09369 c 4.57177,-4.3e-4 6.54646,-1.97622 6.54689,-6.5469 V 49.492506 c 0.0524,-2.305152 -0.85142,-4.61734 -2.45589,-6.274028 L 90.16664,-2.7889264 c -1.657113,-1.6036405 -3.970451,-2.509263 -6.276159,-2.4558885 H 31.677254 c -0.271992,-0.026196 -0.545338,-0.038373 -0.818629,-0.038373 z"
id="path41" />
<path
d="M 31.675137,1.2658478 V 127.88055 H 132.09371 V 49.292112 L 84.067446,1.2658478 Z"
fill="url(#j)"
id="path43"
style="fill:#000080;stroke-width:1" />
<path
style="fill:#ffffff;stroke-width:0.3;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
d="M 8.2421875,3.4921875 V 23.351562 H 40.447266 v -2.095703 c -0.09248,0.01116 -0.184138,0.02148 -0.277344,0.02148 -0.122106,0 -0.246464,-0.01036 -0.367188,-0.0293 H 25.791016 C 24.568178,21.247861 23.455218,20.111781 23.455078,18.86132 V 4.53125 c 0.01446,-0.3863734 0.147779,-0.7350196 0.351563,-1.0390625 z"
transform="matrix(3.1181152,0,0,3.0652887,5.9729432,-9.4403182)"
id="rect970" />
<path
style="fill:url(#linearGradient4157);stroke-width:1"
d="m 131.023,55.778799 c 0.39381,0 0.78673,-0.03172 1.17584,-0.09203 4.9934,-1.607182 6.67375,-9.243081 2.82421,-12.835116 L 89.832099,-2.7945364 C 85.657415,-6.7930797 77.344978,-3.3716161 77.125023,2.4359483 V 48.082148 c 4.5e-4,3.983465 3.587752,7.604065 7.531187,7.604632 h 45.1873 c 0.38931,0.06032 0.78572,0.09202 1.17949,0.09202 z"
id="path4056" />
<text
xml:space="preserve"
style="font-size:53.1628px;line-height:1.25;font-family:'C.A. Gatintas';-inkscape-font-specification:'C.A. Gatintas';text-align:center;text-anchor:middle;fill:#ffffff;stroke-width:3.0916"
x="88.898773"
y="96.537178"
id="text3199"
transform="scale(0.90538451,1.1045031)"><tspan
sodipodi:role="line"
id="tspan3197"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:arial;-inkscape-font-specification:arial;fill:#ffffff;stroke-width:3.0916"
x="88.898773"
y="96.537178">CSV</tspan></text>
<g
id="g6608"
transform="matrix(13.490989,0,0,13.200666,179.93357,-56.557486)"
style="stroke-width:1.21708">
<path
id="path4945"
style="fill:#000000;stroke:none;stroke-width:0.322019px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 6.9115255,4.1117374 A 2.5406649,2.4821629 0 0 0 4.3705953,6.5942731 2.5406649,2.4821629 0 0 0 6.9115255,9.0762921 2.5406649,2.4821629 0 0 0 8.4871398,8.5409244 L 9.0535135,9.109882 9.4219665,8.6845849 8.8902159,8.1507674 A 2.5406649,2.4821629 0 0 0 9.4519387,6.5942731 2.5406649,2.4821629 0 0 0 6.9115255,4.1117374 Z m 0,0.5539713 A 1.9739749,1.9285217 0 0 1 8.8850483,6.5942731 1.9739749,1.9285217 0 0 1 6.9115255,8.5223207 1.9739749,1.9285217 0 0 1 4.9374857,6.5942731 1.9739749,1.9285217 0 0 1 6.9115255,4.6657087 Z" />
<path
style="fill:#ff0000;stroke:none;stroke-width:0.322019px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.7071636,8.4854359 2.9328084,2.9440821 c 0.0419,0.512292 -0.280235,0.819082 -0.875635,0.903687 L 8.8320954,9.3885382 C 9.117696,9.015001 9.3363405,8.7445068 9.7071636,8.4854359 Z"
id="path5444"
sodipodi:nodetypes="ccccc" />
</g>
<path
style="fill:#ffd42a;stroke:none;stroke-width:3.09159px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 108.97189,-2.3796952 88.34193,65.405769 126.16351,37.675352 90.634137,134.21828 150.2318,14.053143 106.67968,40.756507 127.30964,-3.4067497 Z"
id="path3536" />
<text
xml:space="preserve"
style="font-size:53.1628px;line-height:1.25;font-family:'C.A. Gatintas';-inkscape-font-specification:'C.A. Gatintas';text-align:center;text-anchor:middle;fill:#ff0000;stroke-width:3.0916"
x="89.404747"
y="56.259651"
id="text1376"
transform="scale(0.90538451,1.1045031)"><tspan
sodipodi:role="line"
id="tspan1374"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:arial;-inkscape-font-specification:arial;fill:#ff0000;stroke-width:3.0916"
x="89.404747"
y="56.259651">XML</tspan></text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -8,8 +8,6 @@ import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.filechooser.FileView;
import MEPTL.commandes;
import javax.swing.JButton;
import java.awt.event.ActionListener;

View File

@ -6,7 +6,6 @@ import java.awt.Dimension;
import java.awt.Font;
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -22,7 +21,6 @@ import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@ -108,7 +106,6 @@ public class create extends JFrame {
* Create the application.
*/
public create() {
setResizable(false);
try {
initialize();
} catch (UnsupportedLookAndFeelException e) {
@ -135,8 +132,9 @@ public class create extends JFrame {
//frame = new JFrame();
System.out.println(this.getClass());
setSize(1400,915);
// System.out.println(this.getClass());
// this.setExtendedState(MAXIMIZED_BOTH);
setSize(1400,920);
//setExtendedState(getExtendedState()|JFrame.MAXIMIZED_BOTH );
setTitle(commandes.Titre);
@ -166,7 +164,7 @@ public class create extends JFrame {
getContentPane().add(panel, BorderLayout.CENTER);
panel.setLayout(null);
tabbedPane.setBounds(812, 13, 561, 785);
tabbedPane.setBounds(816, 10, 600, 785);
panel.add(tabbedPane);
JPanel panelProperties = new JPanel();
@ -419,7 +417,7 @@ public class create extends JFrame {
JScrollPane rightScrollPane = new JScrollPane( );
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftScrollPane, rightScrollPane );
splitPane.setBounds(10, 13, 792, 783);
splitPane.setBounds(10, 10, 800, 783);
panel.add(splitPane);
rightScrollPane.setViewportView(textNodeSelect);
textNodeSelect.setFont(new Font("Monospaced", Font.PLAIN, 15));

View File

@ -3,13 +3,10 @@ package app;
import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import javax.swing.AbstractAction;
import javax.swing.Action;
@ -20,7 +17,6 @@ import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.JToolBar;
import javax.swing.KeyStroke;
import javax.swing.border.EmptyBorder;
@ -32,6 +28,7 @@ import org.xml.sax.SAXException;
import MEPTL.commandes;
import MEPTL.ecritureSujet;
import MEPTL.meptl;
import MEPTL.verificationFichierAnalyse;
import cXML.Run;
import cXML.node;
@ -43,21 +40,21 @@ import net.miginfocom.swing.MigLayout;
import java.awt.event.InputEvent;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import java.awt.Color;
import java.awt.Desktop;
import javax.swing.JToggleButton;
import java.awt.FlowLayout;
import javax.swing.JEditorPane;
public class evaluate extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
*
*/
@SuppressWarnings("unused")
private final long serialVersionUID = 1L;
private JToolBar toolBar = new JToolBar();
private JPanel contentPane;
private JLabel lblPath = new JLabel();
@ -72,7 +69,7 @@ public class evaluate extends JFrame {
private JCheckBox chckbxNoLogo = new JCheckBox();
private JCheckBox chckbxVerif = new JCheckBox();
private JCheckBox chckbxNewLogo = new JCheckBox();
private JTextPane txtpnmessages = new JTextPane();
private JEditorPane txtpnmessages = new JEditorPane();
private JProgressBar progressBar = new JProgressBar();
@ -113,6 +110,8 @@ public class evaluate extends JFrame {
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);
@ -182,6 +181,11 @@ public class evaluate extends JFrame {
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);
@ -298,12 +302,12 @@ public class evaluate extends JFrame {
progressBar.setEnabled(false);
scrollPane.setColumnHeaderView(progressBar);
txtpnmessages = new JTextPane();
txtpnmessages = new JEditorPane();
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 14));
txtpnmessages.setText("Charger un fichier d'analyse.");
scrollPane.setViewportView(txtpnmessages);
this.setExtendedState(MAXIMIZED_BOTH);
refreshLabel();
setVisible(true);
@ -429,7 +433,7 @@ public class evaluate extends JFrame {
/**
* Ouvre et affiche un node dans le composant JTree
* Ouvre et affiche un fichier XML
*/
private AbstractAction actOpen = new AbstractAction() {
@ -437,7 +441,7 @@ public class evaluate extends JFrame {
{
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
putValue( Action.NAME, "Ouvrir un fichier d'analyse" );
putValue( Action.NAME, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/fichierAnalyse.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
putValue( Action.SHORT_DESCRIPTION, "Ouvrir un nouveau fichier d'analyse (CTRL+O)" );
@ -533,6 +537,74 @@ public class evaluate extends JFrame {
}
};
private AbstractAction actVerifCSV = new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue(LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfoXML.png")));
putValue( Action.NAME, "Vérification du CSV avec les paramètres du fichier d'analyse (CTRL+B)" );
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierCSVInfoXML.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_U );
putValue( Action.SHORT_DESCRIPTION, "Vérification du CSV avec les paramètres du fichier d'analyse (CTRL+B)" );
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_DOWN_MASK) );
}
@Override
public void actionPerformed( ActionEvent e ) {
if(commandes.fichierAnalyseValide) {
if(commandes.fourniCSV) {
node settingCSV = commandes.sujet.retourneFirstEnfantsByName("import_moodle");
if(settingCSV.isHasAttributs()) {
String email ="inconnu";
String name = "inconnu";
String firstname = "inconnu";
String id = "inconnu";
boolean avertissement = false;
if(settingCSV.getAttributs().get("email")!=null) {
email = settingCSV.getAttributs().get("email");
}
if(settingCSV.getAttributs().get("name")!=null) {
name = settingCSV.getAttributs().get("name");
}
if(settingCSV.getAttributs().get("firstname")!=null) {
firstname = settingCSV.getAttributs().get("firstname");
}
if(settingCSV.getAttributs().get("id")!=null) {
id = settingCSV.getAttributs().get("id");
}
if(commandes.nodeCSV.getNodes().get(0).getAttributs().get(firstname)==null) {
txtpnmessages.setText("*** AVERTISSEMENT - Il n'y a pas le champ " + firstname + " dans le fichier CSV. ***");
avertissement=true;
}
if(commandes.nodeCSV.getNodes().get(0).getAttributs().get(name)==null) {
txtpnmessages.setText("*** AVERTISSEMENT - Il n'y a pas le champ " + name + " dans le fichier CSV. ***");
avertissement=true;
}
if(commandes.nodeCSV.getNodes().get(0).getAttributs().get(id)==null) {
txtpnmessages.setText("*** AVERTISSEMENT - Il n'y a pas le champ " + id + " dans le fichier CSV. ***");
avertissement=true;
}
if(commandes.nodeCSV.getNodes().get(0).getAttributs().get(email)==null) {
txtpnmessages.setText("*** AVERTISSEMENT - Il n'y a pas le champ " + email + " dans le fichier CSV. ***");
avertissement=true;
}
if(!avertissement) {
txtpnmessages.setText("*** Le fichier CSV contenant la liste des étudiants peut être utilisé avec les paramètres du fichier d'analyse ***");
}
}else {
txtpnmessages.setText("*** Le fichier CSV contenant la liste des étudiants est vide ***");
}
}else {
txtpnmessages.setText("*** Veuillez charger un fichier CSV contenant la liste des étudiants ***");
new msgBox("Le fichier CSV contenant la liste des étudiants n'est pas chargé.",true,false,"Avertissement");
}
}else {
txtpnmessages.setText("*** Veuillez charger un fichier d'analyse ***");
new msgBox("Le fichier d'analyse n'est pas valide.",true,false,"Avertissement");
}
}
};
/**
* Gènère un nouveau fichier d'analyse à partir d'un fichier ODF
@ -546,7 +618,7 @@ public class evaluate extends JFrame {
putValue( Action.NAME, "Génère un nouveau fichier d'analyse (CTRL+N)" );
putValue( Action.SMALL_ICON, new ImageIcon(evaluate.class.getResource("/resources/fichierODF.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_N );
putValue( Action.SHORT_DESCRIPTION, "Génère un nouveau fichier d'analyse (CTRL+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) );
}
@ -582,7 +654,8 @@ public class evaluate extends JFrame {
+"\nLe fichier sujet.xml a été généré dans le dossier :"
+"\n" + commandes.path
+"\n*************************");
commandes.fichierAnalyseValide=true;
commandes.sujet = nodSujet;
new verificationFichierAnalyse();
} catch (ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1) {
e1.printStackTrace();
@ -722,12 +795,13 @@ public class evaluate extends JFrame {
}
@Override public void actionPerformed( ActionEvent e ) {
if(commandes.fichierAnalyseValide) {
new create();
dispose();
}else {
txtpnmessages.setText("*** Veuillez sélectionner un fichier d'analyse pour le modifier ***");
}
// if(commandes.fichierAnalyseValide) {
//
// }else {
// txtpnmessages.setText("*** Veuillez sélectionner un fichier d'analyse pour le modifier ***");
// }
new create();
dispose();
System.out.println( "Affiche la fenêtre pour la modification." );
}
};
@ -789,9 +863,16 @@ public class evaluate extends JFrame {
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
commandes.nameCSV = chooser.getSelectedFile().getAbsolutePath();
commandes.fourniCSV=true;
commandes.nodeCSV = meptl.chargementFichierCSV();
txtpnmessages.setText(Run.ecritureNode(commandes.nodeCSV, 0).toString());
commandes.fourniCSV=true;
if(!commandes.nodeCSV.getNomElt().equals("fileCSV")) {
commandes.fourniCSV=false;
}
if(commandes.nodeCSV.getNodes().size()<=0) {
commandes.fourniCSV=false;
txtpnmessages.setText("*** Le fichier ne contient pas d'étudiant ***");
}
} else {
commandes.nameCSV = "";
commandes.fourniCSV=false;

View File

@ -15,7 +15,6 @@ import javax.swing.filechooser.FileNameExtensionFilter;
import MEPTL.commandes;
import MEPTL.meptl;
import MEPTL.verificationFichierAnalyse;
import cXML.Run;
import cXML.node;
public class filechooserXML extends JFileChooser {

View File

@ -1,10 +1,12 @@
package app;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import javax.swing.ImageIcon;
import javax.swing.JButton;
@ -64,7 +66,7 @@ public class mainApp extends JFrame implements ActionListener{
frmEvalwriter = new JFrame();
frmEvalwriter.setResizable(false);
frmEvalwriter.setTitle("analyseWriter");
frmEvalwriter.setBounds(100, 100, 555, 315);
frmEvalwriter.setBounds(100, 100, 555, 380);
frmEvalwriter.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frmEvalwriter.getContentPane().setLayout(null);
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
@ -76,7 +78,7 @@ public class mainApp extends JFrame implements ActionListener{
btnCreate.setFont(new Font("Tahoma", Font.PLAIN, 14));
btnCreate.addActionListener(this);
btnCreate.setBounds(34, 180, 470, 58);
btnCreate.setBounds(34, 180, 470, 60);
frmEvalwriter.getContentPane().add(btnCreate);
actCharge = new JButton("Evaluer les fichiers des étudiants - Créer un fichier d'analyse");
@ -85,7 +87,7 @@ public class mainApp extends JFrame implements ActionListener{
actCharge.setBackground(SystemColor.inactiveCaption);
actCharge.addActionListener(this);
actCharge.setFont(new Font("Tahoma", Font.PLAIN, 14));
actCharge.setBounds(34, 110, 470, 58);
actCharge.setBounds(34, 110, 470, 60);
frmEvalwriter.getContentPane().add(actCharge);
JLabel lblNewLabel = new JLabel();
@ -95,6 +97,34 @@ public class mainApp extends JFrame implements ActionListener{
lblNewLabel.setFont(new Font("Pacifico", Font.PLAIN, 26));
lblNewLabel.setBounds(34, 11, 470, 74);
frmEvalwriter.getContentPane().add(lblNewLabel);
JButton btnNewButton = new JButton("Informations");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new about();
}
});
btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
btnNewButton.setIcon(new ImageIcon(mainApp.class.getResource("/resources/apropos.png")));
btnNewButton.setBounds(34, 270, 220, 60);
frmEvalwriter.getContentPane().add(btnNewButton);
JButton btnDocumentation = new JButton("Documentation");
btnDocumentation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Desktop d = Desktop.getDesktop();
try {
d.open(new File(evaluate.class.getResource("/resources/documentation.pdf").getPath()));
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
btnDocumentation.setIcon(new ImageIcon(mainApp.class.getResource("/resources/documentation.png")));
btnDocumentation.setFont(new Font("Tahoma", Font.PLAIN, 14));
btnDocumentation.setBounds(284, 270, 220, 60);
frmEvalwriter.getContentPane().add(btnDocumentation);
}
@ -112,5 +142,4 @@ public class mainApp extends JFrame implements ActionListener{
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB