MAJ V1.0.1 (JRE 1.8 with JDK 1.8.0_271)

This commit is contained in:
pablo rodriguez 2023-07-02 16:18:01 +02:00
parent 15a9a1b2b0
commit 60034013c0
7 changed files with 388 additions and 27 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,324 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="128"
inkscape:export-xdpi="128"
inkscape:export-filename="accueil.png"
sodipodi:docname="accueil.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
id="svg8"
version="1.1"
viewBox="0 0 174.66718 10.000005"
height="37.795296"
width="660.15942"
xml:space="preserve"
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
inkscape:collect="always"
id="linearGradient1932"><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop1928" /><stop
style="stop-color:#ed60c9;stop-opacity:1;"
offset="0.71511286"
id="stop2786" /><stop
style="stop-color:#db9d60;stop-opacity:1;"
offset="1"
id="stop1930" /></linearGradient><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><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1932"
id="radialGradient1934"
cx="75.284492"
cy="52.004837"
fx="75.284492"
fy="52.004837"
r="37.683716"
gradientTransform="matrix(1.4493524,0,0,0.13268325,-32.195302,47.700862)"
gradientUnits="userSpaceOnUse" /></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="true"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="61.201468"
inkscape:cx="144.09683"
inkscape:zoom="2.8348993"
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"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1"><sodipodi:guide
id="guide1680"
orientation="0,-1"
position="46.02753,-1.0460123"
inkscape:locked="false" /><sodipodi:guide
position="19.132263,6.5267754"
orientation="0,-1"
id="guide946"
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
transform="translate(-22.301472,-49.601023)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"><g
id="g854"
transform="matrix(0.46962342,0,0,0.46954938,34.68549,31.42631)"
style="stroke-width:1.56539"><g
id="g919"
transform="matrix(2.0256057,0,0,2.085527,3.858094,-3.9539377)"
style="stroke:#000000;stroke-width:1.20891;stroke-opacity:1"><rect
ry="0.56339979"
y="4.3255968"
x="0.92013353"
height="3.7594025"
width="3.8382711"
id="rect12"
style="fill:#de0000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.078579;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
rx="0.5800662" /><path
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.683033;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 1.6159,5.0384659 3.9724208,7.4062084"
id="path841" /><path
id="path843"
d="M 3.9724208,5.0384659 1.6159,7.4062084"
style="fill:none;stroke:#ffffff;stroke-width:0.683033;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g
id="g923"
transform="matrix(1.9487365,0,0,2.0063839,-0.66234441,-0.08147761)"
style="stroke-width:1.20891"><rect
style="fill:#00bf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.078579;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.319856px;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></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" /><text
xml:space="preserve"
style="font-size:7.1582px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.278467"
x="21.843348"
y="56.329731"
id="text835"><tspan
sodipodi:role="line"
id="tspan833"
x="21.843348"
y="56.329731"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.1582px;font-family:Pacifico;-inkscape-font-specification:Pacifico;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.278467">Gestion des inscriptions, des groupes, feuilles d'émargement</tspan></text><g
transform="matrix(0.1376497,0,0,0.15959018,15.807283,23.767637)"
id="g884"
style="stroke-width:1.89623;stroke-miterlimit:4;stroke-dasharray:none"><rect
style="fill:#00ff00;fill-rule:evenodd;stroke:#000000;stroke-width:1.89623;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect880"
width="38.433739"
height="35.890331"
x="37.868542"
y="83.64991"
ry="2.5985754"
rx="2.5985754" /><path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:7.58474;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 71.512572,88.41099 60.11298,113.78783 43.185151,105.76978 55.59032,107.11953 Z"
id="path882"
sodipodi:nodetypes="ccccc" /></g><g
id="g707"
transform="matrix(-1.3014879,0,0,1.3013395,90.568179,-27.473987)"
style="stroke-width:0.768395"><path
style="fill:#ffaaaa;stroke:#ffaaaa;stroke-width:0.145387px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 32.868516,47.600605 -0.366612,-0.401844 c -0.130653,-0.0014 -0.244136,-0.02956 -0.445709,0.07959 -0.223557,0.171563 -0.330967,0.316158 -0.426213,0.457928 -0.08585,0.16678 -0.06788,0.284727 -0.04862,0.402065 l 0.389419,0.37004 z"
id="path1605"
sodipodi:nodetypes="ccccccc" /><path
id="path903"
d="m 33.069673,47.791562 0.480667,-0.318663 c 0.418787,0.621828 0.209483,0.808821 1.279672,1.881624"
style="fill:none;stroke:#686868;stroke-width:0.27145;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.35985;stroke-miterlimit:4;stroke-dasharray:none"
transform="matrix(0.05389082,-0.02832206,0.02707528,0.05589484,22.682222,45.978325)"><path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.35985;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.35985;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.35985;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.35985;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
id="g489"
transform="matrix(0.08348366,0,0,0.08348366,79.288682,57.922646)"
style="stroke-width:3.16928"><path
d="m -741.71893,-92.768085 c 0,0 -11.32,-2.98625 -17.8125,14.655 -4.485,10.1175 -3.72125,9.35625 -6.325,14.7975 -2.795,5.84125 -5.46125,7.92125 -4.66,7.5125 0,0 9.78,1.7025 17.89625,-14.74 4.4775,-9.0725 5.87125,-20.2225 11.26125,-22.2375"
style="fill:#193476;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16928"
id="path2574" /><path
d="m -772.37643,-52.971835 c 0.57875,-0.62125 0.89875,-1.0375 0.89875,-1.0375 -7.335,3.9025 -8.60125,1.665 -9.195,-1.065 -0.58875,-2.73 3.30375,-12.87625 6.23625,-22.4325 2.9325,-9.5625 -0.9025,-12.87625 -3.4775,-12.49 -2.57875,0.3925 -7.3,1.5625 -7.3,1.5625 0,0 1.58875,-0.195 2.82125,3.1225 0.97,2.60625 -5.3575,20.6775 -5.3575,20.6775 0,0 -4.09,11.70875 0.175,15.44375 5.8425,3.97 12.4975,-1.38125 15.19875,-3.78125"
style="fill:#f46717;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16928"
id="path2576" /><path
d="m -658.54018,-67.648085 c -25.62625,-4.69875 -50.81375,-1.24875 -72.40125,4.9625 -0.42375,1.26875 -0.81,2.43 -1.16,3.465 43.9475,-12.3625 73.56125,-8.4275 73.56125,-8.4275"
style="fill:#b3bbe5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16928"
id="path2578" /><path
d="m -743.76143,-58.555585 c -30.035,10.71625 -50.45125,25.19 -50.45125,25.19 17.4525,-9.72125 34.0525,-16.78 49.275,-21.88875 0.0937,-0.26625 0.1875,-0.525 0.27875,-0.78375 0.30375,-0.8525 0.605,-1.69 0.8975,-2.5175"
style="fill:#b3bbe5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16928"
id="path2580" /><path
d="m -736.28768,-35.186835 c -3.52625,-3.52625 1.15,-15.425 2.64125,-19.53 0.28875,-0.79125 0.8325,-2.3725 1.545,-4.50375 0.35,-1.035 0.73625,-2.19625 1.16,-3.465 2.02625,-6.09125 4.805,-14.565 7.3975,-22.51875 2.64125,-8.74 0.1375,-12.23875 -5.25625,-12.23875 -3.81875,1.17625 -9.83875,2.34875 -9.83875,2.34875 0,0 6.9,0.1475 4.11,8.95625 -1.705,5.39375 -4.7375,14.9 -9.2325,27.5825 -0.2925,0.8275 -0.59375,1.665 -0.8975,2.5175 -0.0912,0.25875 -0.185,0.5175 -0.27875,0.78375 -3.34625,9.51125 -6.77125,22.40375 2.4975,26.03 6.75375,2.64375 17.46,-3.76 23.32875,-11.245 -8.80625,6.01625 -13.6525,8.80875 -17.17625,5.2825"
style="fill:#35af3f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.16928"
id="path2582" /></g><g
id="g2056"
transform="translate(-18.759485,-28.372554)"><g
id="g1248"
transform="translate(-3.4089682,16.030063)"><rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
id="rect1446"
width="6.6498156"
height="6.4167376"
x="50.830681"
y="75.350082"
ry="1.3043859" /><path
style="fill:#03b7ea;fill-opacity:1;stroke:#000000;stroke-width:0.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 53.653937,84.776494 -0.02333,-7.326466 5.78651,5.249857 -3.803231,-0.863312 z"
id="path633" /></g></g></g></svg>

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -3,42 +3,79 @@ package baseUFRHG;
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JFrame;
public class FileSaveXLSX {
Object[][] data = null;
String Formation = "";
JFrame frame = new JFrame("Enregistrer le classeur Ms Excel");
public void chooseDestination(Object[][] data, String Formation, exportBaseToExcel.exportType type) {
this.data = data;
this.Formation = Formation;
// Créer une boîte de dialogue de sélection de fichier
// public void chooseDestination2(Object[][] data, String Formation, exportBaseToExcel.exportType type) {
// this.data = data;
// this.Formation = Formation;
//
// // Créer une boîte de dialogue de sélection de fichier
// JFileChooser fileChooser = new JFileChooser();
//
// // Afficher uniquement les dossiers (et non les fichiers)
// fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
//
// // Afficher la boîte de dialogue de sélection de fichier
// int result = fileChooser.showSaveDialog(null);
//
// // Vérifier si l'utilisateur a sélectionné un dossier de destination
// if (result == JFileChooser.APPROVE_OPTION) {
// // Récupérer le dossier sélectionné par l'utilisateur
// File selectedFolder = fileChooser.getSelectedFile();
//
// // Récupérer le nom du fichier à partir d'une boîte de dialogue
// String fileName = JOptionPane.showInputDialog(null, "Nom du fichier :", Formation);
//
// // Créer le chemin complet du fichier en combinant le dossier et le nom du fichier
// String filePath = selectedFolder.getAbsolutePath() + File.separator + fileName + ".xlsx";
//
// if(type.equals(exportBaseToExcel.exportType.TABLE)) new CreateCalcWorkbook(data,filePath);
// if(type.equals(exportBaseToExcel.exportType.EMARGEMENT)) new createEmargement(data, filePath);
// }
//
//
//
//
// }
public void save(Object[][] data, String Formation, exportBaseToExcel.exportType type) {
this.data = data;
this.Formation = Formation;
this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JFileChooser fileChooser = new JFileChooser();
// Afficher uniquement les dossiers (et non les fichiers)
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
// Afficher la boîte de dialogue de sélection de fichier
int result = fileChooser.showSaveDialog(null);
// Vérifier si l'utilisateur a sélectionné un dossier de destination
if (result == JFileChooser.APPROVE_OPTION) {
// Récupérer le dossier sélectionné par l'utilisateur
File selectedFolder = fileChooser.getSelectedFile();
// Récupérer le nom du fichier à partir d'une boîte de dialogue
String fileName = JOptionPane.showInputDialog(null, "Nom du fichier :", Formation);
// Créer le chemin complet du fichier en combinant le dossier et le nom du fichier
String filePath = selectedFolder.getAbsolutePath() + File.separator + fileName + ".xlsx";
if(type.equals(exportBaseToExcel.exportType.TABLE)) new CreateCalcWorkbook(data,filePath);
if(type.equals(exportBaseToExcel.exportType.EMARGEMENT)) new createEmargement(data, filePath);
String nameFile = null;
// Spécifiez le nom de fichier par défaut
if(type == exportBaseToExcel.exportType.EMARGEMENT) {
nameFile = "emargement_" + Formation + ".xlsx";
}else {
nameFile = "table_" + Formation + ".xlsx";
}
fileChooser.setSelectedFile(new File(nameFile));
int result = fileChooser.showSaveDialog(frame);
if (result == JFileChooser.APPROVE_OPTION) {
File selectedFile = fileChooser.getSelectedFile();
System.out.println("Fichier sélectionné : " + selectedFile.getAbsolutePath());
// Appel de la méthode de sauvegarde avec le fichier sélectionné
if (type.equals(exportBaseToExcel.exportType.TABLE))
new CreateCalcWorkbook(data, selectedFile.getAbsolutePath());
if (type.equals(exportBaseToExcel.exportType.EMARGEMENT))
new createEmargement(data, selectedFile.getAbsolutePath());
}
}
}

View File

@ -209,7 +209,7 @@ public class exportBaseToExcel {
FileSaveXLSX s = new FileSaveXLSX();
s.chooseDestination(data, formation, type);
s.save(data1, formation, type);
}else {