From 761e64756bd17ae0adbfbfd5b68c436f33497b96 Mon Sep 17 00:00:00 2001 From: Fastium <79766552+Fastium@users.noreply.github.com> Date: Wed, 18 May 2022 17:50:47 +0200 Subject: [PATCH] work together in school --- bin/BillGUI/BillGui.class | Bin 0 -> 1151 bytes bin/BillGUI/ButtonListenerBill.class | Bin 0 -> 570 bytes bin/BillGUI/ButtonListenerManager.class | Bin 0 -> 1184 bytes bin/BillGUI/ButtonQuitListener.class | Bin 628 -> 0 bytes bin/BillGUI/HesSoGarage.class | Bin 831 -> 863 bytes bin/BillGUI/Impression1.class | Bin 0 -> 1568 bytes bin/BillGUI/ManagerGui$1.class | Bin 0 -> 1996 bytes bin/BillGUI/ManagerGui$2.class | Bin 0 -> 878 bytes bin/BillGUI/ManagerGui.class | Bin 1981 -> 2665 bytes bin/BillGUI/Row.class | Bin 522 -> 522 bytes bin/GUI/ButtonListener.class | Bin 1126 -> 1126 bytes bin/GUI/GUI1.class | Bin 1320 -> 1320 bytes bin/GUI/GUI2.class | Bin 1497 -> 1497 bytes bin/GUI/Listener.class | Bin 1136 -> 1136 bytes src/BillGUI/BillGui.java | 58 ++++++++++++++++ src/BillGUI/HesSoGarage.java | 6 +- src/BillGUI/ManagerGui.java | 87 ++++++++++++++++-------- 17 files changed, 121 insertions(+), 30 deletions(-) create mode 100644 bin/BillGUI/BillGui.class create mode 100644 bin/BillGUI/ButtonListenerBill.class create mode 100644 bin/BillGUI/ButtonListenerManager.class delete mode 100644 bin/BillGUI/ButtonQuitListener.class create mode 100644 bin/BillGUI/Impression1.class create mode 100644 bin/BillGUI/ManagerGui$1.class create mode 100644 bin/BillGUI/ManagerGui$2.class create mode 100644 src/BillGUI/BillGui.java diff --git a/bin/BillGUI/BillGui.class b/bin/BillGUI/BillGui.class new file mode 100644 index 0000000000000000000000000000000000000000..e03197504113e0d3cd518fdd29d14a30f8b0db62 GIT binary patch literal 1151 zcmZWo?NZY~6g?Y?fizfJsDOYUAlRlrsPdr{QK%M+fnf$I)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~zSDlSGP<8GfqqZje;v73s>>3$o84XP(atYk?iau*-@)e rv9W+WZ>$SlIVTqRZsfVoxbdX1RXhxE_{)NREcgduh3^Tgp|J1;AX|AW literal 0 HcmV?d00001 diff --git a/bin/BillGUI/ButtonListenerManager.class b/bin/BillGUI/ButtonListenerManager.class new file mode 100644 index 0000000000000000000000000000000000000000..a064d34b3aa8c53f4d9dd26571536debac5f6c24 GIT binary patch literal 1184 zcmZuwT~8B16g|^cYRl5{QHviS;ulcReKJ0@X(C1%NL3=*_h}jGkY$%lXIn7w-M`~Q zW8#B9z#nD2GrKK??!!*zp1t?nbI;!W`|tN30I#u=MT%i{S9)IK%f7oCY907Z+0()o z>OJ>)SEwv94D+YF&s~rEUH4=ARCII}GgN3%KG3e{3tzi$I$B=UGo%hq7)ni(b>a2~ zlBy5(6h9MHV(fD-6o*RmG&fZ}hDDp{hFW@Vi+Ti#@^VMA>vJ6{!LTuvP>T>NY~R;{ z^j7OsHG4iuyq-`un)y>OuoZJ%u4vqNXoltHD5Ej?g1BdD(wDl z_B28AKvS%>vARhAIJ_>_G|9XTjzu16lpQQ!nIXNo)yje4o`W3n=JvqBTy$G?P{ce# zu_=A=Av|jf^_jOl@_w-ybhy{zN}4zZGy1Ef54SdMpSVHfS^0YP<@tzVIkMo!dPD-B zImqHRiQ#sy4uv`i)R{P@hOu!sSMQx!!>XB@k>r)gw&Wy+{8139j@XlCykh*}8=-t@ z_7#uFmoz=MkfC3NbkGT77-6$?OTnR&Y#YY~ipe}W)ATH0k#eHUC6oyHL9yW~Res@4 zWqXLbm7O8(S6&RU^3zs5q_a#N0Y#ZT>ZVaZh$Zx~Mrb9fCvEE#5mT(k+>DZx#f*kD z9@D)XBRSH_?7KPQGg%9GLWohdN3lWjBUMk0mK2PZf}P}ox?WPJZ&pLZnICJ&TW`p4 iJjX`N`N}c??22l}3iv)j!NwE}o7kfFj0QBVxBml4CJMs< literal 0 HcmV?d00001 diff --git a/bin/BillGUI/ButtonQuitListener.class b/bin/BillGUI/ButtonQuitListener.class deleted file mode 100644 index c78f901e30ced19f90c60c0e00fae332d52d9794..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 628 zcmZ`#$xg#C6dbpOw4o3vWiPbHwn*g20fbmY5h!c|dV+)78gP{+C~+vig~TFp-~;$5 z#B<6fmcz6C#&5sl@Na2_mC&*DZ-kZiK^3)M8Rwb(#qr0BwD(zY`UA=?# dfQc_fGsaJebM{Rw{i&8l0kgzrm?M4y#W#jhhy?%u diff --git a/bin/BillGUI/HesSoGarage.class b/bin/BillGUI/HesSoGarage.class index 1928a324b2b58a61e83fb2e1e20107392cda53b4..afe39d38c5471b9c801826ed2f30f4a9ee79e416 100644 GIT binary patch delta 159 zcmdnbcAss+6LBT!XyaV>#G=IXRE6BcJRnsh9c_?1@pC0(;N)CJ3o#$3%$yweP)~h` zB43D_%}W^h89AF6*cezD7#I{L?_rW+)Si5eNy%NFfs26~C}skYVNhUD1oAi-Bp8$! qlo=QqM7 z-0C{@h5=WcxWRfFn!PS{q2Xf zQmx$$RTOza=cWxyVCt!SAzziEmtLn;+G)s+@@Xu#-zYvLa86G39B%P60q(Ek4b-uY9z5I<;qnD7cpbw zl0Y``zFpbHEan8pTPm)#$w%w)tw1_oFzNFyE}!y$=imZzF0NovU^EV8C-P;i*nPfQ zEgXzOVA;he90zHvxVVPv0_RNS4c`}-IZK?vfxu+l>!=6M+lMOL*F-qWdeD^qfebzU z?i;Q6i5Cf6s-Lj|oPlUjj)B%EdeD>V9tm6?xZW0nAy$_n5QF1Lx5|%ol|;J}q;i#k z<9o4eKHHVuKB-A*7N()XBaT!tb8)E6;hoyl`&B6%IJkw6ZQMR%JiS5h1cxp@!Fq2z zjl{@h%@+o=`duXMiUz*p;#1t^+D0linLRyoL!5^4w6o9Xa~B)9CopE*RZsc>_2fQ0 z(y&z*W7srr&P!0Kg#nS%O)~IlaCnyH1GXGX@QhfGZ0rimCu*NU6BxPUb-b8e&Gy>( z|Cih}kjB?89%zb!vv&4^=V4QAd3u-55B*Tw&}Fd9O-&<(3~b(@SC(g*_c6G%kMm{m zHG%WIeb2ZI|F7hJM8K|Dx~$<-P{jwdAa{HGV9hG#!it&mOZ7R30`6Ez#>7H*#9!^R~d1Q zG1o~kZ%7vDC2m4;0bAH6l7%^Zfg0;h@Uw$2iK(g0BK0pzSX9+U-Nr3W!^Q+pj^?XA w-7Ti+?wsOpXcSj}#nKzTQihZ!2P$Dvi&5&Jm73{ACnOwv!*OZMJ(IWpA7`&%mH+?% literal 0 HcmV?d00001 diff --git a/bin/BillGUI/ManagerGui$1.class b/bin/BillGUI/ManagerGui$1.class new file mode 100644 index 0000000000000000000000000000000000000000..4368c43328603378f5bd0a76fb061307d0deb9b1 GIT binary patch literal 1996 zcmZ`)TXWM^5dMy>M2Qix$rakT+|uBLi%3d=*1_b`Tnu&+;$T{6Nl%;;M@E)BlAJVs z=8y2ib34>@%1npn{*XTQy)$j;9z{xQVmu?C)$X1>-+p^`^~Zm|{SM$3YAPZO{j-K? zEz-#@Im7jYC7i&Iq0`$j+>z@PA{Tld#YmHV%CHPC z!?2cW=a8%LU9Q(X!__#StfD7|sUF@;y%%yTbDH8Q*1I%2XCvk54q5ML#7|bA;=08NrR= zJT9uZz>s*q4jM-ADMPm~MU{fgcnkxn>{t`*mCXv>kF<(Q6toFrH%2k0VH}qkRJUeW zbU7tA@`N9Bch8`d?-dU8=@_m;S8!1R3m4#R2W}PbDpK6QYGlo-s3eAkh zFp1AK+{7&kVOU{^Xlg7g8TmrPmy(ght_;1}Ov@yuG~59-iRv3ywkd^kU6(8$P;A)xszaCyo+Egb zc)Ew2iu(+GewwXj4S6gR)|%X5TGWMvwJ4FTYIq>iS6t&qp`ySL4@>2*bwe`oP(u+z z3@6LY{T##Bc&y?Z!W8alx$zpF;9E+kEXNP`#L{}+Zw-dgHl5yFHcEC&4&*tX@9%P#h@q4(BYSgI$+TSpl^5QQy`|zAO@=V*BXrQTj5lL_$tfk|Ok|=pubLNe&d!13lxHe?e^g%GEQr_f8Ql={%`$LqlWN%EW?3}T4f$zZycm(&ci4v_zT)-AdQ6l;@1W5|EX=fbDKj>ipBFR|K-|`h@ aQb(`@gH{Cx4{MqzGQ28HycJ~zk literal 0 HcmV?d00001 diff --git a/bin/BillGUI/ManagerGui$2.class b/bin/BillGUI/ManagerGui$2.class new file mode 100644 index 0000000000000000000000000000000000000000..a6f94684909750969bd97d85756253be315caceb GIT binary patch literal 878 zcmZ`%TTc@~6#k~I-LhS6#R^_P6pNPDxP})WYP>+80t*pAUVIwb0mf`+%+3__XPJ0O zeDDYOql{;^g_5*PGBansbNkLY^Y`EHKLDPi;UU9NS(b6!`mi2uam9~B((1|Tl7}3_ z?3re{XRTI|G*&2)4D1;4_E?(gGYS!%Sq@_~N&iABX`3C*cgN8!d= z!n>lmxX+MV(H$`XhGKv#$ot6RY5)({7^Z8NIh7)*#CETHAd)?P5DSLMNVj>s&lBn1 z12E?(Gfa))Q(Yp;#VS`?eeLR=N$VOzk)g!fR%-Q5B!@cbiVnkEpI69FZ75EJvf-Q5 zWYx)3l&j`efZM1rWHt_c+{LVi86r8FAizD$F?bzmK5IjTWNWS~jHH>g`b)Af_`AB7 zw8ffq<(Gz|c2~1@_3xPei95qc tev0o<;`bM#70#m-i0A|I&S9SXGkAz9-8n4aF&0VkN$0q@Ri~Z7!hi9)%TWLT literal 0 HcmV?d00001 diff --git a/bin/BillGUI/ManagerGui.class b/bin/BillGUI/ManagerGui.class index b394bfef4878e58946707921995edeea92e1752e..bc89d98bb30097f8988e5a17c2eff4c21cccd50b 100644 GIT binary patch literal 2665 zcmZ`)-BVLn5dR$@xglH>5VTQI@dJ}6rcysDv0A}Gg8@IlV9>T+!Yy14xiq-}m44UO ze%IE1I@5>FIMe6Om}FXJY#%%Q2ReQ9xzBwq{hgB#f~HKkXV31Q-95X%-Sfx4zdQhN z7hNKNNC7N8B=C@AZux;BmasqXIu+q=B?CJXs|zR%$NdoQ)z2bpe-te zA!FVN4UiEvuG?8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al 1981 zcmZuxO;B4^6#g#c@gO{;{Iw0OloqW?T1YKFtqJxA1Plh+k~SFX4=?b9*M|2nc_~m` zI_^5twF_rl>DHN&jCO``>2&SJjWaI0@6H+VyY~eM(jnY?-Z|%<-|w6k|NgoI;0nIh zQ76zoX6N%$_mZ(0(=k`9!c@uD5g`A8`N-Ui6*p{WB{n@-FxM=Bz)Hbh7U)VzVa(j{ zVpC+K%q_R%B?Po-N2zrx`TpaSnX~droOf4TTJf(FhqRJw^qyRD9V#}j7p$UZdbaBn z8Hw+$a>A3 z(IcQ2EiY|9X5?BpnT%wltk=Lef3M1kYssu$J!WR;(2#%;{$xKm9%c1UUp#LF=~TSkk>paj$UGX`ip$e`??}d`{(6vpB0f5v>b4 z%qnd5AB~kf&vhEHB*$vi-RRA6B?PgE!A5++Fz=LXhS{339c#9($L)WHQ7OuMDRk|kqh zoCgUG$YJ3e6P4Vsn)+|x2?<(t6U*x6T&SCyf!c47u0ty+dPEz~b~2i1f!d-zT0uwj zIgV#5IJu2bv`sv1tNXZ&Q&C=R_`QrX(LfpJsB=EszoRW`6@<4DjYgj#TE<24FJ&)Q zaCsZUq_1SjAFklNZH%hV3l&`3#&xNFy^Ndlk{Fdle>Se~j5O4bXg{JSq<3kT;{nP- z&oPk=1uB>-J;U`Wn51f%Q|@hTJFS`D3E%|n2PX7y<(gtQW_r7&=3N<_!f;i ggpLjM+kzmy1$6JS?+u3}I@bu!(C=fut;1LU0mz2e-T(jq diff --git a/bin/BillGUI/Row.class b/bin/BillGUI/Row.class index 69344f021938f61868815a6b2d07a2df36adc1b6..f5075da54a1e88f87c03f2cbb7fb88a29040b95f 100644 GIT binary patch delta 25 gcmeBT>0;S%osl=0frTN3L4YBZL7E|L@)Jfi08-@!5dZ)H delta 25 gcmeBT>0;S%osrjtfrY`9L4d)HL7KsR@)Jfi08Nnvl>h($ diff --git a/bin/GUI/ButtonListener.class b/bin/GUI/ButtonListener.class index 5ea8d2db7759de10004d4e3d81b457ae1e20af2c..3bad10c31a9bf4a37a52af1729d3ea2658e9b860 100644 GIT binary patch delta 51 zcmaFH@r+|bH#4UW0}F#L11E#tY+45kbU4CX*_D+WsjYX&z4+sURZ Fh5!>m2>t*7 delta 51 zcmaFH@r+|bH#4U;0}F!=11E#-W;3}y_v43#o)$ZGuf2I F5C9TY2=o8| diff --git a/bin/GUI/GUI1.class b/bin/GUI/GUI1.class index 24dff36a7694479e0e55e2c8527ac55c46544ff7..ed02c4ac1b8899d0c8947db351d86e70e731622d 100644 GIT binary patch delta 83 zcmZ3%wSsHIFJ@L=1~vx1$^V&G*a|SPFbFbmF$gh;FbFfqF^Dp#F^Dl}Ge|I)GDtDl mGe|RdGRQIn17#u^gH068QKp#T5? diff --git a/bin/GUI/GUI2.class b/bin/GUI/GUI2.class index 02a0620353f760a4af12c26a88357f0d179c3564..1924fb47fb828c9693791e3b6e221a8bd9f8f504 100644 GIT binary patch delta 87 zcmcb~eUp1bGYcy}0~>?D!45AEt3}Ort4B`y3KvJDSl0k<-n!%hwhQS6X n;=v%t5X_*!kjS9Okj|jYkjtRLP{N?fPz_Ysz@Ra?ku?GUS0D`X diff --git a/bin/GUI/Listener.class b/bin/GUI/Listener.class index feb560b47998cf0768fedec1d69ab0e28a26338d..180cf011281385d6a887c3d26cc210cf2552ef42 100644 GIT binary patch delta 51 zcmeys@quH*5@u051{MZ022KWh20jJ{24MzA1_=hI$vc@_c)b|78N3;k8GIP@82l!C Hv8Vw66>$lR delta 51 zcmeys@quH*5@u0b1{MZW22KV$20jLR24MyV1_=ho$vc@_cs&`o8N3*j8N3 prestations = new Vector<>(); + Vector valuePrestations = new Vector(); /** - * + * */ - public ManagerGui(String name, String logoFilePath, String[] prestationsName){ + public ManagerGui(String name, String logoFilePath, String[] prestationsName, GarageManager garageManager){ this.setSize(400,600); this.setLocation(600,200); this.setVisible(true); @@ -39,7 +43,6 @@ public class ManagerGui extends JFrame{ //Create rows for prestations for(String s : prestationsName){ prestations.add(new Row(s)); - } //add rows on the Jframe for(Row r : prestations){ @@ -48,16 +51,44 @@ public class ManagerGui extends JFrame{ } //Create and add button - JButton ButtonBill = new JButton("Show bill"); - JButton ButtonQuit = new JButton("Quit"); - this.add(ButtonBill); - this.add(ButtonQuit); - + JButton buttonBill = new JButton(buttonNameBill); + buttonBill.addActionListener(new ButtonListenerManager(valuePrestations, prestations, garageManager){ + /** + * + */ + @Override + public void actionPerformed(ActionEvent e){ + //Get the value of each spinner + for (int i = 0; i < prestations.size(); i++) { + int value = (int)prestations.elementAt(i).spinner.getValue(); + for (int j = 0; j < value; j++) { + valuePrestations.add(i); + } + System.out.println(value); + } + + new BillGui(garageManager.generateHTMLBill(valuePrestations)); + }; + }); + JButton buttonQuit = new JButton(buttonNameQuit); + buttonQuit.addActionListener(new ButtonListenerManager(this){ + /** + * + */ + @Override + public void actionPerformed(ActionEvent e){ + Jf.dispose(); + }; + }); - } + this.add(buttonBill); + this.add(buttonQuit); + } } + + /** * */ @@ -69,30 +100,32 @@ class Row { label = new JLabel(title); spinner = new JSpinner(); } - } + /** * */ -class ButtonQuitListener implements ActionListener { - JFrame Jf; - /** - * - * @param Jf - */ - ButtonQuitListener(JFrame Jf){ +class ButtonListenerManager implements ActionListener { + JFrame Jf; + Vector valuePrestations; + Vector prestations; + GarageManager garageManager; + + ButtonListenerManager(Vector valuePrestations, Vector prestations, GarageManager garageManager){ + this.valuePrestations = valuePrestations; + this.prestations = prestations; + this.garageManager = garageManager; + }; + + ButtonListenerManager(JFrame Jf){ this.Jf = Jf; - } - /** - * - * @param e - */ - @Override - public void actionPerformed(ActionEvent e){ - Jf.dispose(); } - + + @Override + public void actionPerformed(ActionEvent e){}; + } +