From 7d122608b38d8a7d7d4cf820cbd349df5ccca679 Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Sat, 26 Nov 2022 22:30:18 +0100 Subject: [PATCH] $ --- .../FIProjetIHM2022/Test/AdminView.class | Bin 1486 -> 1705 bytes .../FIProjetIHM2022/Test/Controller$1.class | Bin 868 -> 868 bytes .../FIProjetIHM2022/Test/Controller.class | Bin 6108 -> 6565 bytes .../FIProjetIHM2022/Test/ProfView$1.class | Bin 871 -> 871 bytes .../FIProjetIHM2022/Test/ProfView.class | Bin 3670 -> 3670 bytes src/Test/AdminView.java | 18 +++++++-- src/Test/Controller.java | 36 +++++++++++++++++- 7 files changed, 48 insertions(+), 6 deletions(-) diff --git a/out/production/FIProjetIHM2022/Test/AdminView.class b/out/production/FIProjetIHM2022/Test/AdminView.class index a0d635f377330db95102563a4505cae225f66ff6..dcbd1597af0a103ff13a0e87cc5bf66e42bc5b66 100644 GIT binary patch delta 587 zcmYjNT~E_c7=F$uQpzT-hyjAJ3}K;T4p0&{MVu3mIS>YlrI~T>vv8w#jAkaY>NKs*hHEa@-J17Xlqy}w2&h$~X&j{v4l8y!l`j~( z*1n8q0zy-ehAv}4AeOB z^+`)%ET8U$zKTfr%S|VLJBGqN#{Wm&U1>V;nz2Gyfr==XK>M6$AHnU`OrQ&Ic&Fgi zq`A~8u_4@I?L{93_zmJdkr;+C&Tfqp9TICCZ?W$El19=SJl!Khfb~;Lw7Mwr#M*jA zVgZvtfwMn+A22xHbm!D@Lh=#QFOe>(PtP%*@G+a{By@?flKT7{6KhHR4Bb8^lj;i} zGkP+(qWgHswRl3F5CYdrObBR@F~V%4O!$zV$5_YdIF2byV3u7DlXR6t5s$EgR30BW q`h*!&@fbFq+=%D|5lJeej7@CO{xJ7$xZ@M5UhuT;uBPG37`gC0y-{W;(-}OWf51@#6;tf=-eD21m-6^zIgHryh%(v zc<=)}c=J2_0b{HgOs6~D)vv4SJ%v7pu4yBpF<6f?C4s!YB~y=^YY_BF0+c?h$wXI>-+>&vI?Af>}P+D={GX~ diff --git a/out/production/FIProjetIHM2022/Test/Controller$1.class b/out/production/FIProjetIHM2022/Test/Controller$1.class index c24ce4eea2fcdaeedf3b586e304af6f18b7f1d12..f017eb7beb36f4d0c14e361a0951515309a25674 100644 GIT binary patch delta 30 mcmaFD_JnPN3De|QM)rx_;**1zVi|8w-oO;jcy}@fa|{5f;tF~I delta 49 zcmaFD_JnPN36o@SNl|8Ax^=WqR$^JAeokUux;{i`vM*B-25o1w;iZUwX~LYwLU1AB`Bal#Ui2GXx5s@(k==qTT)v7 znKfu6s6W(eG#X<}3_%RxVPT=P6qPrMVtt@OrBYB-1QZ3N2%edNKgP}Go^Q|Vp8K71 z_Hf;b+l_sfxAX&;OttHcnLc@3lyxum)hSsWYYF+OCGq&o_9f{=XIJaJ9bJobtS1!R zlU~%8YDssLcV)`cY?+_Rbn56P_@}mX&Tr4?*htW?c?oPH6f~t5ch=qAp6TppZ);0; zjJ?%B4m~D(*g}|8-S8i~JSbwpK5P}}H?a*L$dEoW^bxiT>@cwty9iMk*Q0WoUat3H zkBPn5CD-bswT}rUa;;fn7}$sXPX15jX+7#cVB&KO$ihG@_$9s)_}auld?RNB8Y17B zI0QezXkV1hOq<@3T9_6X>|PzHS85BJ8y2LNr0UvInaAs9&0Uag>72w2H2;rU9tpl} zoD?`Oa7kc9K5Z@wSq2qSk)UD|)fADXc{`|74(7$QQG{AKlvgS%L&a1kCxu2)R6Z2C zjmqWn(0IB*_J=0YSa~iqooj`g71p zVBOF7h0mjaxSunG0Ck5P$RD7yaz(+Rpc08$&u&J;>(nTpx60^D_q$ddSu4>Wv(`9z zZ0tp2(pvX&fjz;$6LXZf5L=-nRjW0T)U0`lq|bUHk@Q>dC*ry~Ay6Es*#MD4v)1|! z9&uddjDovr*ZrGwYU>k{N0<`kVTQ#=d7Pg+llk2&14Z{G9!gP78a5%eK<)Ky! zuudI^K6N7c)!Epo&c!Y@gWc*<>``CEUUfD0tKF>c!2xwU2Ee@0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$XREycZGlaYqN(*g-tT=bMjVr_Xr0ER_4-6{KAsofnpNU3Okw+I8N;L=WRG zrrDIa{Fd)=k^;wh79@$BH!JfE@+31#K_dl3rW<{347hQY8^dmlxG_dCn@d7`?mUnD K(QJxS0``9_j|m6> diff --git a/out/production/FIProjetIHM2022/Test/ProfView$1.class b/out/production/FIProjetIHM2022/Test/ProfView$1.class index f5455e1ff30f08e2818e088ed3e590b3745c54d6..7603b24719d1506f7fdf2c35db3cc4022ea31ab4 100644 GIT binary patch delta 27 jcmaFP_MC0QRwl;u$=jI1IWrjq8L}8e8L}sfF$V$wg762n delta 27 jcmaFP_MC0QRwl;W$=jI1IrA9=844Ig844$hF$V$wgail9 diff --git a/out/production/FIProjetIHM2022/Test/ProfView.class b/out/production/FIProjetIHM2022/Test/ProfView.class index b47facd74dc85763f467c1112a439adad8f8b487..41b14cdff1cdb183ef41b6bf7ecc8d9fc18411a2 100644 GIT binary patch delta 287 zcmW-ZJuE|E7=@qHskcc*2%5MCM56;?Kw6{?QdENYxf)U0l$shpmtbllHVe6<5L06i zAtpAPgux&UgWY7e`C>WeJvrxjD|W@cb*zROf>Z%MY?=^f|M!Jgw4AySwKNl=#Wbx( z+Xxf(KCB}}yi6dj4)5G(_x)GE?<@7-r`J5|Gf>n(F$46|&H!BunkH^if^mkJWSBG~ zER!V9C@y1^NO8ghW#iXo@xT->O!LkRpUm>j96!wSiz8T&MOxJ?s-7h^l2IhZiaNOVPhg@8U;?2LixC{An)0_YCmTVS!N0I3= zNMvHODF%Zs2D`~_^IM*$o}N$9DLQwqU1i}=i#P`?E-52I2?TlDt*E1%MyhEtk0|vt z(?Cn`X&pF diff --git a/src/Test/AdminView.java b/src/Test/AdminView.java index 3460e0b..879b517 100644 --- a/src/Test/AdminView.java +++ b/src/Test/AdminView.java @@ -4,6 +4,7 @@ import API.Etudiant; import API.Groupe; import java.util.ArrayList; import javax.swing.JButton; +import javax.swing.JLabel; public class AdminView extends BFrame { private final ArrayList e; @@ -32,10 +33,19 @@ public class AdminView extends BFrame { settings.setPositionX(0); settings.setPositionY(0); - JButton moveStud = new JButton("Deplacer un etudiant"); - moveStud.addActionListener(this.listener); - moveStud.setActionCommand("av::MoveStudent"); - this.add(moveStud, settings); + JButton moveStudGrup = new JButton("Changer le groupe d'un etudiant"); + moveStudGrup.addActionListener(this.listener); + moveStudGrup.setActionCommand("av::MoveStudGrup"); + this.add(moveStudGrup, settings); + + settings.setPositionY(1); + this.add(new JLabel(" "), settings); + + settings.setPositionY(2); + JButton addStudGrup = new JButton("Ajouter un etudiant dans un groupe"); + addStudGrup.addActionListener(this.listener); + addStudGrup.setActionCommand("av::AddStudGrup"); + this.add(addStudGrup, settings); this.openBFrame(); this.refreshBFrame(); diff --git a/src/Test/Controller.java b/src/Test/Controller.java index 50d0064..4cae8a9 100644 --- a/src/Test/Controller.java +++ b/src/Test/Controller.java @@ -172,8 +172,40 @@ public class Controller implements ActionListener { } } - else if(Objects.equals(command, "av::MoveStudent")) { + else if(Objects.equals(command, "av::MoveStudGrup")) { + BFrame frame = new BFrame( + "Deplacer un etudiant", + 1, + 1, + 500, + 500, + "GridLayout", + 1, + 1, + 2 + ); + String[][] data = new String[this.e.size()][3]; + + Object[] titre = { + (String) "Nom", + (String) "Prenom", + (String) "Groupe", + (String) "Action" + }; + + for(int i = 0; i <= this.e.size()-1; i++) { + Object[] info = { + (String) this.e.get(i).getNom(), + (String) this.e.get(i).getPrenom(), + (String) String.valueOf(this.e.get(i).getGroupe()), + (String) "Deplacer" + }; + + data[i] = info; + } + + Display(frame, data, titre); } } @@ -183,7 +215,7 @@ public class Controller implements ActionListener { * @param data Les donnees des colonnes du tableau * @param titre Les titres des colonnes * */ - private void Display(BFrame frame, String[][] data, String[] titre) { + private void Display(BFrame frame, Object[][] data, Object[] titre) { JTable liste = new JTable(data, titre) { public boolean editCellAt(int row, int column, java.util.EventObject e) { return false;