From 81cb9ac1dd561dc4902766f642c875be523d8330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Wed, 18 Jan 2023 14:52:50 +0100 Subject: [PATCH] Initial --- .idea/.gitignore | 8 ++ .idea/libraries/lib.xml | 10 ++ .idea/misc.xml | 6 + .idea/modules.xml | 8 ++ .idea/uiDesigner.xml | 124 ++++++++++++++++++ .idea/vcs.xml | 6 + Capteur.iml | 13 ++ READ_ME.txt | 3 + out/production/Capteur/Main.class | Bin 0 -> 516 bytes .../Capteur/application/ImageController.class | Bin 0 -> 294 bytes .../Capteur/application/MainController.class | Bin 0 -> 291 bytes .../application/SpinnerController.class | Bin 0 -> 300 bytes out/production/Capteur/fxml/ImageWindow.fxml | 52 ++++++++ out/production/Capteur/fxml/MainWindow.fxml | 20 +++ .../Capteur/fxml/SpinnerWindow.fxml | 29 ++++ out/production/Capteur/launcher/Console.class | Bin 0 -> 1166 bytes .../Capteur/launcher/LaunchMeteo.class | Bin 0 -> 1310 bytes out/production/Capteur/model/Capteur.class | Bin 0 -> 1888 bytes .../Capteur/model/GenerateurAleatoire.class | Bin 0 -> 1136 bytes .../Capteur/model/GenerateurStrategy.class | Bin 0 -> 157 bytes out/production/Capteur/model/Observable.class | Bin 0 -> 1062 bytes .../Capteur/model/Observateur.class | Bin 0 -> 132 bytes out/production/Capteur/model/Thread.class | Bin 0 -> 255 bytes .../Capteur/view/AfficheurTemperature.class | Bin 0 -> 1434 bytes out/production/Capteur/view/ImageWindow.class | Bin 0 -> 2089 bytes out/production/Capteur/view/MainWindow.class | Bin 0 -> 1513 bytes .../Capteur/view/SaisiseurTemperature.class | Bin 0 -> 1566 bytes .../Capteur/view/SpinnerWindow.class | Bin 0 -> 2130 bytes .../Capteur/view/Visualisateur.class | Bin 0 -> 572 bytes resource/fxml/ImageWindow.fxml | 52 ++++++++ resource/fxml/MainWindow.fxml | 20 +++ resource/fxml/SpinnerWindow.fxml | 29 ++++ src/Main.java | 5 + src/application/ImageController.java | 4 + src/application/MainController.java | 4 + src/application/SpinnerController.java | 4 + src/launcher/Console.java | 23 ++++ src/launcher/LaunchMeteo.java | 26 ++++ src/model/Capteur.java | 67 ++++++++++ src/model/GenerateurAleatoire.java | 42 ++++++ src/model/GenerateurStrategy.java | 5 + src/model/Observable.java | 18 +++ src/model/Observateur.java | 4 + src/model/Thread.java | 4 + src/view/AfficheurTemperature.java | 19 +++ src/view/ImageWindow.java | 46 +++++++ src/view/MainWindow.java | 39 ++++++ src/view/SaisiseurTemperature.java | 22 ++++ src/view/SpinnerWindow.java | 46 +++++++ src/view/Visualisateur.java | 16 +++ 50 files changed, 774 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/libraries/lib.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml create mode 100644 Capteur.iml create mode 100644 READ_ME.txt create mode 100644 out/production/Capteur/Main.class create mode 100644 out/production/Capteur/application/ImageController.class create mode 100644 out/production/Capteur/application/MainController.class create mode 100644 out/production/Capteur/application/SpinnerController.class create mode 100644 out/production/Capteur/fxml/ImageWindow.fxml create mode 100644 out/production/Capteur/fxml/MainWindow.fxml create mode 100644 out/production/Capteur/fxml/SpinnerWindow.fxml create mode 100644 out/production/Capteur/launcher/Console.class create mode 100644 out/production/Capteur/launcher/LaunchMeteo.class create mode 100644 out/production/Capteur/model/Capteur.class create mode 100644 out/production/Capteur/model/GenerateurAleatoire.class create mode 100644 out/production/Capteur/model/GenerateurStrategy.class create mode 100644 out/production/Capteur/model/Observable.class create mode 100644 out/production/Capteur/model/Observateur.class create mode 100644 out/production/Capteur/model/Thread.class create mode 100644 out/production/Capteur/view/AfficheurTemperature.class create mode 100644 out/production/Capteur/view/ImageWindow.class create mode 100644 out/production/Capteur/view/MainWindow.class create mode 100644 out/production/Capteur/view/SaisiseurTemperature.class create mode 100644 out/production/Capteur/view/SpinnerWindow.class create mode 100644 out/production/Capteur/view/Visualisateur.class create mode 100644 resource/fxml/ImageWindow.fxml create mode 100644 resource/fxml/MainWindow.fxml create mode 100644 resource/fxml/SpinnerWindow.fxml create mode 100644 src/Main.java create mode 100644 src/application/ImageController.java create mode 100644 src/application/MainController.java create mode 100644 src/application/SpinnerController.java create mode 100644 src/launcher/Console.java create mode 100644 src/launcher/LaunchMeteo.java create mode 100644 src/model/Capteur.java create mode 100644 src/model/GenerateurAleatoire.java create mode 100644 src/model/GenerateurStrategy.java create mode 100644 src/model/Observable.java create mode 100644 src/model/Observateur.java create mode 100644 src/model/Thread.java create mode 100644 src/view/AfficheurTemperature.java create mode 100644 src/view/ImageWindow.java create mode 100644 src/view/MainWindow.java create mode 100644 src/view/SaisiseurTemperature.java create mode 100644 src/view/SpinnerWindow.java create mode 100644 src/view/Visualisateur.java diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml new file mode 100644 index 0000000..d037a4e --- /dev/null +++ b/.idea/libraries/lib.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..7464918 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..826633f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Capteur.iml b/Capteur.iml new file mode 100644 index 0000000..e9ed9b1 --- /dev/null +++ b/Capteur.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/READ_ME.txt b/READ_ME.txt new file mode 100644 index 0000000..46a955d --- /dev/null +++ b/READ_ME.txt @@ -0,0 +1,3 @@ +-instancier FXMLLoader +-FXMLLoader.set'Controller' +-FXMLLoader.load \ No newline at end of file diff --git a/out/production/Capteur/Main.class b/out/production/Capteur/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..f47a8f7f6196b8eb3ff22eab0c609c57b30d049b GIT binary patch literal 516 zcmZvZ%TB^T6o&tSLTRmnAb3}B1upE;1x6Pp#znm(7&fj3nBb6U$COs%W9dQ@7e0Uw zWjs?%)PzaqOwNDK|IO|5>-_`33HDs%khfuZD4@ttneYehD;|ygtHDGJ6NciEjAU}m zkZ*VT4oYxrxE>bZ{cG<%O%oAPmrlu44>FL{{&g&)q?g2khuspE7`$_#lx{xiSdCgP zDpQ<7NjWsEo$lPTxj@!Mfm*I;>MY5)9=)M&dFJ2O_@V z14T+T&_k~JJeDT^5v}A-PU(t)F?Y!wW{^hvcHTZz=kb{OYjesBZcnH2P@GA#onwdx z<~nGhPLFIx4$M3=#Z}6DS{bc{{Wq}Zth`3iltFWyqBm>61~w^ku!U_>jQKEwk@f<+ cy7-FnFTi{$kf)!r{y-e;V3%};CdC|D-Y5PfqWIX$BZVkZ`MYLWW^iWUJuIFdq1KX)$Y9-G~;+4#Rw1uXml{wQ%a zSXnp&Z|1#$H#1+~AD;joFfNfGEszb7V?Y@9{LYnO+g0@Dh7mh$8(nU0MK*4@Dh2S-RE3Oa<+0Y&Zuf=CgG>J*Bg^n1sOI9hg3n@#?U3WXH1>?8vHkt?`2}ExQHca;fvk@lJ;G?C_Np?Ma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/Capteur/fxml/MainWindow.fxml b/out/production/Capteur/fxml/MainWindow.fxml new file mode 100644 index 0000000..037eae1 --- /dev/null +++ b/out/production/Capteur/fxml/MainWindow.fxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/out/production/Capteur/launcher/Console.class b/out/production/Capteur/launcher/Console.class new file mode 100644 index 0000000000000000000000000000000000000000..57648dde83389e872296a6649a851944aecb0971 GIT binary patch literal 1166 zcmZ`&+fo`q5Iv*Z#8njVf|{t2B#WYp=4QZn2}F}B)CVoADDyJlxQ+#jwY!+gXXQmI zp(>TqFS$|WmTByl z&qc*$2&_p^M5JRF?KM_@9M_9tRl(i5v_;@ooM7n-Y!=#!FoGCV z;1LGDUMMJtVTOS=M4n%$`ys>_eECdfIgBBUsPIt+LoeR2IdE-hnYrTK)O1c1%&$2G zJWkv$rTAiOou10d86h8v+Jz$7utf+H3_YAujA2Tpc*KzGo}xpIa6_0@7gvIqy~aP_ z(vi+x{5cA92!94ss*YzGoTlWk=YTo>&Z{dZ&zAr<6zCnb)v@G(*2B-0RX9 zru00sZT2PE%YIud$)FX#G(xz_cUaMAVB&xh& zk(joTuUk&NDpadz02m@gX^Fi?tt{+AURI81v0mZTBW_Ez?;QHvGwCSbU7#Ex)wr~j zBFFc8ojM{vw@tbmd%#U%o19_to-+TZk?T9X{*pI*P;b~3u`N}t zT1Sp0HKdru8+u9V>j9~V0NJ;+Gw9Fg@1Jjiee>K|vdRsFkt3_M1F(j7wClqCv4x>hG`i44e7A+MQZ$inVsg)0K32=DuZ5XX^a-t#S$}%* z3QyAspJ)AK6aMrSQs1%2aD^8)oaTv-Vl#*VB*-QaL55~>4a3+%6g!Av7jYb8#N)l* v=7vr3g5vk^9(iJ(AR9x0gh*l)6Zn8$!bxMARz5Z(> literal 0 HcmV?d00001 diff --git a/out/production/Capteur/launcher/LaunchMeteo.class b/out/production/Capteur/launcher/LaunchMeteo.class new file mode 100644 index 0000000000000000000000000000000000000000..11edb2191327fabdc12a250540f6ea1f391c39ac GIT binary patch literal 1310 zcmZuxZBx@g5Pq(tq=YC~THX}oP3;R16~&h#3JAWX$WTNbKON;LVbY|NrUE~}ALN(9 z=#1lMf0W~1QfbR{GIO`LxBKiqd%OAb_s1^)&#|c?f-V(`jwrer#*g?{esE&&O2xK{ z+_zlESZT@(-Ak5Z`O6Glsr0Uf7W+v zE#L*;vz$_{5zi66@nPG{X&A(iieVii7-bl2Pz{1_e9D`q%lC!Hpx7id5&yflW*^ea zsklMB8aUOWaD=hNJ>mE&#u?&m7X^8(VGI+p)RPRuVa8PKR?nQQ>NI9l+|qFycUoY4 zUJ^z@u2k2m@B>7Kp-VV{nqXo`GembR-=?tB$m*EIT<94nsqmd@7KAr++?DO1R1e)_ z4fnC2;(?BbSY$}pyyg@Sg=d(7kQcsisWCz|)iw2{!&B@s=oQZ@bMLf4ArV+f`b}cF z0O!=LQR_@x+y{lVxl|jgu1Alw#T`Mm%9^`R#pp9FM{L&0d&1k{dp2p}rd#CpF83^X zZYUN1(4syZG&>O>v?wLwQQ($>wq%wj28!ppWRPsnEPV0+KxRr6YQGO3gh5+BDT<05 zsj7H27lxYrV<6cP)O@~?%QX%O24NG$EZ+V7!*>aeq2aC{nN9cQm$AR<& zPigN0(L^_`IXW4%Guoq>GqCT0*%Gbt8qn~JRy{PpGW{z+@(ZjGsC52DU<&Q&OdV?c zN*#UYNdCt4{7;O1o;}0O&FowqQ`vZ`j!d?W`DTDo3IQ5#8gLrLIL2wjXOKV&$slMZ z1a1VS5CIEfO4h4bqXb4seu;HTVS|tqO6(PS@CJ({$>bJj51F0gUNf-#*#X1kFw(~E NE#8ry!K5{U{68KoGH?I@ literal 0 HcmV?d00001 diff --git a/out/production/Capteur/model/Capteur.class b/out/production/Capteur/model/Capteur.class new file mode 100644 index 0000000000000000000000000000000000000000..6099dd2aaa10aa9c2148293584a2026dbc297e12 GIT binary patch literal 1888 zcma)+ZFAE`6ot<^j-ANLi}OYxKmuurtONwK&;~;w#0{7l+G&`~@C_wdTy<)gaK71V>)@@s*U$>N`=0NG8wx{KX?GMO7|p{lQGls1mV|G)hoO!Fg%R&yb3cr9 zLqSy~cHG2-1ZKPgnHEhzj^2EY1eN% zhe7L52jP*k<24T(y3&e>^=-OXz&Xt4ao)rQEGWz;JWsT*16PnJ%dvi>P^`%;6J-={U70^cv1)5V%J* zuN@j##*ma@#e{{D!bC&2(^3m;oApmh67Q2OWeHz3v4-ocZo8Y!h1yw}mJRN3Ox%=q zj`*$6d*kUKkK3$wuiW27zMr($u}*j4Z1K`AtF%Rr5WeR5`bE^-)4|I`YO2=ScN@EI z;K@8)%!c24Ol%_6Os!H@7_RHEdJs3E%2_*^Wv!~5k>ke~;*lAvbefOf86JP19e^(a z;}kg2YbzD{X#2RA;wSd13avoFo|`UG?aU4^mupaip_$h0hP0609O1Q9xJBCEL*zcQ_UpKa9`#{G78N`98$) zo_!2u|AKr6V|->`|BAf5+QFp#7iM0q{ed}!V_fWDkqgVOj`3*+*X*?p?4M)pJA7Ux z4Nyduce}u|r+K61F^dxBc-A?rb9R>zOUa4&0$*~*v*o{lJn|-tlF>Tf6GDfhd>giZ z!`M%J$v_Uv#fuBEpqT`uf(m8a=Zd7a!RU-c+Y3yrhbsSez#@}hiWTOPs4h}2E}|U# zfEuSkCf{>=KgjYxkcW7bZr*0J9BCv){T(-YFynDORtRHZl+}_NB|t_O$Vh9Xu!+Y5 zfEGUlS{n$oh0E#Y=V{}Maf4UV-VWfpNjKfXByRU{6}wzTday!Cg|DzZfXn`n>&`%~ zCwQ7}?sbgr>oZrjTMkL2|Km1f=>uwH{Dw<0D$nVxNhVR{0Yfs$Sm`3vTu$ Nq*5G(uNj&_?LVB@QpW%Q literal 0 HcmV?d00001 diff --git a/out/production/Capteur/model/GenerateurAleatoire.class b/out/production/Capteur/model/GenerateurAleatoire.class new file mode 100644 index 0000000000000000000000000000000000000000..3416c7d09ba91eda882c4b03b0db43fed92aebf5 GIT binary patch literal 1136 zcmZ`&+iuf95IviV-Q1frgoHGZ0wqogH9Uig01H$p0*O?S`sk!faFy7VYa@8#lMoW6 z5=eXiKf@mYGaKhZ6#OvW8STuujQ#WXw;uo=<3SoR#C0UHNJ10XJhk81=Gb;e=BvS} z90mf~Bgb`u1A(~F?x(PUl#X;38Ds@&6YoTh%@@*@z8%QWe=?SK;5oh&&b>wxNAVv#%L@l%sSz!Hg!b{*ANAcxjSAu%u4Pfj zwm{mI?}O}<$}YQ9p=ywsMK+#twIuzWY&^Fn_ppF6Chx@JH7JOVqkmly;Z6l1(naz4guqPI@< zByLb_Qg)0uWk8{G3DId?K<~6Kko!!f7>xl+NKi~sOjFDtPeX1}rAdv{hFiEzZ$2@M zP$ve8D;O<;IaE2YrC`b^F;E%hHBfni;$fQvT~tuhv0D+8z%K4YV@)E-kjc&$=%45? z<;#b4mF ziHX4nov_WI zN)NPS{YI(cw{6+QI5G~h9wv}e7#}`nAziO4Oc(lj17ym@He{<4eHal-SA$MiGtd3rv_x6twJtZ2 znB#!OIGTzdM~rKcyBJoGpv@WOx=K%pf5rdE%4evLy^uAoa!e;~a+PGU*BLB;w{V-Q zBtIjd6!BI*!C5`VSPZXEG2}^rG+d;5IQf2Tgd@0jaF<95_s&I}JOk0~H6+Z=N4)>9 z!6V|w8M`bTkC9iXkm+TG_sG+@uJ8>DTWiNyQuy%ahtQ8hB*;-I@JY-fgL!1J#8-Aw fbe8Z!UK(7E8hSw6MeG;S4rYFG))gMo6~m*ySx(j) literal 0 HcmV?d00001 diff --git a/out/production/Capteur/model/Observateur.class b/out/production/Capteur/model/Observateur.class new file mode 100644 index 0000000000000000000000000000000000000000..5966eab39dcd1ff4da847d45d139bcb2cff33759 GIT binary patch literal 132 zcmX^0Z`VEs1_pZuPId++Mh3y${FKxjegCB5)S|M)lGM^7b_Nzk27#=^vPAuy#JqH% zR90$o2_pkrX+a850V4ymhGrNe16OcjW`Mxb%5 P3~V4413QppV&DJ(c1Ipv literal 0 HcmV?d00001 diff --git a/out/production/Capteur/model/Thread.class b/out/production/Capteur/model/Thread.class new file mode 100644 index 0000000000000000000000000000000000000000..74ff14a25d3f760fa4788136bd46cf56b56b8c32 GIT binary patch literal 255 zcmYk0Jr06E5QX3HBZ~MFZ(yeuasZ7MCRRiX4gCTeU4xJycrPmx3lHF-jI(IrZt`}% zH`$r@dOw~3mgu`MU^=io*k};?Cvg>iDzbyWjZQKy35~hRRJkCSqjBh+fvg|6kVsS1VW%tKtvRa7HkU=?-z;}C?a45W?*m}#)s2#3V}4~Bqvq=#LrL% z(BZ)cAN?rDohCE1Qh3O@?!DIDd+nS*e@}h^c!{?vB8V!8X}E+ohMqlMp8x1`Ik+z1xdyaE2)lNN+3CUHl>lm;Dl8T#s4 zHkX>xsQQIBEz+U|b7oV)eTLpZfz_fboEi@#Pqi@ruM0Ap46!^lhTkBDC04vjQ8*i% z3hnonUE<~@cMN|Y9>(OZK}8rYoZFf?(%-9YQxFX5y6rh7v0(UkL#-Nl%FmhPo3m}{ zN{3h93At-;yYV)>Q0WhPrC`>VWR4+q+UkZ?v-gD_)H+aUftRH1958%oOgl6TKo_~S zZ3;J4u$i=24M35>*=}m}$;U0|<|81d8kN8hSeP;AHJ)ql% zwEIBkQJUk~A7I&uBPiL)BXoVM8$O~jff$V{jh*Nqpl)>GF`Xm>H$1^p+7UpVhSgU- zkx%~&Z6VDn`TKXH-_e^rB$7jP9b+(+9fe`^r5^zFENYcg_9JOhav^dSn36$163WS8TO)A?9h{}>H%RKt8 zI@6e$Fw^Ph{+0fRPR~lRv6(hA{os|fd+)jDp1t?_&%fXO4&Wh<66iv=4$VLhdIggE zwmdL5?ONS(?3xwGx-Zas-*)Zbfk1b9db1yW=+}`jFaSefICNO7SUd8C?Uua*0lj2Z zBgdga#Vbq4%tsqJ9p@Ng&)T=P56xOYA9G!;2@EO{BLWl6!;*BR=~zczJunx1yS!?- zG#f^@ihtg~1zaSt$UtDS@IF7r9T&J5n`|Fe9CQBVQla2kW$7ny372(D82A8_%tu)< zu)AZf6!&B)5a`>HLEf=yHG$FebQmcz2sd+mxJqy{gl*H|mfA?*8m{ZOVc>#drj87x?hq4*V1k1>w#~(JGnTZD+BZSS|OLf7}DyprUgb~^XA#~raGN5FpDg& zp+;!WV*(f2VWX^ak*#UqV`V!?+q~xnzUMefk}=#i@F_kM&>X5HaK0n)7(>ThO46bH zs^v>J(D8ZOJ%?AhuGR$ZVNQ|H35-XiR3U^0k!Q$j5MLU2fQOWxyh2Zbu`~AJHqHC+ zSfD2qUX@Yaz*9VnJU8sXp{gC}H&vxngIF-|m8yEJw(A|J!us04Hz)`U1hP_=q+?O3K~Y+6&8)^p z>yuL1kSODHrfgQH}F%hUUXy&SjQ`YnV51tupN_(_sLHB z=5oDKlzzm7wGr(mu!Zgfe!y!TZw&khOW;QA|K1!}twqjD}si7G5%aW-2KZEzd#41})gG zj1u3lh^8RClI3h#zOBCFO)c29L-@19kMKR=Tw}*HW4FyY9`~w#k{qhz&GQzwXdcl< z^P{$HT68psil7>%J;G^+(L3?%uq3OY0y^0JVS}2sXD+U^PH3e@y3HZ~3z2&3)iP&2 zch|#7G;gcahuf!_x?@bSMY{OE(an|9pKo1i5Qk6p4FrmO@8z=;T9GTtw2}P!3mQ*= zH<@FI%*@(}m^#MI^bzzE{~^Q+UN${TkP?L$3!BRqVp%7fFZdvW98Bho2ZBi`#Hep%i)Ix$qcg zndepf%%pw#Xq2JGU!7Qy1PkFFkYZAc4J`4YH?V$!EvEln1K*#LSAWaEO;S&XgbV`F eF(%ZmvcP_*xYGE42bg7m?7svMI3QdX4*vmz6%fh* literal 0 HcmV?d00001 diff --git a/out/production/Capteur/view/MainWindow.class b/out/production/Capteur/view/MainWindow.class new file mode 100644 index 0000000000000000000000000000000000000000..307724dff6b775bdf6f0361e4fd3833fbd7bd084 GIT binary patch literal 1513 zcmZ{kYg5xe6o%g|Euo?1Qm&PYf`Tn5K@o37zhhfCa;NVm%8*~iK zur1fIO>L#(y0(>3aSLM##$&jRI}AfI+iQFo+KSxGNeV-MDt(#j*$Fp^y9!bP4>k8yN-n8lt_OoE%k5VgWD42ZNvTRp(g>97y zQLDkhY01~gv=E-y6a7TVfk*zKSFl;0MNKVD~)C*ty5L7ZyxRijdB}^W0A&~ z??9iBC0a2oUj%Q`6PJF;sdFfMiRd}n_d0qJucEVx#1Hh;pQ18eq%a2eTMsWTnAdnWe6P@MuHx;MEXVQ36LFh$W^Qn>~gWz zNvOpWTBlhG#m_OjM`C?dJj~W5{EWxw_~Q-ucz~Bh*}x`^uLu#Qd85}*f}x) literal 0 HcmV?d00001 diff --git a/out/production/Capteur/view/SaisiseurTemperature.class b/out/production/Capteur/view/SaisiseurTemperature.class new file mode 100644 index 0000000000000000000000000000000000000000..710da952aaaa476f620bc77d81989edb021f22dc GIT binary patch literal 1566 zcmaJ>TT|0O6#lj?gw_C30Y$ukg0@wO7rYiPP(;*1(K2-$$A@iMA(AGUWK-pz_%qZ2 zba?Q=M}L&#*(M_`RvxmKlRe*e&Ueo4uitw=06fIY6k>>LNa*N7H^b5Qyul5N+v`TD z`d-u|L-&knoALoeJd>>?(SxLhl#V0N8AckW_+XT|>6^X?yj4+mg~w&!2|8{&b%u0t zAF(Vw(_YUjj6NOxILe^axGTw%p}$yn)`VpgLIa&jp7IP+%o2!plXSgXiFiS!+8x8Iwow`{6K2j*-=$$4GJ4NQ}q{sB1?nfYu*!!3q^utue-FT4g1n_{8^;DJ8L zRu~cmY8}-=rY)9(dR2IXs`y9Dmb- z(4iG0hyu5)vMEKr2hZt#y5`k zxJzRi2^v#09zl|T`p}DeWEl(HkjD(|2%t&Bnkz-5=158KYvlNQTA*tXl?&8`(kU^4Ts0lLM n1Wo>pI!Q16BZ7%zmH=XyLxJWVvdq)>3`N?dXtjhAUSQ-8eoKcJ literal 0 HcmV?d00001 diff --git a/out/production/Capteur/view/SpinnerWindow.class b/out/production/Capteur/view/SpinnerWindow.class new file mode 100644 index 0000000000000000000000000000000000000000..3038af9b5eaad0951335f4f6a5518073b6cc3c02 GIT binary patch literal 2130 zcmb7FZBrXn6n-v*ETl_;00k`4@}doC!fLgxl1gpUQmf%bLet_)>n2%XakCpY8(yk^ z${8DGWXAEcf5rdc_}tx1NTM?1Fzn5}=bY!9^W1aJ{o}7+e*VWuC~1tv8gwu6Z!c@)DO<`pcccn9wa z44uP=ke7(QWz?LyTQUUZ5^eZ-&o%A6Oz6@!Jnh+5E)&B967s?p1x7;krfjhwr8iZi zkmg0y2<u$K5DyZ|1$IP8^c{J%iuHQEC@=Lg0B!*`f&~76BR4CPx2X;Zz(X*rSBh8 zy&n&lYe>B;rL2lacpTVno1R5pI|yjzQ35M$Au^Rreo`tzLHrDHv zqTz1qM3WFsNw*5RYs!6i81eQ^!jI+r(b_Q|=%CLZf>PYP$Mc~`aa6XR!5KW+l((V_ zh8J}rZqVUPjgDTD9%OH|dpK`KTE`wAmyD{0p-K)We6SmtVFN1Ptz?Tz9!f*?e#7;PY#=IK(p zf%kvM?d8ZB?(R%QPVw<_UuvqafqSX=rwu$zHL&`#AArg49nJz^l5VFkz&Bw8S24}M zG~b2Wn87lxA&cwm^;x#y9D8COFR_3FTCD`3;(J)!F=#(EmMXO?u$fXCx8R^kDze1< z0WSTlQ(l9|r0cYakd{OK9}_E}Aj?%yGR~x)Hn7$}p1+g^b{cqf9=LqNfg2b@!Vg9b ejKW~r85cP5*_ZtOFYpw>)Bgf4@S0FP`0;NgSRV5L literal 0 HcmV?d00001 diff --git a/out/production/Capteur/view/Visualisateur.class b/out/production/Capteur/view/Visualisateur.class new file mode 100644 index 0000000000000000000000000000000000000000..a90741d591ef3bc8182d07758914e6d1f46b3228 GIT binary patch literal 572 zcmZWn%TB^j5IwgPDy2L{d@tPbNbCn-a6!VVk%gxF+j6593z$AI@vq!y;=&K`ql|Og zst`6aow?`CIWy_k_s1uIYn+?VP%xldD5AvBnDaHa1HQbsr`}xnF+=G}E@eDoD0F+S zi9M7Jm=-Fq7^;iaOa%6rKgA*m8ESksn|hH5*F0- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resource/fxml/MainWindow.fxml b/resource/fxml/MainWindow.fxml new file mode 100644 index 0000000..037eae1 --- /dev/null +++ b/resource/fxml/MainWindow.fxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..3e59c38 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,5 @@ +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/src/application/ImageController.java b/src/application/ImageController.java new file mode 100644 index 0000000..6f537ef --- /dev/null +++ b/src/application/ImageController.java @@ -0,0 +1,4 @@ +package application; + +public class ImageController { +} diff --git a/src/application/MainController.java b/src/application/MainController.java new file mode 100644 index 0000000..d5391f7 --- /dev/null +++ b/src/application/MainController.java @@ -0,0 +1,4 @@ +package application; + +public class MainController { +} diff --git a/src/application/SpinnerController.java b/src/application/SpinnerController.java new file mode 100644 index 0000000..d32a7df --- /dev/null +++ b/src/application/SpinnerController.java @@ -0,0 +1,4 @@ +package application; + +public class SpinnerController { +} diff --git a/src/launcher/Console.java b/src/launcher/Console.java new file mode 100644 index 0000000..5eb98cc --- /dev/null +++ b/src/launcher/Console.java @@ -0,0 +1,23 @@ +package launcher; + +import model.Capteur; +import model.GenerateurAleatoire; +import view.AfficheurTemperature; +import view.SaisiseurTemperature; + +import java.util.Random; + +public class Console { + public static void main(String[] args) { + GenerateurAleatoire ga = new GenerateurAleatoire(-5,40); + Capteur C001 = new Capteur("C001", ga); + AfficheurTemperature a1 = new AfficheurTemperature("a1", C001); + AfficheurTemperature a2 = new AfficheurTemperature("a2", C001); + SaisiseurTemperature s1 = new SaisiseurTemperature("s1", C001); + C001.addObservateur(a1); + C001.addObservateur(a2); + C001.addObservateur(s1); + s1.sasir(C001.getStrategy().genereTemperature()); + } +} + diff --git a/src/launcher/LaunchMeteo.java b/src/launcher/LaunchMeteo.java new file mode 100644 index 0000000..95ffea5 --- /dev/null +++ b/src/launcher/LaunchMeteo.java @@ -0,0 +1,26 @@ +package launcher; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.layout.BorderPane; +import javafx.stage.Stage; + +public class LaunchMeteo extends Application { + private Stage primaryStage; + private BorderPane layout; + + @Override + public void start(Stage primaryStage) throws Exception { + Parent root = FXMLLoader.load(getClass().getResource("/fxml/MainWindow.fxml")); + Scene scene = new Scene(root); + primaryStage.setScene(scene); + primaryStage.setTitle("Title"); + primaryStage.show(); + } + + public static void main(String[] args) { + launch(args); + } +} \ No newline at end of file diff --git a/src/model/Capteur.java b/src/model/Capteur.java new file mode 100644 index 0000000..1ef99ba --- /dev/null +++ b/src/model/Capteur.java @@ -0,0 +1,67 @@ +package model; + +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.SimpleDoubleProperty; + +import java.util.ArrayList; + +public class Capteur extends Observable implements Runnable{ + private static int idActuel; + private int id; + private String nom; + private DoubleProperty temperature; +// private Thread thread; + private GenerateurStrategy strategy; + + + public Capteur(String nom, GenerateurStrategy strategy) { + this.id = idActuel; + idActuel += 1; + this.nom = nom; + this.temperature = new SimpleDoubleProperty(strategy.genereTemperature()); + this.lesObservateurs = new ArrayList<>(); + this.strategy = strategy; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getNom() { + return nom; + } + + public void setNom(String nom) { + this.nom = nom; + this.notifier(); + } + + public DoubleProperty getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = new SimpleDoubleProperty(temperature); + this.notifier(); + } + + public GenerateurStrategy getStrategy() { + return strategy; + } + + public void setStrategy(GenerateurStrategy strategy) { + this.strategy = strategy; + } + + public void setGenerateur(GenerateurStrategy strategy){ + this.strategy = strategy; + } + + @Override + public void run(){} + +} diff --git a/src/model/GenerateurAleatoire.java b/src/model/GenerateurAleatoire.java new file mode 100644 index 0000000..5a709b0 --- /dev/null +++ b/src/model/GenerateurAleatoire.java @@ -0,0 +1,42 @@ +package model; + +import java.util.Random; + +public class GenerateurAleatoire implements GenerateurStrategy{ + private double bornInf; + private double bornSup; + + public GenerateurAleatoire(double bornInf, double bornSup) { + this.bornInf = bornInf; + this.bornSup = bornSup; + } + + public GenerateurAleatoire(){ + this.bornInf = Double.MIN_VALUE; + this.bornSup = Double.MAX_VALUE; + } + + public double getBornInf() { + return bornInf; + } + + public void setBornInf(double bornInf) { + this.bornInf = bornInf; + } + + public double getBornSup() { + return bornSup; + } + + public void setBornSup(double bornSup) { + this.bornSup = bornSup; + } + + @Override + public double genereTemperature() { + Random random = new Random(); + double temperature; + temperature = bornInf+random.nextDouble(bornSup-bornInf); + return temperature; + } +} diff --git a/src/model/GenerateurStrategy.java b/src/model/GenerateurStrategy.java new file mode 100644 index 0000000..5d858ac --- /dev/null +++ b/src/model/GenerateurStrategy.java @@ -0,0 +1,5 @@ +package model; + +public interface GenerateurStrategy { + public double genereTemperature(); +} diff --git a/src/model/Observable.java b/src/model/Observable.java new file mode 100644 index 0000000..ed64a28 --- /dev/null +++ b/src/model/Observable.java @@ -0,0 +1,18 @@ +package model; + +import java.util.List; + +public abstract class Observable { + public List lesObservateurs; + public void addObservateur(Observateur observateur){ + this.lesObservateurs.add(observateur); + } + public void deleteObservateur(Observateur observateur){ + this.lesObservateurs.remove(observateur); + } + public void notifier(){ + for (Observateur observateur : lesObservateurs){ + observateur.update(); + } + } +} diff --git a/src/model/Observateur.java b/src/model/Observateur.java new file mode 100644 index 0000000..a7b1853 --- /dev/null +++ b/src/model/Observateur.java @@ -0,0 +1,4 @@ +package model; +public interface Observateur { + void update(); +} diff --git a/src/model/Thread.java b/src/model/Thread.java new file mode 100644 index 0000000..6250eb8 --- /dev/null +++ b/src/model/Thread.java @@ -0,0 +1,4 @@ +package model; + +public class Thread { +} diff --git a/src/view/AfficheurTemperature.java b/src/view/AfficheurTemperature.java new file mode 100644 index 0000000..3e6ba5f --- /dev/null +++ b/src/view/AfficheurTemperature.java @@ -0,0 +1,19 @@ +package view; + +import model.Capteur; +import model.Observateur; + +public class AfficheurTemperature implements Observateur { + private String nom; + private Capteur capteur; + + public AfficheurTemperature(String nom, Capteur capteur) { + this.nom = nom; + this.capteur = capteur; + } + + @Override + public void update() { + System.out.println("["+this.nom+"] "+this.capteur.getNom() + " : " + this.capteur.getTemperature() + " °C"); + } +} diff --git a/src/view/ImageWindow.java b/src/view/ImageWindow.java new file mode 100644 index 0000000..cab55de --- /dev/null +++ b/src/view/ImageWindow.java @@ -0,0 +1,46 @@ +package view; + +import javafx.beans.property.Property; +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.GridPane; +import javafx.stage.Stage; +import javafx.util.converter.NumberStringConverter; +import model.Capteur; +import model.GenerateurAleatoire; +import java.io.IOException; + +public class ImageWindow extends Visualisateur{ + private Capteur capteur; + private GridPane layout; + @FXML + private Label temperature; + + public ImageWindow(Capteur capteur) throws IOException { + this.capteur = capteur; + Stage stage = new Stage(); + layout = new GridPane(); + FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/ImageWindow.fxml")); + loader.setRoot(this.layout); + loader.setController(this); + Parent root = loader.load(); + Scene scene = new Scene(root); + stage.setScene(scene); + stage.setTitle("Image"); + stage.show(); + } + + @FXML + public void initialize(){ + temperature.textProperty().bindBidirectional(this.capteur.getTemperature(), new NumberStringConverter()); + } + + @Override + public void update() { + temperature.textProperty().bindBidirectional(this.capteur.getTemperature(), new NumberStringConverter()); + } +} diff --git a/src/view/MainWindow.java b/src/view/MainWindow.java new file mode 100644 index 0000000..78980c5 --- /dev/null +++ b/src/view/MainWindow.java @@ -0,0 +1,39 @@ +package view; + +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.layout.GridPane; +import javafx.stage.Stage; +import model.Capteur; +import model.GenerateurAleatoire; + +public class MainWindow { + @FXML + private Button btnSpinner; + @FXML + private Button btnImage; + @FXML + private Button btnFermer; + protected Capteur capteur; + + public void initialize(){ + this.capteur = new Capteur("a", new GenerateurAleatoire(0,12)); + } + @FXML + private void clickButtonFermer(){ + Stage stage = (Stage) btnFermer.getScene().getWindow(); + stage.close(); + } + + @FXML + private void clickButtonImage() throws Exception{ + ImageWindow Iw = new ImageWindow(this.capteur); + } + @FXML + private void clickButtonSpinner() throws Exception{ + SpinnerWindow Sw = new SpinnerWindow(this.capteur); + } +} diff --git a/src/view/SaisiseurTemperature.java b/src/view/SaisiseurTemperature.java new file mode 100644 index 0000000..0c668bd --- /dev/null +++ b/src/view/SaisiseurTemperature.java @@ -0,0 +1,22 @@ +package view; + +import model.Capteur; +import model.Observateur; + +public class SaisiseurTemperature implements Observateur { + private String nom; + private Capteur capteur; + + public SaisiseurTemperature(String nom, Capteur capteur) { + this.nom = nom; + this.capteur = capteur; + } + + @Override + public void update() { + System.out.println("["+this.nom+"] "+this.capteur.getNom() + " : " + this.capteur.getTemperature() + " °C"); + } + public void sasir(double temp){ + this.capteur.setTemperature(temp); + } +} diff --git a/src/view/SpinnerWindow.java b/src/view/SpinnerWindow.java new file mode 100644 index 0000000..06a67b0 --- /dev/null +++ b/src/view/SpinnerWindow.java @@ -0,0 +1,46 @@ +package view; + +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Spinner; +import javafx.scene.layout.GridPane; +import javafx.stage.Stage; +import javafx.util.converter.NumberStringConverter; +import model.Capteur; + +import java.io.IOException; + +public class SpinnerWindow extends Visualisateur{ + @FXML + private Spinner spinner; + protected Capteur capteur; + private GridPane layout; + + public SpinnerWindow(Capteur capteur) throws IOException { + this.capteur = capteur; + Stage stage = new Stage(); + layout = new GridPane(); + FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/SpinnerWindow.fxml")); + loader.setRoot(this.layout); + loader.setController(this); + Parent root = loader.load(); + Scene scene = new Scene(root); + stage.setScene(scene); + stage.setTitle("Spinner"); + stage.show(); + } + @FXML + public void initialize(){ + spinner.getValueFactory().valueProperty().bindBidirectional(this.capteur.getTemperature()); + } + + @Override + public void update() { + spinner.getValueFactory().valueProperty().bindBidirectional(this.capteur.getTemperature()); + } +} diff --git a/src/view/Visualisateur.java b/src/view/Visualisateur.java new file mode 100644 index 0000000..df5ee6d --- /dev/null +++ b/src/view/Visualisateur.java @@ -0,0 +1,16 @@ +package view; + +import javafx.fxml.FXML; +import javafx.stage.Stage; +import model.Capteur; +import model.Observateur; + +public abstract class Visualisateur implements Observateur { + private void clickFermer(){ +// Stage stage = (Stage) .getScene().getWindow(); +// stage.close(); + } + private void intialize (Capteur c){ + c.addObservateur(this); + } +}