From 24fda790b0e575b67897844642ba18ced6b43f68 Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Sun, 27 Nov 2022 13:36:53 +0100 Subject: [PATCH] $ --- .../FIProjetIHM2022/Test/BFrame.class | Bin 4525 -> 4525 bytes .../FIProjetIHM2022/Test/Controller$1.class | Bin 879 -> 879 bytes .../FIProjetIHM2022/Test/Controller.class | Bin 8124 -> 7943 bytes src/Test/BFrame.java | 4 +- src/Test/Controller.java | 130 +++++++++--------- 5 files changed, 69 insertions(+), 65 deletions(-) diff --git a/out/production/FIProjetIHM2022/Test/BFrame.class b/out/production/FIProjetIHM2022/Test/BFrame.class index 4d9053a7ea70b675c559904947e3ae1870cace1e..9e2414293eece5d12e1980d310aa779296c455af 100644 GIT binary patch delta 432 zcmaLT%PvDv6vpxYNp#RtdXu6q6{%`4aVXN#NY%ZGq!N+Ty)&bth>qM%Ot3>FYJ^c8 zk(7~%i6<~H6%QiT6P)bHTFLtD{jF^V&ESh)Zx2#I4R&gAQil&ejnvaZ18ua@Nr*0~ zB81hjer6aJ)7>)NBhwLj;FGZ6UYDCnis4+3)q9#Z%Db*AyQtH?78O>Pe zdC?1^7ez0LUKYI~dX+TU@=v9v#d8*XT>@_qW0NF#rrBbSZL;jJ#x6MuD&YKX+Cyg_ zF9!rTq=O@Q?3g$w68uzoUB%Ej4lbzXl4g`dy29XEqTI+Tx6Du^!=3ta73}xec#!)Z o)vP;RRg&&WI#a&=S(V*`wpU5}rVNiy**#(HU8;okq4J*CKahb%eE`_ul6SFf!ik0PuTW5LoW2 zButI!)K85@lkSjoho!qoqM0^Y=%7{Q^yf&oiAsp-5!EZIPgFl~2BaF47*c<>ugHXn zo)kSLdRp|1=vmQoqUTAnkp0cqwAiuvrArL1WR+`q&MhO{G0wgEc5GQ6u<$7N qJ*iP=vLG$hi&U@j^%<3Qwp-q0+jnKSJj&_{Y9DfnYo99Riv9!e`bGi( diff --git a/out/production/FIProjetIHM2022/Test/Controller$1.class b/out/production/FIProjetIHM2022/Test/Controller$1.class index 9876162a97bdc1996b10c0480a5047b3a86df112..778a3e19675b62f7f5b14fed2aa9a3c33307b014 100644 GIT binary patch delta 19 bcmaFQ_MUCSE+$63$-9}t84V^2Gsge`OST4M delta 19 bcmaFQ_MUCSE+$6($-9}t84V{3Gsge`OU4Fe diff --git a/out/production/FIProjetIHM2022/Test/Controller.class b/out/production/FIProjetIHM2022/Test/Controller.class index 27a06e6090c05bcf4e72a99c840e815305de453c..4151654c682294ad745f5d5b37c5f6e789857e35 100644 GIT binary patch literal 7943 zcmbtZ33OD~dH(KfZXSG9mj6k#w%ir9Xly;Y&UVUxNfu9ZfZAmlBP}Eq=CfH@80)jG&35` z@i`S@=DvIX``>^0{^eagfAP#y0Im}wemLON;L_oSM_|T&W87#;7|D^Qt%Li`p`3tc zT|61jtru|C*7f<|g-?TDM*zCO6+6squBknh%wIS7E8kgIu_z8o}V74j@J2wqo~K#SfpXGjwM)H zX0hm@Y|b2`p;CF;&9*{3)wC@WPv)YzjA@Lu1Zno=I%-iTFn7#2VA6O)Ms8O;H_A~q zXC!l3fyK2Iht^r*E60#iJUP{(9-hkM3UmzW+`P+*Qa4s z!40jkv3Sxl<~6udx?zoucVjKhV9*S<8;VraMBu$rlWPT**z!)URuNc3i@?kZi!WK_ zM+DbN-w|RhHlImEwG0fDsBU4hrOK34<$VG{X@#4cvIl9QrtWP<(oFbqJ)C~DqeDZd zjt$sYNw&inOc1s+N6cK*Oc3<(RI)b}GZO-fYArQ;HuqS z*C%C(>ewL}%^}@}cp{ONK24`GxlLw#WHcuo+oxj}ZlF(x@|ld8%vtj6%+d(6m9-1% zS_>5MdhFIQfDaJdMvSM`+h{Tl%J3gcr;=pTVmrNjQp1e`0V{?#WQ;L}`5x?(4mSiM zRZ!W*A3Nq1eM`AW%Bc+00EQ6LVCopgNQK>|x=COj1uvVI4`xz&snL?6ptU(pWtyte z@?1aS*stM$jszI&SE{&^DqGuH6?{4+3mTYsuqJ4vF(XOK&9)I`CD~#u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p@m*fb(EXVMmJcftlyLecBgyZrOP6jMI9$1WT1Xkmlfo=G9U@x8s+=3?q zpTbjtLwGvyFn$<#1kVMY!1IA;@j~FIcroxAejIok&lv`OV$8$N7``QkENa&%RTZ%Vo@w zt8uHJ5&Q5FmZf``VF$5S-otfaS{czhqVfsErHwl*qH^5ZL2SP0?I1#T`#Tok4o|Wq zh}`Ae5g|5>JpUd<1CL>io~@&uJM@kytxahumb}D#eT5_u;tfQNKEotdzmRsG8YW`j zlNEfbC2mJ$C7&X+R9UnNwMM6JQJAQFjPhPZh}e|$8LV2yc)4bP-fVDI2*LJs(v@X6PNPZ3efdlGX`5!#4}u!$Q@ z9O7TmU)Pzq+mv+zyonvJW7a8bK=jPZxbC;uUh}qEbGN*Svrh4@Ei`#Oo0S=-@P%mv z3IEHBN8axJ1?Id1{_w^t+aBGC!a#vazl z-`s`u48y*0yxrUU$fuDs+Jg1L&}Y%4M@3Xq&}=NL4<45q1AR<>Ehi+(R48=^gN)** zI5IA?PWN$*=I2VjcS#Ia^DajCYSV=T7~(OMj;I=aBv!(Vx2|%YEwJImvJSkx|LZUc`R~ DVMj?u diff --git a/src/Test/BFrame.java b/src/Test/BFrame.java index df8ab8b..dd7dc9a 100644 --- a/src/Test/BFrame.java +++ b/src/Test/BFrame.java @@ -8,8 +8,7 @@ package Test; * */ import javax.swing.*; -import java.awt.GridBagLayout; -import java.awt.GridLayout; +import java.awt.*; import java.awt.event.WindowEvent; /** @@ -114,7 +113,6 @@ public class BFrame extends JFrame { frame.setLocation(loca_x, loca_y); frame.setSize(size_x, size_y); frame.getContentPane().add(content); - JScrollPane scrollPane = new JScrollPane(); frame.getContentPane().add(scrollPane); scrollPane.setViewportView(content); diff --git a/src/Test/Controller.java b/src/Test/Controller.java index 09ce7f5..b37d006 100644 --- a/src/Test/Controller.java +++ b/src/Test/Controller.java @@ -16,9 +16,8 @@ import java.util.ArrayList; import java.util.Objects; //test -import javax.swing.JDialog; +import java.awt.Dimension; import javax.swing.JPanel; -import java.awt.GridLayout; public class Controller implements ActionListener, ListSelectionListener { private final BDatabase db; @@ -52,28 +51,42 @@ public class Controller implements ActionListener, ListSelectionListener { } /** - * Pour afficher une JTable - * @param frame La fenetre + * Pour afficher une JTable sans listener + * + * @param parent La fenetre qui sera bloque + * @param frameTitle Le titre de la fenetre + * @param size_x Taille en x + * @param size_y Taille en y + * @param loca_x Localisation en x + * @param loca_y Localisation en y * @param liste La JTable * */ - private void Display(BFrame frame, JTable liste) { + private void Display(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) { + JPanel forModal = new JPanel(); + + ListSelectionModel lsm = liste.getSelectionModel(); liste.getTableHeader().setReorderingAllowed(false); liste.setFillsViewportHeight(true); this.currentJTableUse = liste; - JScrollPane scroll = new JScrollPane(liste); - frame.getContentPane().add(scroll); + forModal.add(liste); - frame.openBFrame(); + BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal); } /** * Pour afficher une JTable contenant un listener - * @param frameTitle La fenetre + * + * @param parent La fenetre qui sera bloque + * @param frameTitle Le titre de la fenetre + * @param size_x Taille en x + * @param size_y Taille en y + * @param loca_x Localisation en x + * @param loca_y Localisation en y * @param liste La JTable * */ - private void DisplayWithListner(BFrame parent, String frameTitle, JTable liste) { + private void DisplayWithListner(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JTable liste) { JPanel forModal = new JPanel(); ListSelectionModel lsm = liste.getSelectionModel(); @@ -85,9 +98,7 @@ public class Controller implements ActionListener, ListSelectionListener { forModal.add(liste); - // BETA - // TODO: Manque les colonnes et prends toute la surface - BFrame frame = new BFrame(frameTitle, 1, 1, 500, 500, parent, forModal); + BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal); } @Override @@ -99,18 +110,6 @@ public class Controller implements ActionListener, ListSelectionListener { String text = this.pv.getSearchStud(); if(Objects.equals(command, "pv::GetStudList")) { - BFrame frame = new BFrame( - "Liste des eleves", - 1, - 1, - 500, - 500, - "GridLayout", - 1, - 1, - 2 - ); - String[][] data = new String[this.e.size()][2]; String[] titre = { @@ -129,22 +128,18 @@ public class Controller implements ActionListener, ListSelectionListener { data[i] = info; } - Display(frame, this.createJTable(data, titre)); + Display( + this.pv, + "Liste des etudiants", + 350, + 400, + this.pv.getX(), + this.pv.getY(), + this.createJTable(data, titre) + ); } else if(Objects.equals(command, "pv::GetListFiltered")) { - BFrame frame = new BFrame( - "Liste des eleves du " + groupeOption, - 1, - 1, - 500, - 500, - "GridLayout", - 1, - 1, - 2 - ); - String[][] data = new String[this.e.size()][1]; String[] titre = { @@ -171,7 +166,15 @@ public class Controller implements ActionListener, ListSelectionListener { data_final[x] = data[x]; } - Display(frame, this.createJTable(data, titre)); + Display( + this.pv, + "Liste d'eleve du " + groupeOption, + 350, + 400, + this.pv.getX(), + this.pv.getY(), + this.createJTable(data_final, titre) + ); } else if(Objects.equals(command, "pv::SearchStudentPer3Letters")) { @@ -185,18 +188,6 @@ public class Controller implements ActionListener, ListSelectionListener { } else { char[] beg = text.toCharArray(); - BFrame frame = new BFrame( - "Liste d'eleves d'ou les noms commence par " + beg[0] + beg[1] + beg[2], - 1, - 1, - 500, - 500, - "GridLayout", - 1, - 1, - 2 - ); - ArrayList filtreEleveNom = db.fetchAll("SELECT nom FROM fi_eleves WHERE nom LIKE '" + beg[0] + beg[1] + beg[2] + "%'"); ArrayList filtreElevePrenom = db.fetchAll("SELECT prenom FROM fi_eleves WHERE nom LIKE '" + beg[0] + beg[1] + beg[2] + "%'"); ArrayList filtreEleveGroupe = db.fetchAll("SELECT groupe FROM fi_eleves WHERE nom LIKE '" + beg[0] + beg[1] + beg[2] + "%'"); @@ -210,8 +201,6 @@ public class Controller implements ActionListener, ListSelectionListener { "Erreur.", JOptionPane.ERROR_MESSAGE ); - - frame.closeBFrame(); } else { String[] titre = { "Nom", @@ -229,18 +218,27 @@ public class Controller implements ActionListener, ListSelectionListener { }; } - Display(frame, this.createJTable(data, titre)); + Display( + this.pv, + "Recherche", + 350, + 400, + this.pv.getX(), + this.pv.getY(), + this.createJTable(data, titre) + ); } } } else if(Objects.equals(command, "av::MoveStudGrup")) { - Object[][] data = new Object[this.e.size()][2]; + Object[][] data = new Object[this.e.size()][3]; String[] titre = { "Nom", "Prenom", - "Groupe" + "Groupe", + "Action" }; for(int i = 0; i <= this.e.size()-1; i++) { @@ -248,12 +246,21 @@ public class Controller implements ActionListener, ListSelectionListener { this.e.get(i).getNom(), this.e.get(i).getPrenom(), String.valueOf(this.e.get(i).getGroupe()), + "[DEPLACER]" }; data[i] = info; } - DisplayWithListner(this.av, "Deplacer un etudiant", this.createJTable(data, titre)); + DisplayWithListner( + this.av, + "Deplacer un etudiant", + 350, + 400, + this.av.getX(), + this.av.getY(), + this.createJTable(data, titre) + ); } } @@ -261,14 +268,13 @@ public class Controller implements ActionListener, ListSelectionListener { public void valueChanged(ListSelectionEvent e) { int[] cell; Object value; - if (!e.getValueIsAdjusting()) - { + + if (!e.getValueIsAdjusting()) { cell = this.currentJTableUse.getSelectedRows(); - if (cell.length > 0) - { + if (cell.length > 0) { for (int i=0; i < 3; i++) { TableModel tm = this.currentJTableUse.getModel(); - value = tm.getValueAt(cell[0],i); + value = tm.getValueAt(cell[0], i); System.out.print(value + " "); }