MAJ V4.4.3

Amélioration - début du développement pour enregistrer dans une base de
données XML les différentes évluations.
This commit is contained in:
pablo rodriguez 2023-02-16 21:47:23 +01:00
parent 2355a2658d
commit 5d5c7af09b
72 changed files with 266 additions and 13 deletions

Binary file not shown.

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -8,3 +8,4 @@
/MEPTL/
/action/
/evaluer/
/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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="sauvegardeHistoriqueEvaluation.svg"
inkscape:export-filename="sauvegardehistoriqueevaluation.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="6.3757142"
inkscape:cx="-3.0584809"
inkscape:cy="24.232579"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g447" /><defs
id="defs2" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><g
id="g447"
transform="matrix(0.07295087,0,0,0.07295087,7.1535362,-1.4012141)"
style="stroke-width:13.7079"><path
style="fill:#55ff99;stroke-width:13.7079"
d="m -39.6043,79.546324 c -15.35341,-1.374484 -25.508021,-3.510873 -35.496453,-7.46796 -12.502279,-4.95299 -20.626799,-11.905377 -22.61675,-19.353808 -0.475215,-1.778741 -0.451961,-5.220878 0.04833,-7.154307 0.647033,-2.500522 2.617291,-5.684044 5.148201,-8.318411 9.333576,-9.71511 29.074576,-16.563658 52.644592,-18.263462 4.62983,-0.33389 16.2998,-0.331613 21.04187,0.0041 24.91057,1.763562 45.95691,9.513212 54.31655,20.000359 7.28315,9.136686 4.43743,19.264145 -7.66198,27.267757 -2.42999,1.607407 -6.93282,4.039452 -8.95144,4.834803 -0.50933,0.200676 -1.52682,0.631208 -2.26109,0.956738 -1.93238,0.856692 -9.04871,3.12338 -12.33818,3.929952 -6.63755,1.627513 -13.19959,2.648024 -22.31011,3.469611 -4.62998,0.417534 -17.33385,0.473279 -21.56354,0.09462 z"
id="path343" /><path
style="fill:#00ff66;stroke-width:13.7079"
d="m -36.16472,111.56113 c -25.16853,-1.18739 -46.834654,-8.29596 -56.467898,-18.526913 -2.12703,-2.25901 -3.374311,-4.116309 -4.504511,-6.707577 l -0.807799,-1.852084 -0.05525,-12.170833 c -0.04925,-10.848404 -0.01491,-12.023863 0.315979,-10.818218 1.038406,3.783558 4.373249,8.169096 8.784726,11.552495 12.331228,9.457481 34.886015,15.2454 59.494893,15.267342 27.09653,0.02416 51.67524,-7.039568 62.87448,-18.069634 1.49683,-1.474214 3.65497,-4.148895 3.65497,-4.529768 0,-0.109833 0.22676,-0.518157 0.50392,-0.907386 0.27715,-0.389228 0.71108,-1.360109 0.96428,-2.15751 0.2532,-0.797401 0.56222,-1.562931 0.68671,-1.701176 0.1258,-0.139702 0.22634,4.612659 0.22634,10.698721 0,9.238332 -0.0675,11.221562 -0.43156,12.686771 -0.74553,3.000177 -2.3926,5.813867 -5.08224,8.682007 l -0.80637,0.8599 h -5.73141 c -6.21064,0 -7.74563,0.22495 -10.27255,1.50544 -2.10019,1.06424 -4.18783,3.24253 -5.35089,5.583213 -0.55737,1.12171 -1.03907,2.08075 -1.07045,2.13119 -0.0314,0.0504 -0.80954,-0.20436 -1.72923,-0.56623 -3.33302,-1.31141 -6.78277,-1.1617 -10.15722,0.44082 -1.59153,0.75582 -2.5628,1.5226 -5.32955,4.20748 l -3.38333,3.28322 -4.36562,0.44556 c -4.81357,0.49127 -12.92975,0.96699 -15.61042,0.91498 -0.94588,-0.0184 -3.80338,-0.13167 -6.35,-0.25181 z"
id="path341" /><path
style="fill:#00d455;stroke-width:13.7079"
d="m -38.14909,143.3183 c -8.555104,-0.58033 -17.055445,-1.78441 -23.384357,-3.31241 -18.435233,-4.45086 -31.075681,-12.01516 -35.316752,-21.13428 -1.171563,-2.51908 -1.221593,-3.15184 -1.202992,-15.21476 0.0098,-6.330153 0.05614,-11.390313 0.103058,-11.244793 0.04692,0.14552 0.274615,0.87911 0.505988,1.63021 1.420816,4.61233 6.685036,10.183453 13.257551,14.030453 9.497874,5.55926 22.988638,9.50568 38.246569,11.18818 7.191605,0.79302 15.344255,1.08469 22.254305,0.79618 3.25025,-0.13571 6.53462,-0.32312 7.29861,-0.41647 l 1.38906,-0.16973 v 2.00283 c 0,1.84929 0.34351,3.2303 1.43389,5.76456 0.13873,0.32245 -0.001,0.47633 -0.55822,0.61363 -1.41893,0.34979 -3.94696,1.97021 -5.29122,3.39157 -2.41954,2.5583 -3.52195,5.58226 -3.52195,9.66082 0,2.24277 -0.0339,2.38744 -0.59531,2.53788 -0.82659,0.22152 -10.7685,0.13727 -14.61823,-0.12387 z"
id="path339" /><path
style="fill:#00aa44;stroke-width:13.7079"
d="m -37.75222,175.20376 c -0.50932,-0.0571 -3.18823,-0.2946 -5.95312,-0.52776 -13.439837,-1.13336 -27.342278,-4.68981 -36.719905,-9.39348 -5.161158,-2.58876 -8.595442,-4.95929 -11.794112,-8.14095 -2.320155,-2.30782 -3.740044,-4.34071 -4.91127,-7.03158 l -0.814301,-1.87085 -0.05525,-12.17083 c -0.04999,-11.01311 -0.01892,-12.0382 0.326651,-10.77652 0.428773,1.56545 0.835468,2.4165 2.097803,4.38984 8.579457,13.41185 36.25397,22.57236 67.613094,22.38053 l 5.15937,-0.0316 0.53971,1.54386 c 1.25489,3.5896 4.03422,6.53566 7.23287,7.66673 1.55913,0.55132 1.53491,0.41325 0.5502,3.13754 -0.85773,2.37298 -0.79347,5.83469 0.15219,8.19847 0.38736,0.96825 0.66015,1.80461 0.60619,1.85857 -0.50645,0.50645 -20.62749,1.14951 -24.03012,0.76799 z"
id="path337" /><path
id="path331"
style="fill:#008000;stroke-width:13.7079"
d="m 23.921021,106.44689 c -2.16709,0.0446 -2.009467,0.47209 -2.282032,2.61948 -0.251299,1.9798 -1.1936,7.70028 -1.35909,8.25066 -0.08086,0.26891 -0.837385,0.67928 -1.907894,1.03508 -0.975509,0.32422 -2.603844,0.98702 -3.618383,1.47277 -1.014539,0.48576 -1.969365,0.88315 -2.121835,0.88315 -0.15247,0 -1.346219,-0.7714 -2.653068,-1.7141 -1.306838,-0.94269 -3.244381,-2.34168 -4.30568,-3.10886 C 4.61174,115.11789 3.59971,114.458 3.424081,114.4185 c -0.17562,-0.0395 -1.803316,1.41609 -3.616834,3.23494 l -3.296956,3.30729 0.567924,0.73329 c 0.312559,0.4035 1.141675,1.56524 1.842265,2.58124 0.700599,1.016 1.898897,2.73021 2.662886,3.80958 0.763979,1.07939 1.389063,2.10646 1.389063,2.28255 0,0.17608 -0.351589,0.97903 -0.781348,1.78439 -0.42976,0.80536 -1.098575,2.42433 -1.486214,3.5972 L 0,137.88115 l -1.358056,0.27491 c -0.74695,0.15119 -3.19222,0.56788 -5.433777,0.92605 -2.241568,0.35818 -4.178981,0.75491 -4.305681,0.8816 -0.12666,0.1267 -0.197513,2.3005 -0.157613,4.83071 l 0.07235,4.60075 2.645834,0.45062 c 1.455208,0.248 3.945677,0.67265 5.534545,0.94361 l 2.88923,0.49248 0.713651,2.10943 c 0.39261,1.1601 1.100808,2.86538 1.573548,3.78943 0.968299,1.89274 0.973075,1.86325 -0.721403,4.17236 -2.308738,3.14616 -4.192563,5.81456 -4.527373,6.41304 -0.346129,0.61871 -0.243717,0.75518 2.94349,3.9424 l 3.301607,3.30212 2.348694,-1.63142 c 1.291639,-0.89728 3.360207,-2.34014 4.597136,-3.20601 1.236928,-0.86587 2.367234,-1.57457 2.511474,-1.5751 0.14423,-4.4e-4 1.096738,0.40506 2.116667,0.90072 1.019939,0.49565 2.652126,1.16465 3.627685,1.48674 l 1.774052,0.58549 0.273369,1.35754 c 0.150449,0.74661 0.456858,2.48863 0.680578,3.87108 0.22373,1.38244 0.541774,3.31721 0.706934,4.29948 l 0.30024,1.78594 h 4.714958 c 4.675435,0 4.716295,-0.005 4.843115,-0.59532 0.26715,-1.24345 1.447972,-7.80139 1.652612,-9.17773 l 0.213941,-1.43815 2.513541,-0.95912 c 1.382439,-0.52732 3.015016,-1.21924 3.627686,-1.53789 1.442208,-0.7501 1.787278,-0.73107 2.948657,0.16226 0.530259,0.40788 2.554252,1.85255 4.4974,3.21014 l 3.533116,2.46807 3.2799,-3.27215 c 1.80401,-1.79968 3.27991,-3.35891 3.27991,-3.46491 0,-0.106 -1.33946,-2.05152 -2.97656,-4.32376 -1.63711,-2.27225 -3.12216,-4.33367 -3.30006,-4.5806 -0.26785,-0.37178 -0.17206,-0.74346 0.55604,-2.16214 0.48359,-0.94227 1.15858,-2.54651 1.50016,-3.56516 0.34157,-1.01864 0.71843,-1.98573 0.83768,-2.14922 0.11925,-0.16349 0.84001,-0.37699 1.60145,-0.47439 1.18359,-0.15143 7.28724,-1.23984 9.12348,-1.62678 0.5903,-0.12442 0.59531,-0.16437 0.59531,-4.84053 v -4.71496 l -1.78594,-0.29249 c -0.98227,-0.16097 -3.33375,-0.54499 -5.22552,-0.85317 -1.89178,-0.30817 -3.65962,-0.64619 -3.92844,-0.75086 -0.31247,-0.12167 -0.75606,-0.9627 -1.23042,-2.33164 -0.40809,-1.17771 -1.10834,-2.83661 -1.55598,-3.6866 -0.74109,-1.4072 -0.77885,-1.59333 -0.42116,-2.08308 0.21606,-0.29582 0.59844,-0.83561 0.85008,-1.19941 0.25164,-0.3638 1.57822,-2.25104 2.94762,-4.19354 l 2.48977,-3.53157 -3.30884,-3.30884 c -3.20998,-3.20997 -3.32908,-3.29856 -3.96565,-2.95072 -0.64496,0.35241 -1.884953,1.23869 -5.963459,4.26175 -1.129249,0.83702 -2.31155,1.5916 -2.62723,1.6769 -0.36565,0.0988 -1.277943,-0.18069 -2.513542,-0.76998 -1.066759,-0.50876 -2.713329,-1.20866 -3.659208,-1.55546 l -1.719791,-0.63045 -0.322461,-1.97352 c -0.17748,-1.08541 -0.600952,-3.58086 -0.940511,-5.5454 l -0.617017,-3.57187 -4.686536,-0.0724 c -1.340926,-0.0207 -2.321895,-0.0485 -3.044258,-0.0336 z m 2.977079,24.95403 c 1.428629,-0.003 2.850263,0.13423 3.752742,0.4129 3.937747,1.21587 6.998843,4.02981 8.561752,7.87032 1.996118,4.90503 0.846776,10.51015 -2.92902,14.28595 -1.737129,1.73712 -4.60482,3.28861 -6.848678,3.70468 h -5.17e-4 c -2.994027,0.55517 -5.476749,0.20617 -8.342126,-1.17202 -3.235967,-1.55644 -5.883529,-4.66933 -6.974768,-8.20002 -0.57672,-1.86612 -0.546118,-5.6998 0.06046,-7.56181 1.394049,-4.27939 4.770717,-7.65133 8.924003,-8.91108 0.931609,-0.28258 2.367522,-0.42587 3.796152,-0.42892 z" /><path
style="fill:#ff0000;stroke:#800000;stroke-width:3.62687px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 63.495772,20.345355 c -39.141809,11.541139 -77.112387,35.07855 -89.310565,87.035135 l 28.4428534,3.41314 -49.4905634,29.01171 -11.945999,-58.023422 15.927997,18.20343 C -28.478443,47.466178 21.473128,26.871234 64.064626,20.345356 Z"
id="path349"
sodipodi:nodetypes="cccccccc" /></g></g></svg>

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View File

