MAJ (travaux sur l'importation et l'affichage de la liste des étudiants)
24
Menu/sousmenuEvaluation/mnAnalyseSpan.java
Normal file
@ -0,0 +1,24 @@
|
||||
package sousmenuEvaluation;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JMenu;
|
||||
|
||||
import action.actEvaluerStyleFalse;
|
||||
import action.actEvaluerStyleTrue;
|
||||
import fenetres.create;
|
||||
|
||||
/**
|
||||
* Menu analyseStyle.</br>
|
||||
* @author pabr6
|
||||
*
|
||||
*/
|
||||
public class mnAnalyseSpan{
|
||||
|
||||
public static JMenu menu() {
|
||||
JMenu mnAnalyseStyle = new JMenu("Evaluer le formatage direct");
|
||||
mnAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerspanmini.png")));
|
||||
mnAnalyseStyle.add(new actEvaluerStyleTrue());
|
||||
mnAnalyseStyle.add( new actEvaluerStyleFalse());
|
||||
return mnAnalyseStyle;
|
||||
}
|
||||
}
|
BIN
analyseWriter.exe - Raccourci.lnk
Normal file
3
bin/.gitignore
vendored
@ -483,3 +483,6 @@
|
||||
/zipstudent.png
|
||||
/zipstudent.svg
|
||||
/zipstudentmini.png
|
||||
/evaluerspan.png
|
||||
/evaluerspan.svg
|
||||
/evaluerspanmini.png
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.2 KiB |
26
gestion_inscriptions_groupes_etudiants_V1.0.6.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<launch4jConfig>
|
||||
<dontWrapJar>false</dontWrapJar>
|
||||
<headerType>gui</headerType>
|
||||
<jar>C:\Users\pabr6\Downloads\gestion inscriptions - groupes étudiants\Gestion_des_inscriptions_groupes_etudiants_V1.0.6.jar</jar>
|
||||
<outfile>C:\Users\pabr6\Downloads\gestion inscriptions - groupes étudiants\Gestion_des_inscriptions_groupes_etudiants_V1.0.6.exe</outfile>
|
||||
<errTitle></errTitle>
|
||||
<cmdLine></cmdLine>
|
||||
<chdir>.</chdir>
|
||||
<priority>normal</priority>
|
||||
<downloadUrl>http://java.com/download</downloadUrl>
|
||||
<supportUrl></supportUrl>
|
||||
<stayAlive>false</stayAlive>
|
||||
<restartOnCrash>false</restartOnCrash>
|
||||
<manifest></manifest>
|
||||
<icon>C:\Users\pabr6\eclipse-workspace\baseStudentUFRHG resources\logo.ico</icon>
|
||||
<jre>
|
||||
<path></path>
|
||||
<bundledJre64Bit>false</bundledJre64Bit>
|
||||
<bundledJreAsFallback>false</bundledJreAsFallback>
|
||||
<minVersion>1.8</minVersion>
|
||||
<maxVersion></maxVersion>
|
||||
<jdkPreference>preferJre</jdkPreference>
|
||||
<runtimeBits>64/32</runtimeBits>
|
||||
</jre>
|
||||
</launch4jConfig>
|
BIN
icons/evaluerspan.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
164
icons/evaluerspan.svg
Normal file
@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
inkscape:export-ydpi="51.200001"
|
||||
inkscape:export-xdpi="51.200001"
|
||||
inkscape:export-filename="evaluerspanmini.png"
|
||||
sodipodi:docname="evaluerspan.svg"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 11.90625 11.90625"
|
||||
height="45"
|
||||
width="45"
|
||||
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"
|
||||
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">
|
||||
<pattern
|
||||
id="EMFhbasepattern"
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="6"
|
||||
height="6"
|
||||
x="0"
|
||||
y="0" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-height="1009"
|
||||
inkscape:window-width="1920"
|
||||
units="px"
|
||||
inkscape:guide-bbox="true"
|
||||
showguides="true"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="32.065537"
|
||||
inkscape:cx="16.479897"
|
||||
inkscape:zoom="7.8277187"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:deskcolor="#d1d1d1">
|
||||
<sodipodi:guide
|
||||
id="guide25"
|
||||
orientation="0,-1"
|
||||
position="94.049365,180.07197"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="8.9572181,11.534441"
|
||||
orientation="0,-1"
|
||||
id="guide4043"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="5.8813432,7.9515537"
|
||||
orientation="0,-1"
|
||||
id="guide4083"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="6.0841481,3.0166336"
|
||||
orientation="1,0"
|
||||
id="guide4279"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="1.7238419,9.7429973"
|
||||
orientation="1,0"
|
||||
id="guide1"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="1.7238419,9.7429973"
|
||||
orientation="0,-1"
|
||||
id="guide2"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="10.174048,9.7429973"
|
||||
orientation="1,0"
|
||||
id="guide3"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="1.7238419,6.6747483"
|
||||
orientation="0,-1"
|
||||
id="guide4"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Calque 1">
|
||||
<path
|
||||
style="fill:#aaffcc;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 2.9068707,0.371809 H 8.9572181 L 11.390877,3.9546963 6.0841481,9.9374418 0.54081313,3.9546963 Z"
|
||||
id="path3908"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.61631px;line-height:1.25;font-family:Algerian;-inkscape-font-specification:Algerian;text-align:center;text-anchor:middle;fill:#28220b;stroke-width:0.240409"
|
||||
x="6.2003522"
|
||||
y="7.1059141"
|
||||
id="text2541"
|
||||
transform="scale(0.98648787,1.0136972)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2539"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Algerian;-inkscape-font-specification:Algerian;fill:#28220b;stroke-width:0.240409"
|
||||
x="6.2003522"
|
||||
y="7.1059141">T</tspan></text>
|
||||
<g
|
||||
id="g923"
|
||||
transform="matrix(1.0352696,0,0,1.0658949,-0.43470013,7.1496941)"
|
||||
style="stroke-width:0.772273">
|
||||
<rect
|
||||
style="fill:#00bf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.0501977;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="rect10"
|
||||
width="3.8382711"
|
||||
height="3.7594025"
|
||||
x="0.92013353"
|
||||
y="0.34176376"
|
||||
ry="0.56339979"
|
||||
rx="0.5800662" />
|
||||
<path
|
||||
style="fill:#ffffff;stroke:none;stroke-width:0.20433px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 1.4619106,1.7500935 C 1.3627577,2.4034195 1.7869697,2.7038331 2.3820759,3.4752278 2.7236407,3.2105071 3.8437643,1.6082077 4.3539528,0.68451321 3.7444013,1.2569625 3.3467309,1.6796751 2.3752981,2.7432214 1.891109,2.378332 1.7782083,2.0571129 1.4619106,1.7500935 Z"
|
||||
id="path16"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#28220b;stroke:#28220b;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:bevel"
|
||||
d="M 1.7238419,2.1632526 V 5.2315017"
|
||||
id="path4" />
|
||||
<path
|
||||
style="fill:#28220b;stroke:#28220b;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:bevel"
|
||||
d="M 10.174048,2.1632527 V 5.2315018"
|
||||
id="path5" />
|
||||
<path
|
||||
style="fill:#28220b;stroke:#28220b;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:bevel"
|
||||
d="m 1.7238419,3.9546963 4.360306,5.9827453"
|
||||
id="path6" />
|
||||
<path
|
||||
style="fill:#28220b;stroke:#28220b;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:bevel"
|
||||
d="M 10.174048,3.9546963 6.0841479,9.9374416"
|
||||
id="path7" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.7 KiB |
BIN
icons/evaluerspanmini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
icons/voirtouteslescolonnes.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
@ -28,6 +28,7 @@ import cXML.node;
|
||||
import calcul.formatDateWriter;
|
||||
import evaluer.analyseFichier;
|
||||
import evaluer.evaluation;
|
||||
import fenetres.evaluate;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
|
||||
|
||||
@ -1372,7 +1373,7 @@ public class meptl {
|
||||
//** Chargement et verification du CVS fourni **
|
||||
//**********************************************
|
||||
if(commandes.fourniCSV) {
|
||||
commandes.nodeCSV = chargementFichierCSV();
|
||||
// commandes.nodeCSV = chargementFichierCSV();
|
||||
}
|
||||
|
||||
|
||||
@ -2242,15 +2243,15 @@ public class meptl {
|
||||
|
||||
/**
|
||||
* Chargement dans un node du fichier CSV de la liste des étudiants.<br>
|
||||
* La liste des étudiants doit contenir les champs Prénom, Nom, Numéro d'identification, Adresse de courriel
|
||||
* La liste des étudiants doit contenir les champs Prénom, Nom, identification, adresse
|
||||
* Le séparateur doit être le point-virgule et l'encodage UTF-8.
|
||||
* @param a
|
||||
* @param nameCSV
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static node chargementFichierCSV() {
|
||||
node nodeCVS = null;
|
||||
public static void chargementFichierCSV() {
|
||||
|
||||
String targetString = "";
|
||||
|
||||
String cheminVersLeFichierCSV = "";
|
||||
@ -2276,27 +2277,93 @@ public class meptl {
|
||||
} catch (IOException e) {
|
||||
commandes.ErrorFile(cheminVersLeFichierCSV);
|
||||
e.printStackTrace();
|
||||
return nodeCVS;
|
||||
// return nodeCVS;
|
||||
}
|
||||
|
||||
|
||||
String[] target = targetString.split("\\n");
|
||||
nodeCVS = new node();
|
||||
nodeCVS.setNomElt("fileCSV");
|
||||
// node nodeCVS = new node();
|
||||
// nodeCVS.setNomElt("fileCSV");
|
||||
node csv = commandes.sujet.retourneFirstEnfantsByName("csv");
|
||||
String separator = csv.getAttributs().get("separator");
|
||||
node import_csv = csv.retourneFirstEnfantsByName("import_moodle");
|
||||
String nameid = import_csv.getAttributs().get("id");
|
||||
String nameemail = import_csv.getAttributs().get("email");
|
||||
|
||||
String[] line1 = target[0].split(";");
|
||||
for(int i = 1 ; i < target.length ; i++) {
|
||||
node nodeEtudiant = new node();
|
||||
nodeEtudiant.setNomElt("student");
|
||||
for(int j = 0 ; j < line1.length; j++) {
|
||||
nodeEtudiant.getAttributs().put(line1[j], target[i].split(";")[j]);
|
||||
nodeEtudiant.getAttributs().put(line1[j], target[i].split(separator)[j]);
|
||||
}
|
||||
if(nodeEtudiant.getAttributs().get(nameemail)!=null
|
||||
&& nodeEtudiant.getAttributs().get(nameid)!=null
|
||||
&& nodeEtudiant.getNbrAttributs()==4) {
|
||||
|
||||
node n1 = commandes.nodeCSV.retourneFirstNodeByNameAndAttributValueExactStrict("student", nameid, nodeEtudiant.getAttributs().get(nameid));
|
||||
node n2 = commandes.nodeCSV.retourneFirstNodeByNameAndAttributValueExactStrict("student", nameemail, nodeEtudiant.getAttributs().get(nameemail));
|
||||
|
||||
if(n1==null && n2==null) commandes.nodeCSV.getNodes().add(nodeEtudiant);
|
||||
}
|
||||
nodeCVS.getNodes().add(nodeEtudiant);
|
||||
}
|
||||
|
||||
//a.ecritureNodeEnXML(nodeCVS, "nodeCVS"); //écriture du node du node CSV
|
||||
//a.ecritureNodeEnXML(nodeCVS, "nodeCVS"); //écriture du node du node CSV;
|
||||
// return nodeCVS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Supprime le node du fichier CSV de la liste des étudiants.<br>
|
||||
* @param a
|
||||
* @param nameCSV
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static node supprimeFichierCSV() {
|
||||
node nodeCVS = new node("fileCSV");
|
||||
commandes.nameCSV="";
|
||||
return nodeCVS;
|
||||
}
|
||||
|
||||
|
||||
public static StringBuilder afficheNodeCSV() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if(commandes.fourniCSV) {
|
||||
// String texte = Run.ecritureNode(commandes.nodeCSV, 0).toString();
|
||||
|
||||
node import_csv = commandes.sujet.retourneFirstEnfantsByName("csv").retourneFirstEnfantsByName("import_moodle");
|
||||
String nameid = import_csv.getAttributs().get("id");
|
||||
String nameemail = import_csv.getAttributs().get("email");
|
||||
String name = import_csv.getAttributs().get("name");
|
||||
String firstname = import_csv.getAttributs().get("firstname");
|
||||
|
||||
|
||||
sb.append("<html>");
|
||||
sb.append("<table>");
|
||||
sb.append("<tr>");
|
||||
sb.append("<th>Prénom</th>");
|
||||
sb.append("<th>Nom</th>");
|
||||
sb.append("<th>Numéro étudiant</th>");
|
||||
sb.append("<th>Courriel</th>");
|
||||
sb.append("</tr>");
|
||||
for(int i = 0 ; i < commandes.nodeCSV.getNbrEnfants();i++) {
|
||||
sb.append("<tr><td>" + commandes.nodeCSV.getNodes().get(i).getAttributs().get(firstname)
|
||||
+ "</td><td>" + commandes.nodeCSV.getNodes().get(i).getAttributs().get(name)
|
||||
+ "</td><td>" + commandes.nodeCSV.getNodes().get(i).getAttributs().get(nameid)
|
||||
+ "</td><td>" + commandes.nodeCSV.getNodes().get(i).getAttributs().get(nameemail)
|
||||
+"</td></tr>");
|
||||
}
|
||||
sb.append("</table>");
|
||||
sb.append("<br>");
|
||||
sb.append("<p><b>Nombre d'étudiant dans la liste : " + commandes.nodeCSV.getNbrEnfants() + "</b></p>");
|
||||
sb.append("</html>");
|
||||
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Charge le fichier SVG pour le nouveau Logo dans les feedbacks
|
||||
* @param a
|
||||
|
@ -27,7 +27,8 @@ public class baliseStyle {
|
||||
+ "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%}"
|
||||
+ ".tabulation { display: inline-block; margin-left: 40px;} "
|
||||
+ ".tabulation { display: inline-block; margin-left: 40px;}"
|
||||
+ "table, th, td { border:1px solid black;}"
|
||||
+ "</style>";
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class evaluate extends JFrame {
|
||||
private JPanel contentPane;
|
||||
private static JLabel lblPath;
|
||||
private static JLabel lblFileAnalyse;
|
||||
private static JLabel lblFichierCSV;
|
||||
// private static JLabel lblFichierCSV;
|
||||
private static JLabel lblFichierSVG;
|
||||
private static JLabel lblChargementFichierCSV;
|
||||
private static JLabel lblImageDossierEtudiant;
|
||||
@ -309,12 +309,12 @@ public class evaluate extends JFrame {
|
||||
|
||||
|
||||
|
||||
lblChargementFichierCSV = new JLabel("Chargement de la liste des étudiants");
|
||||
lblChargementFichierCSV = new JLabel("Pas de liste des étudiants");
|
||||
panelBoutons.add(lblChargementFichierCSV, "cell 1 7,alignx left,aligny center");
|
||||
|
||||
lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||
lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelBoutons.add(lblFichierCSV, "cell 1 8,grow");
|
||||
// lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||
// lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
// panelBoutons.add(lblFichierCSV, "cell 1 8,grow");
|
||||
lblCsvNote = new JLabel("");
|
||||
lblCsvNote.setIcon(new ImageIcon(evaluate.class.getResource("/resources/nocsvstudent.png")));
|
||||
panelBoutons.add(lblCsvNote, "cell 0 9");
|
||||
@ -401,11 +401,12 @@ public class evaluate extends JFrame {
|
||||
|
||||
if(commandes.fourniCSV) {
|
||||
lblChargementFichierCSV.setBackground(new Color(40,180,40));
|
||||
lblChargementFichierCSV.setText("Liste des étudiants");
|
||||
lblChargementFichierCSV.setOpaque(true);
|
||||
lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B> : " + commandes.nameCSV + "</HTML>");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B> : " + commandes.nameCSV + "</HTML>");
|
||||
}else {
|
||||
lblChargementFichierCSV.setOpaque(false);
|
||||
lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
}
|
||||
|
||||
|
||||
@ -608,6 +609,14 @@ public class evaluate extends JFrame {
|
||||
btnFichierCSV.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSV.png")));
|
||||
toolBar.add(btnFichierCSV);
|
||||
|
||||
JButton btnFichierCSV_delete = toolBar.add(actDeleteListeEtudiantCSV);
|
||||
btnFichierCSV_delete.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
}
|
||||
});
|
||||
btnFichierCSV_delete.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierCSV_delete.png")));
|
||||
btnFichierCSV_delete.setHideActionText(true);
|
||||
|
||||
JButton btnInfoListeEtudiant = toolBar.add(actAfficheListeEtudiant);
|
||||
btnInfoListeEtudiant.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -721,10 +730,11 @@ public class evaluate extends JFrame {
|
||||
|
||||
if(commandes.fourniCSV) {
|
||||
lblChargementFichierCSV.setBackground(new Color(40,180,40));
|
||||
lblChargementFichierCSV.setText("Liste des étudiants");
|
||||
lblChargementFichierCSV.setOpaque(true);
|
||||
}else {
|
||||
lblChargementFichierCSV.setOpaque(false);
|
||||
lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
}
|
||||
|
||||
|
||||
@ -744,7 +754,7 @@ public class evaluate extends JFrame {
|
||||
if(commandes.path!=null) lblPath.setText("<html><p>Dossier de l'analyse :<br><b> " + nameDossierAnalyse + "</b></p><hr></html>");
|
||||
if(commandes.analysis_filename!=null) lblFileAnalyse.setText("<html>Fichier de l'analyse :<br><b> " + nameFichierAnalyse + "</b></html>");
|
||||
if(commandes.nameSVG!=null) lblFichierSVG.setText("<html><b><u>Fichier SVG</u></b> :<br>" + commandes.nameSVG.substring(commandes.nameSVG.lastIndexOf("\\")+1,commandes.nameSVG.length()) + "</html>");
|
||||
if(commandes.nameCSV!=null) lblFichierCSV.setText("<html><b><u>Fichier CSV</u></b> :<br>" + commandes.nameCSV + "</html>");
|
||||
// if(commandes.nameCSV!=null) lblFichierCSV.setText("<html><b><u>Fichier CSV</u></b> :<br>" + commandes.nameCSV + "</html>");
|
||||
|
||||
}
|
||||
|
||||
@ -1220,51 +1230,87 @@ private AbstractAction actOpen = new AbstractAction() {
|
||||
System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
|
||||
System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath());
|
||||
commandes.nameCSV = chooser.getSelectedFile().getAbsolutePath();
|
||||
commandes.nodeCSV = meptl.chargementFichierCSV();
|
||||
commandes.fourniCSV=true;
|
||||
txtpnmessages.setContentType("text/plain");
|
||||
|
||||
if(!commandes.nodeCSV.getNomElt().equals("fileCSV")) {
|
||||
commandes.fourniCSV=false;
|
||||
txtpnmessages.setText("<HTML><H1>*** Ce n'est pas un fichier format CSV contenant la liste des étudiants. ***</H1></HTML>");
|
||||
commandes.nodeCSV = null;
|
||||
int nbrStudent = 0;
|
||||
if(commandes.nodeCSV==null) {
|
||||
commandes.nodeCSV = new node("fileCSV");
|
||||
}else {
|
||||
if(commandes.nodeCSV.getNomElt()==null) commandes.nodeCSV.setNomElt("fileCSV");
|
||||
nbrStudent = commandes.nodeCSV.getNbrEnfants();
|
||||
}
|
||||
|
||||
if(commandes.nodeCSV.getNodes().size()<=0) {
|
||||
commandes.fourniCSV=false;
|
||||
txtpnmessages.setText("<HTML><H1>*** Le fichier ne contient pas d'étudiant ***</H1></HTML>");
|
||||
commandes.nodeCSV = null;
|
||||
}
|
||||
meptl.chargementFichierCSV();
|
||||
|
||||
if(commandes.nodeCSV.getNbrEnfants()>=1) {
|
||||
commandes.fourniCSV=true;
|
||||
}
|
||||
|
||||
|
||||
if(commandes.nodeCSV.getNbrEnfants()==nbrStudent) {
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText("<html><h1>*** Aucun étudiant a été ajouté à la liste ***</h1></html>");
|
||||
}else {
|
||||
if(commandes.fourniCSV) {
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText(baliseStyle.balise() + meptl.afficheNodeCSV().toString());
|
||||
System.out.println( "Affiche la liste des étudiants déjà en mémoire." );
|
||||
}else {
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText("<html><h1>*** Veuillez sélectionner un fichier CSV contenant la liste des étudiants. ***</h1></html>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
txtpnmessages.setText(Run.ecritureNode(commandes.nodeCSV, 0).toString());
|
||||
System.out.println( "Charge la liste des étudiants." );
|
||||
|
||||
|
||||
} else {
|
||||
// commandes.nameCSV = "";
|
||||
// commandes.fourniCSV=false;
|
||||
// System.out.println("No Selection ");
|
||||
// commandes.nodeCSV = new node();
|
||||
// refreshLabel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(commandes.fourniCSV) {
|
||||
lblChargementFichierCSV.setBackground(new Color(40,180,40));
|
||||
lblChargementFichierCSV.setText("Liste des étudiants");
|
||||
lblChargementFichierCSV.setOpaque(true);
|
||||
lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B> : " + commandes.nameCSV + "</HTML>");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B> : " + commandes.nameCSV + "</HTML>");
|
||||
}else {
|
||||
lblChargementFichierCSV.setOpaque(false);
|
||||
lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
lblChargementFichierCSV.setText("Pas de liste des étudiants");
|
||||
// lblFichierCSV.setText("<HTML><B><U>Fichier CSV</U></B></HTML>");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Supprime la liste des étudiants sous la forme d'un fichier XML.
|
||||
*/
|
||||
private AbstractAction actDeleteListeEtudiantCSV = new AbstractAction() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
putValue( Action.NAME, "Supprime la liste des étudiants" );
|
||||
putValue( Action.LARGE_ICON_KEY, new ImageIcon(evaluate.class.getResource("/resources/fichierCSV_delete.png")) );
|
||||
putValue( Action.MNEMONIC_KEY, KeyEvent.VK_L );
|
||||
putValue( Action.SHORT_DESCRIPTION, "Supprime la liste des étudiants" );
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
|
||||
if(JOptionPane.showConfirmDialog(null,"Voulez-vous supprimer la liste des étudiant ?", "Supprimer", JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE)==JOptionPane.YES_OPTION) {
|
||||
commandes.nodeCSV = meptl.supprimeFichierCSV();
|
||||
commandes.fourniCSV=false;
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText("<html><h1>***Suppression de la liste des étudiants ***</h1></html>");
|
||||
System.out.println( "Suppression de la liste des étudiants." );
|
||||
lblChargementFichierCSV.setOpaque(false);
|
||||
lblChargementFichierCSV.setText("Pas de liste des étudiants");
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Affiche le code XMl du fichier d'analyse
|
||||
*/
|
||||
private AbstractAction actAfficheListeEtudiant = new AbstractAction() {
|
||||
@ -1281,13 +1327,13 @@ private AbstractAction actOpen = new AbstractAction() {
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
txtpnmessages.setContentType("text/plain");
|
||||
if(commandes.fourniCSV) {
|
||||
String texte = Run.ecritureNode(commandes.nodeCSV, 0).toString();
|
||||
txtpnmessages.setText(texte);
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText(baliseStyle.balise() + meptl.afficheNodeCSV().toString());
|
||||
System.out.println( "Affiche la liste des étudiants déjà en mémoire." );
|
||||
}else {
|
||||
txtpnmessages.setText("*** Veuillez sélectionner un fichier CSV contenant la liste des étudiants. ***");
|
||||
txtpnmessages.setContentType("text/html");
|
||||
txtpnmessages.setText("<html><h1>*** Veuillez sélectionner un fichier CSV contenant la liste des étudiants. ***</h1></html>");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
16
src/list/listeDesNodesAnalyseSpan.java
Normal file
@ -0,0 +1,16 @@
|
||||
package list;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
public class listeDesNodesAnalyseSpan {
|
||||
|
||||
/**
|
||||
* Retourne TRUE si on peut utiliser la procédure analyseStyle.</br>
|
||||
* @param nod
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isAnalyseSpan(node nod) {
|
||||
if(nod.getNomElt().equals("text:span")) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
BIN
src/resources/evaluerspan.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
src/resources/evaluerspanmini.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
src/resources/fichierCSV_delete.png
Normal file
After Width: | Height: | Size: 3.0 KiB |