From c37363dce67d5f7552b9b8d94d30684bfdf210d0 Mon Sep 17 00:00:00 2001 From: "pro.boooooo" Date: Sun, 27 Nov 2022 14:14:19 +0100 Subject: [PATCH] $ --- .../FIProjetIHM2022/Test/AdminView.class | Bin 1694 -> 1735 bytes .../FIProjetIHM2022/Test/BFrame.class | Bin 4525 -> 4560 bytes .../FIProjetIHM2022/Test/Controller$1.class | Bin 879 -> 879 bytes .../FIProjetIHM2022/Test/Controller.class | Bin 7943 -> 8940 bytes .../FIProjetIHM2022/Test/ProfView.class | Bin 3670 -> 3711 bytes src/Test/AdminView.java | 1 + src/Test/BFrame.java | 1 + src/Test/Controller.java | 63 ++++++++++++++---- src/Test/ProfView.java | 1 + 9 files changed, 53 insertions(+), 13 deletions(-) diff --git a/out/production/FIProjetIHM2022/Test/AdminView.class b/out/production/FIProjetIHM2022/Test/AdminView.class index f540f81c8d78ae2481c0152d7c08583c80873c23..0506ed3f9d1ba24608ca4bfbe79eac432a2ecb03 100644 GIT binary patch delta 315 zcmYL?ze>Yk6vcmEny7pvN(+hs#XpN$N3H14rO>La);4O@YK01+h}DY8&X=QyzaO7Kp6kATGq#EfJMcr#4{o2^H(g(0t~S>i z8qKcF98XA1$8y=G@;)?v)cS$+7#xxzEu$FiRpAbkiKiInNHVqP+uT<5 zXx>_w^2Etv3a)U>NmQ|xc1~rRkzA}zOQT9ynyP4{)`n=axPmoe+e{k5=+)}DsR4!T zfRfC9UoH*mf@Lz%;#j_T#|Aw%3CQvPJB)uzYJx6joJ-}L-~~;&_E_dpSW48Zq_6b{ DTgoqf delta 274 zcmX@kJCB#^)W2Q(7#J9A8KO3Ftzr_BWMtsVFG$UEaw|&AP32z zX9$>_&8lb_2;_+Y)q%uBfhID7S%M5+Krx7^K|nDH21y|41C;v?)DJQtfAUe*bdhZg zPFmX-TsHy*m>7J4q#J|aWLGv@$1Db8hCBun285OQAS;0?I2h6yf*C@9#>oKbP=+v| T&L9R^hHxN@87LY7HY*YU=+!2y diff --git a/out/production/FIProjetIHM2022/Test/BFrame.class b/out/production/FIProjetIHM2022/Test/BFrame.class index 9e2414293eece5d12e1980d310aa779296c455af..a1d56dbf5a83162b48b3b15dd92245791834e1d0 100644 GIT binary patch delta 1711 zcmai!+gBS^6vn^FOft!2KoW#X1<5M3%23U6QD4w@L9v%ev?U4%v1$qdgEX{B7+SQX zExmc^&7;<8i&b0d4J&P#DAa0|KGY|D*5&dK(Eq^Ya-WkpVJ#ngn3KI`&i=mN-e;f8 z)csVa{rLC%4FGF#YgRk$24No$FNC)M&G*<=>&aM z5tdLf6f zb>6@HsE$|QlAxyIJ7bAt#!pRsO~>mvcD2*_i=*@_4PRqk#R7kKovm{(N;jD7S)tsN zu#yeASIR1WU>%;c^Ef1&V7EORrIV~oYYLtsr2u4FAHo}8^vk1KdMAnKP3Uk??8I9l zGo^J<=A!m+8_!%r?|~LOvjuM#GFxz3Wb&`?P{bWtz||C?c1EbJ_iiJ#^WL^@uC^H} ztzla&Y;%P1Zb2=K_X=uZ;h=~N?!ZaH!oejR&I*TSy^kEG^tLQ_7=T7=#CC|-4iVcS zVmm}^hlr?wJ4A4fDs+ixid;Ey1n*Pi77?$|BmB>Ee?V#`GIDjmWE0vdcC=)}GTFkT zRc^(?=2=Q|;3TaZ;bXs*v}Q*!jv}gQqnb9VX``Aps%fK|HmZpa=s-EDi4XA+p*Eon z7jThKyGd;tmk3os9qkdQba-->a0q4r?LGd-bJ!9#jBBW|5aGWnJtY=8d0a+MxrHuc z0o^@0^jPRM8ZA6)VLSg^XT7=s4x70_E@2P<|9q8?ssXKgve`&@{@4b-1UxCWj=^UV`@ucKS^VyNxP3 zi#&O@h%SqBF~rE6f|r=esh_npVvW?P2dU$&ID-(*ilOMmlqey8C8GAZMa97I%M`_@ zG#tFXC_bY|Ce5v)J_VoCTMrz6p|@2pHA8zNc&%$I;$xlrNfjG%pqns*SUZS?#R=aG2 zHIWYoa~c+o6ooWV;~dFZO9Y%kz)KebUt*Tl6RgZvndPI;#}ByvpUr&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$1.class index 778a3e19675b62f7f5b14fed2aa9a3c33307b014..b7bcefcde7038e08ae0c1374fc757b19cf001a07 100644 GIT binary patch delta 19 bcmaFQ_MUCSE+$6J$-9}t8MP-1Gsge`OJ)XH delta 19 bcmaFQ_MUCSE+$63$-9}t84V^2Gsge`OST4M diff --git a/out/production/FIProjetIHM2022/Test/Controller.class b/out/production/FIProjetIHM2022/Test/Controller.class index 4151654c682294ad745f5d5b37c5f6e789857e35..008628046e20cfd026a02e4b6699a7fc84eec9db 100644 GIT binary patch delta 2731 zcmY*bX>e2575={WBt2`fWy_XrVH=yx3wBUg3`Ay$WnzM`3Dj%~1T2go1|bnkHhUEk zAT6bxHm@7$BooqwG?NAhsSTI{ndyWHElo1*3_m()lZGr)AYCSHCbY48-jl6yJ)Zl{ zy=VK*x#yg#rxx6Pz;SKp!X*IndH9UuptC(i$+!-|EqEp zi=q-*SG1=pRuhdy`=V8WDppZ~UJ{Q-dsFRiFmrF&mXwger7k0;h^p6;xSQvYrk4^rDjVJ+dnn>v9IC_@zm?DIQ0BPZRFT z_=RAp72XoLZ^MFf5P|U2`i23_J1tv<1`wO6UN^>(({LmlQJ^31nS3Yj<#aKs;54jf z47>Voi#pPVfr-eGb)H1A0Qp!bQQR;1gP0;Q+=Es$W3g#`C!8V|%o-1J24|YagPg@i zGoB!4bB>8M$hksUOpW`5vYJ#tD4R(&NoKWLae5!;alSyv#|$puLOE#`c=wBGhnT#D z4A?ik>rAkjw67AWHKMT=r3hmJ9+tGP7qA=9h)zjYWDMX?7H}vFIFtn($^s5$0f#sW zIK)xFAvUEA#0I=9;J^srC0W2v7)>{FYtM?TLt^y~;*oHJ*Xp%ZcrEolZ2%hs_A|oB z+@BF8kU$Z3ny9yAl(MM3qo~)zn}zMo!uDoid$X{;S=e3^t7f2}pUslyq7kfi`3BjN z!K&4reY^O&YGjzLSRvvmxv)OuVwV)^ZYhVosKq`h>;qVeCneX1@F)&rKaSwrcnT+Q z6fes8EBGcZ<7vDB9lyhO@s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fView.class index 41b14cdff1cdb183ef41b6bf7ecc8d9fc18411a2..f71b8f8cf89f8d49130457c09ab79fdd09bda70f 100644 GIT binary patch delta 655 zcmZvZO>9hI6o#K~W_s_P+ly#YF)|48)0w2HpCK#|B;9pGf{4vDxeE!cs0Ceg!qUd# zM&hq1t>4m)8MjQST8KnKLZUkxD_hH2sQ2EH$wVx^^PTgabKduS=bOteWZe(HYcs$u z-j?0H*7hp~Z@@ouz#lk1SnNIF8&VxdbBA19u6bN1V{rRV`F;DkPZv-65j^a1vr@D! zCCpUt)9KlNOKb^l(?+|Fp&pOOU&P`#mt|!GzoXg?a>84L+1yn;8k|q>Fk?Y2y?V(# zW%8tCH*%i`!H@Ks(nCedR2N}OrDS5Soe^PmwMW7p(4f&ijY;ateaGr zU`*DEQ#m3buU-}jDKd;VD7GkyC>&9gHiYE=CFpD-a2f!0TvFO+RDI~nGsvX&{c xo|-V5Y3XN4EJ(t#acv3(n>{uMZC+_>zx2OJUdJz<;f?N;1TQix&y77f@COFxb65ZX delta 613 zcmZuuOD_Xq6g^+7Gt*IoAV@tUN<}=X2@4S*;!cfOskPW9m{b`78nS7Eh7$}bd9N5_UnI=jaQ zhlf+Ja@|AdjCw0yqa*>nJE-UBXU@yps7ZH6 zQKX~f29?Kz76f=oW~v5;kt0!N7!e8VCMBAP3<-r2zA7E=zXEkB0!mU~4<5Gp*_bN8 z85)A*QU_@Kx4!^|iGHh>yHPmPOB@kb`klztG3VAXAEu7ge8>|#nw)X#d&Goz#-yn? z06V6+zkM8VzwG{G|On$dNXac=iJpN|Ed)i<~w7E^G>7R3@#a|X2bya0XzL= AqyPW_ diff --git a/src/Test/AdminView.java b/src/Test/AdminView.java index 7b2d547..dccbabb 100644 --- a/src/Test/AdminView.java +++ b/src/Test/AdminView.java @@ -47,6 +47,7 @@ public class AdminView extends BFrame { addStudGrup.setActionCommand("TODO"); this.add(addStudGrup, settings); + this.setResizable(false); this.openBFrame(); this.refreshBFrame(); } diff --git a/src/Test/BFrame.java b/src/Test/BFrame.java index dd7dc9a..fe3ae02 100644 --- a/src/Test/BFrame.java +++ b/src/Test/BFrame.java @@ -117,6 +117,7 @@ public class BFrame extends JFrame { frame.getContentPane().add(scrollPane); scrollPane.setViewportView(content); + frame.setResizable(false); frame.setVisible(true); } diff --git a/src/Test/Controller.java b/src/Test/Controller.java index 0556c46..dcbf820 100644 --- a/src/Test/Controller.java +++ b/src/Test/Controller.java @@ -3,17 +3,16 @@ package Test; import API.Etudiant; import API.Groupe; -import javax.swing.JTable; -import javax.swing.JOptionPane; +import javax.swing.*; import javax.swing.event.ListSelectionEvent; -import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionListener; import javax.swing.table.TableModel; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Objects; -import javax.swing.JPanel; +import java.util.Arrays; public class Controller implements ActionListener, ListSelectionListener { private final BDatabase db; @@ -97,6 +96,21 @@ public class Controller implements ActionListener, ListSelectionListener { BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal); } + /** + * Pour afficher une modale classique pour plus de liberte (panel a creer au prealable) + * + * @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 forModal Le panel a mettre dans la fenetre (libre) + * */ + private void DisplayModal(BFrame parent, String frameTitle, int size_x, int size_y, int loca_x, int loca_y, JPanel forModal, Object... data) { + BFrame frame = new BFrame(frameTitle, loca_x, loca_y, size_x, size_y, parent, forModal); + } + @Override public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); @@ -262,19 +276,42 @@ public class Controller implements ActionListener, ListSelectionListener { @Override public void valueChanged(ListSelectionEvent e) { - int[] cell; - Object value; + if(!e.getValueIsAdjusting()) { + int[] cell = this.currentJTableUse.getSelectedRows(); + int collumnCount = this.currentJTableUse.getColumnCount(); + Object value; + System.out.println(e.getSource()); - if (!e.getValueIsAdjusting()) { - cell = this.currentJTableUse.getSelectedRows(); - if (cell.length > 0) { - for (int i=0; i < 3; i++) { + if(cell.length > 0) { + for(int i = 0; i < collumnCount; i++) { TableModel tm = this.currentJTableUse.getModel(); value = tm.getValueAt(cell[0], i); - System.out.print(value + " "); - } - System.out.println(); + if(Objects.equals(value, "[DEPLACER]")) { + JPanel forModal = new JPanel(new GridBagLayout()); + BLayout settings = new BLayout(); + + JLabel l = new JLabel("test"); + forModal.add(l); + + DisplayModal( + this.av, + "Deplacer l'eleve : " + tm.getValueAt(cell[0], 0) + " " + tm.getValueAt(cell[0], 1), + 500, + 250, + this.av.getX(), + this.av.getY(), + forModal, + + /** + * Position toujours similaire { cell[0] = Nom (String), cell[1] = Prenom (String), cell[2] = Groupe (String) } + */ + tm.getValueAt(cell[0], 0), + tm.getValueAt(cell[0], 1), + tm.getValueAt(cell[0], 2) + ); + } + } } } } diff --git a/src/Test/ProfView.java b/src/Test/ProfView.java index df46694..288d734 100644 --- a/src/Test/ProfView.java +++ b/src/Test/ProfView.java @@ -116,6 +116,7 @@ public class ProfView extends BFrame { searchTLetters.setActionCommand("pv::SearchStudentPer3Letters"); this.add(searchTLetters, settings); + this.setResizable(false); this.openBFrame(); this.refreshBFrame(); }