@ -0,0 +1,24 @@
package action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import fenetres.create;
public class actOpenHistoriqueEvaluation extends AbstractAction{
{
putValue( Action.NAME, "Charger une évaluation" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/chargehistoriqueevaluationmini.png")) );
putValue( Action.SHORT_DESCRIPTION, "Charger une évaluation" );
}
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
}
}

View File

@ -23,10 +23,10 @@ public class actSave extends AbstractAction{
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Enregister" );
putValue( Action.NAME, "Enregister le fichier d'analyse" );
putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/save.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_S );
putValue( Action.SHORT_DESCRIPTION, "Enregistrer (CTRL+S)" );
putValue( Action.SHORT_DESCRIPTION, "Enregistrer fichier d'analyse de l'évaluation. (CTRL+S)" );
putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_DOWN_MASK ) );
}
@Override

View File

@ -23,10 +23,10 @@ public class actSaveAs extends AbstractAction{
*/
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Enregistrer sous..." );
putValue( Action.NAME, "Enregistrer le fichier d'analyse sous..." );
putValue( Action.SMALL_ICON, new ImageIcon(getClass().getResource("/save_as.png") ));
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_A );
putValue( Action.SHORT_DESCRIPTION, "Enregistrer sous..." );
putValue( Action.SHORT_DESCRIPTION, "Enregistrer le fichier d'analyse de l'évaluation sous..." );
}
@Override
public void actionPerformed(ActionEvent e) {

View File

@ -0,0 +1,124 @@
package action;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileSystemView;
import MEPTL.commandes;
import cXML.node;
import fenetres.create;
public class actSaveHistoriqueEvaluation extends AbstractAction{
{
putValue( Action.NAME, "Sauvegarder l'évaluation" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/sauvegardehistoriqueevaluationmini.png")) );
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_O );
putValue( Action.SHORT_DESCRIPTION, "Sauvegarder l'évaluation" );
}
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
if(commandes.fichierAnalyseValide) {
String name = JOptionPane.showInputDialog(null,"Donner un nom à cette évaluation ?","Nom de l'évaluation");
if(!name.isBlank()) {
node evaluations = nodeEvaluations();
if(!isEvaluationExist(evaluations, name)) {
sauvegardeEvaluation(new node(), name);
}else {
sauvegardeEvaluation(evaluations.retourneFirstNodeByNameAndAttributValueExactStrict("evaluation", "name", name), name);
}
}
}
}
private boolean isEvaluationExist(node evaluations, String nameEvaluation) {
if(evaluations.retourneFirstNodeByNameAndAttributValueExactStrict("evaluation", "name", nameEvaluation)!=null) return true;
return false;
}
@SuppressWarnings("unused")
private node nodeEvaluations() {
node evaluations = null;
File directory = new File(FileSystemView.getFileSystemView().getDefaultDirectory().getPath());
if (directory.exists()){
File file = null;
if(commandes.os.contains("Win")) {
file = new File(directory.getAbsolutePath() + "\\" + "evaluations.xml");
}else {
file = new File(directory.getAbsolutePath() + "/" + "evaluations.xml");
}
if(file!=null) {
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);
}
evaluations = new node(targetString.toString());
}catch (Exception e) {
// TODO: handle exception
}
}else {
evaluations = new node();
evaluations.setNomElt("evaluations");
}
}
return evaluations;
}
private void sauvegardeEvaluation(node evaluation, String name) {
evaluation.setNomElt("evaluation");
evaluation.getAttributs().put("name", name);
evaluation.getAttributs().put("PathFilenameAnalysis", commandes.PathFilenameAnalysis);
evaluation.getAttributs().put("path", commandes.path );
evaluation.getAttributs().put("fichierStudentMoodle", String.valueOf(commandes.fichierStudentMoodle) );
evaluation.getAttributs().put("sansFeeback", String.valueOf(commandes.sansFeeback) );
evaluation.getAttributs().put("noDetail", String.valueOf(commandes.noDetail) );
evaluation.getAttributs().put("noNote", String.valueOf(commandes.noNote) );
evaluation.getAttributs().put("zipfeedback", String.valueOf(commandes.zipfeedback) );
evaluation.getAttributs().put("verifHisto2", String.valueOf(commandes.verifHisto2) );
evaluation.getAttributs().put("ecritNoteCSV", String.valueOf(commandes.ecritNoteCSV) );
evaluation.getAttributs().put("newLogo", String.valueOf(commandes.newLogo) );
evaluation.getAttributs().put("noLogo", String.valueOf(commandes.noLogo) );
evaluation.getAttributs().put("fourniCSV", String.valueOf(commandes.fourniCSV) );
evaluation.getAttributs().put("nameCSV", commandes.nameCSV );
evaluation.getAttributs().put("fourniCSV", String.valueOf(commandes.fourniCSV) );
evaluation.getAttributs().put("nameSVG", commandes.nameSVG );
evaluation.getNodes().add(commandes.sujet);
evaluation.getNodes().add(commandes.nodeCSV);
if(!commandes.nameSVG.isBlank() && !commandes.contenuFichierSVG.isBlank()) {
node SVG = new node();
SVG.setNomElt("nodSVG");
SVG.setContenu(commandes.contenuFichierSVG);
evaluation.getNodes().add(SVG);
}
}
}

