From 7dd1cbbf33a5eb854b6bbaeadcf3284ce7c48560 Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Sun, 27 Nov 2022 13:10:18 +0100 Subject: [PATCH] $ --- .../FIProjetIHM2022/Test/AdminView.class | Bin 1705 -> 1694 bytes .../FIProjetIHM2022/Test/BFrame.class | Bin 3716 -> 4525 bytes .../FIProjetIHM2022/Test/Controller$1.class | Bin 868 -> 879 bytes .../FIProjetIHM2022/Test/Controller.class | Bin 6565 -> 8124 bytes src/Test/AdminView.java | 2 +- src/Test/BFrame.java | 30 +++- src/Test/Controller.java | 138 ++++++++++++------ 7 files changed, 119 insertions(+), 51 deletions(-) diff --git a/out/production/FIProjetIHM2022/Test/AdminView.class b/out/production/FIProjetIHM2022/Test/AdminView.class index dcbd1597af0a103ff13a0e87cc5bf66e42bc5b66..f540f81c8d78ae2481c0152d7c08583c80873c23 100644 GIT binary patch delta 18 acmZ3DC0|1y;3c&yX diff --git a/out/production/FIProjetIHM2022/Test/BFrame.class b/out/production/FIProjetIHM2022/Test/BFrame.class index 9d206d241a3feb007c8109ea6e4b2119e3141eed..4d9053a7ea70b675c559904947e3ae1870cace1e 100644 GIT binary patch literal 4525 zcmb_g`&%4W8GZ*AW_KA90wu}jR$7ykES620OBIrqgoHr4Nf0PVXq!%U2bi$zY-ffL zQnmJKwe{9&t(Vqo6ECgR8Ws(l-Ss9tJ3xz?~$yuH!^IHsT#WsrC-r15>q^WZops2KJ2VXxGrPil5`Q zS#YM3xCd$BuS3J`aI-n@XA~#hw<S_YoHSuGU!=;Hl&Tdw~H-V-)G=HS=YHf zY+tct?tp=VIHY0Sl;!t2Mc*p=gJzLXH@5Ey42fY`G3}z|67Hw)X&qe#x^Xy+Zf2DT zgKFmU8q!sc_d2sBr%2u1tCX%x>R>8tT1CWg&UF|ex{_p4)ym_jfn(^^u%7OZ+SYu@ zan)EMIPhadYXJI$fj*pMY}78#z94aowUaU(0~%VZtq#nZQ`SJvDaP>-?U)|-co_!7 z=`0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A8F790`BDgxtV2+4^6h^A65+KSb@Izit`zVblBul^HaOUgMLO!B#OY;8T=A zv-uEhgUe{oV7pnLL3&pP&xrYw40`TU$^mh7*UOMcnbS1}G0y@v`GpX>NUC_(Yy KQ+$ToDE%8(pC17L diff --git a/out/production/FIProjetIHM2022/Test/Controller$1.class b/out/production/FIProjetIHM2022/Test/Controller$1.class index f017eb7beb36f4d0c14e361a0951515309a25674..9876162a97bdc1996b10c0480a5047b3a86df112 100644 GIT binary patch delta 78 zcmaFD_MUA6ACnMIa#3nxNvc;!Vp2{jBZI9*^yENB;fdWmGQlN9nR)5fnm$>HWr-E~ d#pOVrK17}Mn^3-(?aQ%(ykq_#<{Hwwzc#IUAHnuS<9tkz0tw8(gFq2_y5n4BiYU# z@+8tZ|KQ7G64dNM_~ zU2UCVVW!$A!zN}6X6Wr}*4nPU%Pu+*%z~ko&9zXEd4fQC7gg%1Ue#{mEJ2+f+*HU9 z^=F*@5zNQg%7k+StCmiC{Pcs9^l$epTwvimoX_*e_R&V~{PIz>;{sf0VxfhLu&4^L z)PbVwj1s7PiMaVFWb&<>3Ynanatn?<+8!h9ODrr!gJAxsy~iPVgSNXh_36D<~&p;a(PV_tolz#LO&XLD4?how?PL%)ej%5LaL zk7jZnm>1)0<%Y{Fya#QB!6pp88zxrK62W_wC07V8^7TDEJB`97+6A*GA%4*%5hSrv z`HmE8_vM^sRQvYr6{dTfY@cSRp+ADv=rFOyLMPS=VhWENTZ{XNRqIt->|I$hbH=da z>crHI1(2c7E=T*v`x?C`~=(wAme1Yi7^X%L7G%Ked=<-S+uKaT)j9%MbPXSTXvbVk2tnYyH-152s@O` zCFL=OU2>YR?dBgpDQYm8(6VmC0TVY__&wY#I9n$Og|4SUhlZp}sY9j_CU1bW z7`1bB(%iC_D>H^lw7+lR50pR!Em!Z#Phh8J|Ioq*@gb6A%4~No?cAu#NVi(}VGAEo zV(PSq?84wk$}OeC_#>v=v3<$pdOD5+3aJP_hL4;0V+((RPw-%Ei7qc*L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4xKbf4B#K63(?ZB!x0geGe5sd4vn7K z=W@_LdtDBC=?fl5jGlEQi)pwTuaP56|IEeflpOIL@PZeRnV3PP=vLCODt zN-tU5?I`Od^Zsxx;V6RtvML0W2k{n;v0hXvymfP=pjx?;I=oDD%}{O?KF$T4O2c~O z>Liq5ojCGz;wUWq#Ni7#=@^|HRuNLcPv1TK6V9tc#THcrxXYW^Ov8?06(T1lBi&J! znEy(eE#gf~IYzsKqv=@y#~tGbjIn|QX}RSE?jJDeEzIKfuCS%Y2!Jxee8;e+yzW9( z*@8*kQ~x5bPkv@|%PPJ~2L);RI}c;1tG;3WejI4>$NWP$tPJ5>F+WE~4&(8zn14UM z-xOf+{h>_NPi^Ap=kgr;;A;e_o k8FQW|JI_;`=M3jL(|OJkbI2jT0uJ%be`2nvWu}Pz4> e; private final ArrayList g; + private JTable currentJTableUse; public Controller(ArrayList e, ArrayList g) { this.e = e; @@ -28,6 +38,58 @@ public class Controller implements ActionListener { System.out.println("[+] Demarrage de la vue Administrateur -> " + av); } + /** + * Pour creer une JTable + * @param data Les donnees + * @param title Les titres + * */ + private JTable createJTable(Object[][] data, String[] title) { + return new JTable(data, title) { + public boolean editCellAt(int row, int column, java.util.EventObject e) { + return false; + } + }; + } + + /** + * Pour afficher une JTable + * @param frame La fenetre + * @param liste La JTable + * */ + private void Display(BFrame frame, JTable liste) { + liste.getTableHeader().setReorderingAllowed(false); + liste.setFillsViewportHeight(true); + + this.currentJTableUse = liste; + + JScrollPane scroll = new JScrollPane(liste); + frame.getContentPane().add(scroll); + + frame.openBFrame(); + } + + /** + * Pour afficher une JTable contenant un listener + * @param frameTitle La fenetre + * @param liste La JTable + * */ + private void DisplayWithListner(BFrame parent, String frameTitle, JTable liste) { + JPanel forModal = new JPanel(); + + ListSelectionModel lsm = liste.getSelectionModel(); + lsm.addListSelectionListener(this); + liste.getTableHeader().setReorderingAllowed(false); + liste.setFillsViewportHeight(true); + + this.currentJTableUse = liste; + + forModal.add(liste); + + // BETA + // TODO: Manque les colonnes et prends toute la surface + BFrame frame = new BFrame(frameTitle, 1, 1, 500, 500, parent, forModal); + } + @Override public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); @@ -67,7 +129,7 @@ public class Controller implements ActionListener { data[i] = info; } - Display(frame, data, titre); + Display(frame, this.createJTable(data, titre)); } else if(Objects.equals(command, "pv::GetListFiltered")) { @@ -109,7 +171,7 @@ public class Controller implements ActionListener { data_final[x] = data[x]; } - Display(frame, data_final, titre); + Display(frame, this.createJTable(data, titre)); } else if(Objects.equals(command, "pv::SearchStudentPer3Letters")) { @@ -167,67 +229,51 @@ public class Controller implements ActionListener { }; } - Display(frame, data, titre); + Display(frame, this.createJTable(data, titre)); } } } else if(Objects.equals(command, "av::MoveStudGrup")) { - BFrame frame = new BFrame( - "Deplacer un etudiant", - 1, - 1, - 500, - 500, - "GridLayout", - 1, - 1, - 2 - ); + Object[][] data = new Object[this.e.size()][2]; - String[][] data = new String[this.e.size()][3]; - - Object[] titre = { - (String) "Nom", - (String) "Prenom", - (String) "Groupe", - (String) "Action" + String[] titre = { + "Nom", + "Prenom", + "Groupe" }; 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" + this.e.get(i).getNom(), + this.e.get(i).getPrenom(), + String.valueOf(this.e.get(i).getGroupe()), }; data[i] = info; } - Display(frame, data, titre); + DisplayWithListner(this.av, "Deplacer un etudiant", this.createJTable(data, titre)); } } - /** - * Pour afficher le JTable - * @param frame La fenetre - * @param data Les donnees des colonnes du tableau - * @param titre Les titres des colonnes - * */ - 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; + @Override + public void valueChanged(ListSelectionEvent e) { + int[] cell; + Object value; + if (!e.getValueIsAdjusting()) + { + cell = this.currentJTableUse.getSelectedRows(); + if (cell.length > 0) + { + for (int i=0; i < 3; i++) { + TableModel tm = this.currentJTableUse.getModel(); + value = tm.getValueAt(cell[0],i); + System.out.print(value + " "); + } + + System.out.println(); } - }; - - liste.getTableHeader().setReorderingAllowed(false); - liste.setFillsViewportHeight(true); - - JScrollPane scroll = new JScrollPane(liste); - frame.getContentPane().add(scroll); - - frame.openBFrame(); + } } } \ No newline at end of file