From f956c07bef64abcb21faaf08ae727bea1978d2b7 Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Tue, 29 Nov 2022 02:20:04 +0100 Subject: [PATCH] $ --- .../FIProjetIHM2022/Test/AdminView.class | Bin 1735 -> 1746 bytes .../FIProjetIHM2022/Test/Controller.class | Bin 11002 -> 11427 bytes src/Test/AdminView.java | 2 +- src/Test/Controller.java | 50 +++++++++++++++--- 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/out/production/FIProjetIHM2022/Test/AdminView.class b/out/production/FIProjetIHM2022/Test/AdminView.class index 0506ed3f9d1ba24608ca4bfbe79eac432a2ecb03..b96a881e0233739da1965d4f08e9cb2a84becde8 100644 GIT binary patch delta 29 kcmX@kdx>|$GA053#4;-@$CQ-dlF}6SqSAuRtC?h20H2}?Jpcdz delta 18 Zcmcb_dz^Q}GA34*5Pui{&D)q{SO7mJ1=aun diff --git a/out/production/FIProjetIHM2022/Test/Controller.class b/out/production/FIProjetIHM2022/Test/Controller.class index 400f8951224b51939de480ef7201a671b10463cb..8654bd5e0dab2b55a3bc395db433fc03174b032d 100644 GIT binary patch delta 3689 zcmaJ@33yc16+ZvWd-LARyiCG`$z+m1hU_Fj(1<_?WC28mEyx-HaU=r+8Lp6?S$rVlS=16)_Ik_X|raIzh;3- z=Rw}eP^h^s9BB52gWe_0jp3$%*RSgV?o{UwhE)0CeQp>V*-GeILnxt1$7C%C2lDze1BgiJ>cauwuh$VUMvM@)0&h;s>EOQD7$ z3=)}+e$o&P#iGLDwp^y+a+HV#j-ifWxKhDz4I?lTlp%tS4AJH&z$o#KBR!#%%r+X2 zF&fDz7iyw6QVGkVJRg?Xz8^a+RD)g95EKq^*8m^+#9MTd9RX4WO>FYUHcU-Mu z;{Q5o6ifm+m-<)uR~5IctP3tF_D%NR5U6*O4O8@aPUU$POx6R6>;3GWc7u4+nj|_c zs(31~ugiyOCPu?_ir46?J_9sR9JA)94xFuG76@J&ECxNy)lh?LMSfDAeLfZ_xK6`D z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.java b/src/Test/AdminView.java index dccbabb..4771b81 100644 --- a/src/Test/AdminView.java +++ b/src/Test/AdminView.java @@ -44,7 +44,7 @@ public class AdminView extends BFrame { settings.setPositionY(2); JButton addStudGrup = new JButton("Ajouter un etudiant dans un groupe"); addStudGrup.addActionListener(this.listener); - addStudGrup.setActionCommand("TODO"); + addStudGrup.setActionCommand("av::AddStudGrup"); this.add(addStudGrup, settings); this.setResizable(false); diff --git a/src/Test/Controller.java b/src/Test/Controller.java index de9f746..19ef026 100644 --- a/src/Test/Controller.java +++ b/src/Test/Controller.java @@ -36,10 +36,10 @@ public class Controller implements ActionListener, ListSelectionListener { this.g = this.db.getGroupeList(); // Les 3 fenetres s'ouvriront en meme temps (Pour le contexte du projet) - this.pv = new ProfView(e, g, this); - System.out.println("[+] Demarrage de la vue professeur -> " + pv); - this.av = new AdminView(e, g, this); - System.out.println("[+] Demarrage de la vue Administrateur -> " + av); + this.pv = new ProfView(this.e, this.g, this); + System.out.println("[+] Demarrage de la vue professeur -> " + this.pv); + this.av = new AdminView(this.e, this.g, this); + System.out.println("[+] Demarrage de la vue Administrateur -> " + this.av); } /** @@ -285,7 +285,41 @@ public class Controller implements ActionListener, ListSelectionListener { ); } - else if(Objects.equals(command, "crtll::ActionMoveGrup")) { + else if(Objects.equals(command, "av::AddStudGrup")) { + Object[][] data = new Object[this.e.size()][3]; + + String[] titre = { + "Nom", + "Prenom", + "Groupe", + "Action" + }; + + for(int i = 0; i <= this.e.size()-1; i++) { + if(this.e.get(i).getGroupe() == -1) { + Object[] info = { + this.e.get(i).getNom(), + this.e.get(i).getPrenom(), + String.valueOf(this.e.get(i).getGroupe()), + "[AJOUTER]" + }; + + data[i] = info; + } + } + + DisplayWithListner( + this.av, + "Attriuer un groupe a un etudiant", + 350, + 400, + this.av.getX(), + this.av.getY(), + this.createJTable(data, titre) + ); + } + + else if(Objects.equals(command, "crtll::ActionAddAndMoveGrup")) { this.tmpStud.add(String.valueOf(this.list.getSelectedIndex())); String query = @@ -377,7 +411,7 @@ public class Controller implements ActionListener, ListSelectionListener { settings.setPositionX(6); settings.setPositionY(0); JButton moveBtn = new JButton("Deplacer"); - moveBtn.setActionCommand("crtll::ActionMoveGrup"); + moveBtn.setActionCommand("crtll::ActionAddAndMoveGrup"); moveBtn.addActionListener(this); forModal.add(moveBtn, settings); @@ -392,6 +426,10 @@ public class Controller implements ActionListener, ListSelectionListener { forModal ); } + + if(Objects.equals(value, "[AJOUTER]")) { + System.out.println("Ajout"); + } } } }