View File

@ -254,6 +254,9 @@ public final class create extends JFrame {
/*JMenuItem mnuNewFile =*/
mnuFile.add( new actOpen() );
mnuFile.add( new actNewFichierAnalyse() );
// mnuFile.addSeparator();
// mnuFile.add( new actSaveHistoriqueEvaluation() );
// mnuFile.add( new actOpenHistoriqueEvaluation() );
mnuFile.addSeparator();
mnuFile.add( new actSave() );
mnuFile.add( new actSaveAs() );
@ -341,6 +344,18 @@ public final class create extends JFrame {
toolBarPrincipal.setName("outils principaux");
// JButton btnChargeEvaluation = toolBarPrincipal.add( new actOpenHistoriqueEvaluation() );
// btnChargeEvaluation.setIcon(new ImageIcon(create.class.getResource("/resources/chargehistoriqueevaluation.png")));
// btnChargeEvaluation.setHideActionText(true);
// toolBarPrincipal.add(btnChargeEvaluation);
//
// JButton btnSaveEvluation = toolBarPrincipal.add( new actSaveHistoriqueEvaluation() );
// btnSaveEvluation.setIcon(new ImageIcon(create.class.getResource("/resources/sauvegardehistoriqueevaluation.png")));
// btnSaveEvluation.setHideActionText(true);
// toolBarPrincipal.add(btnSaveEvluation);
//
// toolBarPrincipal.addSeparator();
JButton buttonLoadFile = toolBarPrincipal.add( new actOpen() );
buttonLoadFile.setIcon(new ImageIcon(create.class.getResource("/resources/fichierAnalyse.png")));
buttonLoadFile.setHideActionText(true);

View File

@ -40,6 +40,8 @@ import MEPTL.meptl;
import action.actAbout;
import action.actDocumentation;
import action.actLicence;
import action.actOpenHistoriqueEvaluation;
import action.actSaveHistoriqueEvaluation;
import action.actTutoriels;
import cXML.Run;
import cXML.node;
@ -294,23 +296,29 @@ public class evaluate extends JFrame {
lblFichierSVG = new JLabel("<HTML><B><U>Fichier SVG</U></B> :</HTML>");
lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
panelWest.add(lblFichierSVG, "cell 1 11,growx");
JLabel lblNewLogo = new JLabel("");
lblNewLogo.setIcon(new ImageIcon(evaluate.class.getResource("/resources/newlogo.png")));
panelWest.add(lblNewLogo, "cell 0 12");
chckbxNewLogo = new JCheckBox("Nouveau logo");
chckbxNewLogo.setSelected(commandes.newLogo);
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 1 12");
chckbxNewLogo.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
if(chckbxNewLogo.isSelected()) {
lblNewLogo.setIcon(new ImageIcon(evaluate.class.getResource("/resources/newlogo.png")));
chckbxNoLogo.setSelected(true);
commandes.newLogo=true;
}else {
lblNewLogo.setIcon(new ImageIcon(evaluate.class.getResource("/resources/nonewlogo.png")));
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 1 12");
chckbxNewLogo.setSelected(commandes.newLogo);
chckbxNoLogo = new JCheckBox("Pas de logo");
@ -424,6 +432,9 @@ public class evaluate extends JFrame {
JMenu mnNewMenu = new JMenu("Fichier");
mnNewMenu.setMnemonic( 'F' );
menuBar.add(mnNewMenu);
mnNewMenu.add( new actSaveHistoriqueEvaluation() );
mnNewMenu.add( new actOpenHistoriqueEvaluation() );
mnNewMenu.addSeparator();
mnNewMenu.add( actSave );
mnNewMenu.add( actSaveas );
mnNewMenu.addSeparator();
@ -473,6 +484,20 @@ public class evaluate extends JFrame {
private void createToolBar() {
toolBar = new JToolBar();
JButton btnChargeEvaluation = toolBar.add( new actOpenHistoriqueEvaluation() );
btnChargeEvaluation.setIcon(new ImageIcon(create.class.getResource("/resources/chargehistoriqueevaluation.png")));
btnChargeEvaluation.setHideActionText(true);
toolBar.add(btnChargeEvaluation);
JButton btnSaveEvluation = toolBar.add( new actSaveHistoriqueEvaluation() );
btnSaveEvluation.setIcon(new ImageIcon(create.class.getResource("/resources/sauvegardehistoriqueevaluation.png")));
btnSaveEvluation.setHideActionText(true);
toolBar.add(btnSaveEvluation);
toolBar.addSeparator();
JButton btnSelectFileAnalyse = toolBar.add( actOpen );
btnSelectFileAnalyse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -666,8 +691,10 @@ public class evaluate extends JFrame {
@Override
public void actionPerformed(ActionEvent e) {
Thread t2 = new Thread(new evaluerLesFichiersEtudiants(txtpnmessages));
t2.start();
if(commandes.fichierAnalyseValide) {
Thread t2 = new Thread(new evaluerLesFichiersEtudiants(txtpnmessages));
t2.start();
}
}
};
@ -766,8 +793,6 @@ public class evaluate extends JFrame {
chooser.setAcceptAllFileFilterUsed(false);
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
commandes.path = chooser.getSelectedFile().getAbsolutePath();
} else {
System.out.println("No Selection ");

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/resources/newlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

BIN
src/resources/nonewlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B