From 61a6cb9714c54de4e7749a2a1076d7028eccd1b7 Mon Sep 17 00:00:00 2001 From: marinamarina Date: Thu, 19 Dec 2013 02:20:06 +0000 Subject: [PATCH 1/5] Server GUI designed --- .gitignore~ | 4 + build/built-jar.properties | 4 +- build/classes/CM3033Tests/Client.class | Bin 3293 -> 3356 bytes build/classes/CM3033Tests/ClientApp$1.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp$2.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp$3.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp$4.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp$5.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp$6.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ClientApp.class | Bin 11650 -> 11670 bytes build/classes/CM3033Tests/Server.class | Bin 2134 -> 2198 bytes build/classes/CM3033Tests/StartServer.class | Bin 1511 -> 0 bytes build/classes/CM3033Tests/Test1.class | Bin 1194 -> 0 bytes .../classes/CM3033Tests/TestClientStart.class | Bin 882 -> 0 bytes build/classes/cm3033/lab2/ex3/Alarm.class | Bin 2559 -> 0 bytes build/classes/cm3033/lab2/ex3/Client.class | Bin 3914 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$1.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$2.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$3.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$4.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$5.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$6.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ClientApp$7.class | Bin 787 -> 0 bytes build/classes/cm3033/lab2/ex3/ClientApp.class | Bin 13666 -> 0 bytes build/classes/cm3033/lab2/ex3/HeartBeat.class | Bin 2502 -> 0 bytes .../classes/cm3033/lab2/ex3/MainAppEx3.class | Bin 1700 -> 0 bytes build/classes/cm3033/lab2/ex3/Server.class | Bin 2439 -> 0 bytes .../classes/cm3033/lab2/ex3/ServerApp$1.class | Bin 787 -> 0 bytes .../classes/cm3033/lab2/ex3/ServerApp$2.class | Bin 787 -> 0 bytes build/classes/cm3033/lab2/ex3/ServerApp.class | Bin 5609 -> 0 bytes src/CM3033Tests/ServerApp.form | 332 ++++++++++++++ src/CM3033Tests/ServerApp.java | 406 ++++++++++++++++++ 32 files changed, 744 insertions(+), 2 deletions(-) create mode 100644 .gitignore~ delete mode 100644 build/classes/CM3033Tests/StartServer.class delete mode 100644 build/classes/CM3033Tests/Test1.class delete mode 100644 build/classes/CM3033Tests/TestClientStart.class delete mode 100644 build/classes/cm3033/lab2/ex3/Alarm.class delete mode 100644 build/classes/cm3033/lab2/ex3/Client.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$1.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$2.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$3.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$4.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$5.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$6.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp$7.class delete mode 100644 build/classes/cm3033/lab2/ex3/ClientApp.class delete mode 100644 build/classes/cm3033/lab2/ex3/HeartBeat.class delete mode 100644 build/classes/cm3033/lab2/ex3/MainAppEx3.class delete mode 100644 build/classes/cm3033/lab2/ex3/Server.class delete mode 100644 build/classes/cm3033/lab2/ex3/ServerApp$1.class delete mode 100644 build/classes/cm3033/lab2/ex3/ServerApp$2.class delete mode 100644 build/classes/cm3033/lab2/ex3/ServerApp.class create mode 100644 src/CM3033Tests/ServerApp.form create mode 100644 src/CM3033Tests/ServerApp.java diff --git a/.gitignore~ b/.gitignore~ new file mode 100644 index 0000000..ab50f5e --- /dev/null +++ b/.gitignore~ @@ -0,0 +1,4 @@ +/build/ +/nbproject/private/ +.DS-Store +.gitignore diff --git a/build/built-jar.properties b/build/built-jar.properties index d863663..0af396a 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Wed, 18 Dec 2013 22:55:13 +0000 +#Thu, 19 Dec 2013 01:55:35 +0000 -/Users/samc/Desktop/CM3033= +/home/marina/NetBeansProjects/Coursework= diff --git a/build/classes/CM3033Tests/Client.class b/build/classes/CM3033Tests/Client.class index 59a9fb2f5b621a86a5c071799de8c0ea28aa4fe3..dac38dc1ad08e128c6f0842d4a56906ca71cb03a 100644 GIT binary patch delta 1727 zcmZvcc~n$&6vsb526!`%m*}W0E;#~jU}9lm?zvn@8IMB?1mgtxonVOmp zHIOXZP|IAIVM*K6%Cyz2(>Zlc{oh~xXJy?VgC76zyz}n8zk9!TdB1z_`!%zCH+oj4mjc=L>~H`P02&@7xvMpl`e) zd4fOS4^L9`8-9C??MY}zJR%wFwuGXkWh_>tlz7*a_ygktHIoU)k8 zG>g+5HE6Y%PE?U@|CgL@A8=$YiqU4#PKQCK#fO|xxI9$>Pjyu=?6Ek@M;0+Yw)liI z2A^7d#*>QPE4{Vee1BDbY0w`CFAVy_zM#c9&RdjmLFbrZrzRFgKIaRq`BIaM77sGh z;wvs$T-N1(t+N?(eZg8^aFWG0oU!;;hc~+K#Ndd96nKZ`(b)E~(k& z^oOQZR)u^Or_z#lC%7idA}AifWw$#A78c2Npc~W0r8iw%+SA3QL&B%%CJA?lUm0_S z&a;zTg=)S%(KRfxKrCq_2p!5o775obZS*M4yPy{2c9L42*K5$fF?zPrOCY_XxEra9OTC*2o}^EtlfLCK(%k7$ zGUArZDE;K%?tfD=Aj-ffcSac`K|SSh*xJ?DyO`YA>HbsF^0t$-pUApxe}w~ z=9Zr(IdNGl$)Xt%C9jd`+7@Nx1w8pu#Ely6if0teD3RhB?SPp+CSQ`o%N!ktXy-Vj z6^8`VZ&H-In^>N!k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;SM7t!N@?;Z6dJ%D%ntK6La&u6SP^9yL7+tp61L( z(xo}?MA>$NTvt2(1jBosZtrt$!SLSE&LnZsItQzfAv$id9@qa8C$26j5sPf|E^SMe z)0qtK6v?0!dR~daS0^>g37hJ;Iw4Poi*h;tQxw?E{YS)C2%^@@bv_`sxk(UlLXdEp z3b|g3_))O&8;|k_%T&5RemIqCG$A#PYBhR_L`z<$*&hD#ij(%_RON2|p=BH&iy znk!8#mMsW0djY&eys|L)n_mr7hTO@!nH&IPw+B=J diff --git a/build/classes/CM3033Tests/ClientApp$2.class b/build/classes/CM3033Tests/ClientApp$2.class index 0ac65a0dfe2d33bfc63986bd4f17cfcda2de143a..053c860d6acd8a7b123036969d58c7c356a4f9d4 100644 GIT binary patch delta 23 ecmey(`kQq_DHCJ)Z}%hPKJOnH&ISj0c|p delta 23 ecmey(`kQq_DHCJuszib+|Cb4Q4iLE|?iEj2XseHa0Uq!=0OF&+~kLzwh_iv)$kB@9K8Nhm{BF0wrq# zH5DRyPTpMK7@x1SqPDJfbpF3V@SV$R1`bO8|I~>IDRsHZYlGDx4|;l{{=cCxe00CY zM0zlgNCq(sFX<#PmJ}vfHkDE2TQ!di%J8v<21|ZVg)x?$z1|;vx?{T^;;_JkxIU@mY-B9ly!=r zS`*ly8EjG&o3)jCwbG#WMw)bj?K(rVuCqtCY0-W5>M^Z)!+w3@puW*'p*b~At@ z#>-KY%5js)Nt4YfQ$&aH(`hO>Yc_DsG;+!8<+3?U(463^InOl{FWk`zaSyhU z{x#yvOvrKfrl z!<|Nm(w*}oX1d2(mSI_}6O~lnKa)^RB3xMv(Nv~uTCgRlLpgaw+YUylz*@7Ir$YRi zLzjxUrDE==lt)@ZxBNU&8PBv_V-(Otl`C777OR|%BX1^F(?c8SqZ%SrN31q6Qd`K- zHnLPto*F1rlT(t?9JbTO*hQvxJ1tg7{!0*w*OX9RG-$+7VT^MI=_0Q=Ap(;v=rr4M35R1F*HF#o}eM-xCugH z9wVaiBo>0&AR>{*f{2BMVS$h!u@G?$v5}j6Ip;g~-0$SOhr(OK?VT}wO-rdru9;XH z3Wh=rOV_omEBRGRqhDguj4vhdzhVP%4aT%YBXJMA^iKNUxUgqQk4Pr5q~fC=gXvEZ zS(K8^Fmf3~fJx+2M*&R~vdpP16tjgA_7dc%yLo{jT&Ii9&#hVzLLd}pK* z7^M_OD~qwb15z*`KkxbAm_yOTjCwCpNjIvTSnWd8xKXw4ndww8!=XAFsb?`WS;Z_i z(!h3Rv!6LGz+BEbwVip~WIp!@)9IqVU;%Gg=!Puft8@Nfsp4r?FP3WRwaTFDx< zvR-@HphFQ_b%IU0$Y$MOn>yI82ej!4JM@N~`p7PQV~-L0Ojiz=WDc4%tSR7#Dd(se z&oMKDlP1h5)65yOnzJUtC9|8$<}g>x39g#Uw3{f`VqWshOBLP#>EA|dlYfF2OBZ?e zw7)_L_O-vt>+X1>Ez7>&uNPgF#31!1q-2`ZhqZ30ZR&4*Ip@7};*??UEo_3poCF;NXvYmRNs-bO+kQzj?=Bo@V_;YkvYF CeyE55 diff --git a/build/classes/CM3033Tests/Server.class b/build/classes/CM3033Tests/Server.class index 4a11730e3c881f6b6dd117468d2d699890aa0318..ee8e1f3770dc3e944e425414308f197fec004954 100644 GIT binary patch delta 1242 zcmZ9KOH5p46vuzxJh(HLOAFJMGA)!VeGjdph*qH;DzA#Af}qw>e9++nL+KqHE?BKH zKH6eiUvv_aYGPcNursN#Ge!~4nJdZmS;mG_2oJ3eqIws!o0wXAzm_hnGvlwY91AP&LqWH2q(n2{+$RhshMem zDGfbuFl}(bz+GByI_%C}IOk*)s!vgIJng2vgkr~`{;ARV(YWh)@!?GByyLa^E&V>| z_qmyTi<$_B#sxS#>5Sz+S1qPIY@nn$mH$;WR5jCTagak6hl%BVzGJzJ#SE`lG?Ue4 zRN3s}_sAXK{@MgXk8BysmGc z=VHn+XS{UA)j2=PclbND&2PN2CIKtwK)Z5y8L0w}PfK<(G;T;t{b53VbNwNwci^(PuWWudvi zu3M{r%dx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IehIn#Xb5wEk&1LVd#o64Dbb^FS;{^*3N#Y^NzEbeqAx47paw_VvS z*6@y@KDB^sYo{hJ$z-lq!TWb4Z996e86bDEqyu+k;sn;G)a6MP?<<#Zsz2_d$n*3S zjyoC1*yFx;D?9s9xaf-z%#$LVsSDR_Muylxt*KzoDtYaKW=yLKn$8&d^k))rbbd6su9A6TtIjJB=yl(3j it}{x4QNT=zV=M`Y8xr}qOrDe|Xc0Va(*5fgy!=0eo^u}n diff --git a/build/classes/CM3033Tests/Test1.class b/build/classes/CM3033Tests/Test1.class deleted file mode 100644 index f43fc8d3745539a561a7ad180a80a4d5096c9300..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1194 zcmZ{j&2H0B5QWc;ogce~w&@>`LV*^VG^GIamI06d~biDy($cUHheNpL$^w zw#2@ovf+pA86CyRXNF#sZt3-NDY%eE3AJ?-Auc68&DxOU)G_*A)J@u2tvB)-GZ;S$ zS*zcUkm8j?caXGio(#t$*Zbg0vu51GfxIpYi&(N?z_hR+#u9S}cNL(pe5-MVrJJ{W z+`Hm%@Pt#VaHu+tM2JsEq7|={i&rXgHL1yZqD;@`$}%YK{e=3?hXSf`P=R)Za;vl; zQ5-~Xjh@0fHfTlQfUBJ8KT!C}b(&v__cs2^6{TtJJ={-n-*J^X#o7dgZ1Eb4Z^i=a z)1X9v;c`v6BM%;HZfk$!I104`;MpS<$6P3epQY0GQ4!44c_}N*wAg^cHunnH`3Hbbm;nF) diff --git a/build/classes/CM3033Tests/TestClientStart.class b/build/classes/CM3033Tests/TestClientStart.class deleted file mode 100644 index 1e18af2bcd702a8d04f710e44907cfecff3defdd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 882 zcmZuvZBNrs6n<{kty>u|HW(_RAX5tr%G^hYiCKIh8Irh3viPYh&A4QAOWPR}f0dfJ z#3lX!f0XgLt%1pG)6;XFbIx;K?)~-q$4>xtJTozmEdvz;k8{Z5iHQ`Rn$Tbw*fwD# z#*Tqq6Q+u+8rT!iqMAUd**K{m)az|8j6z$<+Mz(^Ncu8*E|9Xe&jj?w;M@~fY)apI zJG$z6LEGu}i4>ay*Xf@*fmHTiP>(KTD6l@m+~`Zsk6MuvM697-Inoy>TOXR2&PT`Y zJATh@MS=8thjCFS=#i%MA2%CxV=mRfO>+Ap@SJl}=MwMh_s0U}%TKO1jO4%%4eSeK zkLXN>Gh2gE;Cip58f96{KGosA;?1LgC4s{28mv3Lwj?c&1uUuzTZsdKmD!jV!(kpZ z#kn-?jQ1|Eb{m`O=btW4yO*9DaXE2ga$p~yUXQ6(IMKFB*e7t zF{X$$zW3Qkg$=Az)9`?}PUIo7*tni&iyrmNO<;D$nEM7@735+mlc@@{Hfd>i^aluv BwOIfF diff --git a/build/classes/cm3033/lab2/ex3/Alarm.class b/build/classes/cm3033/lab2/ex3/Alarm.class deleted file mode 100644 index 2a876b48ca180801f00f9eaafaa2c66f99aab3c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2559 zcmZ`*Yf}?v6n>VF+p>y81Qai8(Gr3h6m2b7TP{JOksyg$t=2Bd8dj2QnrsAn{Sozx ze(ZF{Fa6NY7LBDkrd z3rkVx$f{VzEqPlJk`s~_a$Cq9A$KGAO4fTKdSAuYcp%${D#`XlXFJdtQL(rkGmU=U8C0qy=jPf0$Zpq$fb~|eptqf)gmC1?8Nd~)mA!%+-CTAoEx{4T*B4c9#;$mMdnr&9M zV^w%^pd(DlgL)xX$kSqRf`v7+u+He>Zjgc18Vj^9=NN_cn?}tKCM?$MCi5PTcUas` zd@r7a6fQLDb+bynZmas(X4&Fnp6t%rhZ?4nktT-uvgr0u&DqU*!CbJULaLkeIq8~) z30zii#OOA z!L!}=e!|ZRPWs|YS$!pyTh1=!Qu;!6MW39|bE&!P(tJ+Ap*^8TP_?tlu0AmfZ0{i- z7M*Ps0K{C;9aEy9r(`LlkM0ZOF^_iCq~`Ob9M$h6WSiVu{5t^ zoevP@LnM0D?l}$a%7JiKLY-?A3Mc10=>_gyq8kCOmlJQG zB;KLxUM%ni-7N$YZxL!CoKRYbBmyl&g{X<)7J3p#ThJ1*eJ$+&i@II>a)4e{(h=G_ zhCUp}5Ki#z6r(;ZgUHz&rPnxTZ44JFse68L37>Gs2;BTQrF@eNyBHzo(vS0^y9YuE z#ujaRm9G?-Uyx%jRyE2~%D1Y>Q2Q24`V-lcUSg5NYecqqV<-3$9N)r$7W&*g+r|fI z7A#Yk3HH+bFwN==R~!v^#(YP;h+zuTbfw4@;=4?`d$5+T5&eToUZp~0gW~OYgWK_5 z#TTBk(&xwfe3;tW@90fzAtu?YuP`jUp5MrGd%}ZP?9>(x^67tp^E_2wAfdz#y~Tjb ze}}<)Z!i=)yoDn??c=fq_HzF#T=JC8iPB4qDzT%xm5%LJk`e{nuFn#0z?X<%hP9tX zKjv{1DPneky-u_18D_dfi7Zc+Vc-^QIJBvB5JXmKj1-L`wXSQ&>uQ|aADX|k0dhCP`OfSS3AqoDH^xy%3`H=q_k6f1? z0Ef0+4$0?()@hTWo~3Y3xM{T5e oFkU0xtd4TLhp_-!hF{RNxVJ5Bx2-a5RX$)##!GCa-RQ6X4^$ZKi~s-t diff --git a/build/classes/cm3033/lab2/ex3/Client.class b/build/classes/cm3033/lab2/ex3/Client.class deleted file mode 100644 index a59ed1b18e696c5a844c32e99b20359c896f85c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3914 zcmaJ^`Fj-g8UM^=VJ6FPEf51iSwLu5Age@0<&Y#?!2}|KU;xEocL)Q!v&-&mNVG-m zWe-~DVQXkTYKOA3;IJXJpH^gyU74~c=F_Xz3=z)-tTwz zwJR^Y1fUWB4r2pc9ffLCqgTganfqkum*G(v9@FslFlSeWcW5{gh5=V7kIU)_8J?`> z@J?C1OIGg|>U(s&H;kw7J{|8D$_F%jFpQZvD#Q;}gvOn@`H|GcpW>aRQ&x@o5bwh4Ps&7U8o3^*IgCYB(i_pAVw}UkGCiAk1U&l9ed{f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classes/cm3033/lab2/ex3/ClientApp$2.class deleted file mode 100644 index a12efde64f9b9e297f4cd304ae42f495b2e73755..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 787 zcmaJ<+fLg+5Ivh1j9nMPwWScCtwAA3IE{INs!|kDsgm0wf%3j_wy?cHf(I#*kYK@FJ$I7 z7}lb=A2z};NO-pyh?_8ICsL@qH5eRG+Iy*F{()hmHX(1f!(g>_PcY0yQi(5D{jNyQ zcsHTQLZoA!ba*O_KMGo=JOdcKPfCfjo$xFZ6se9c<2Q-W9FKFU)rm;I>9j9;44bv+ zk`H;nuk%0*iFwc}QjU#%WT=(JFlShwl*Ztm>Z>#sAEn_u`&WZ~gH2_RRh;Nds`Jkx zztBA!uRXlMTMss7JUGVku}yN0Rnu=WR0^gESLeak?xl!{R`tK+BbnubbYWN>3rIB0 zaN4>*(29B`^~yEVugl|DWSRf2LGwMFG`LBU>~^q4>oY|&ng**>OsBL}CHft>6n#e4 z0r@84*7v@H)qkLLU*vdn(knWz@tjVtuwBezo;+F#ERGObBLt`Z0JirN<$nNf0ewql m?+TEW!god>hQ<<>38st{0xjVMUeayRroTdkEJM&SKk?+E?} z2?XMS58$H^XRQccNGy4GW;A=|%$fQ1`^QfJG46YCu;pU~+dekYcCq7P*TtT|YIUm1 zuqUvUq?5Q8$5AFnhmm?8M}tf&Q}w6QBc?spMpsV+b~;P)_J;z_ARjA%^+X%>;(Rhv z#Tz-w7`c+Lw5R58e8St>@_i_3&D39ZYt(z$u1inn<&QDcGK zPI4w^GLrAANX^JR>eng9);_Y-nrc=FY%fa_@L%WWMXH`^%X#gu1`jMY%O0CF%S&xe zo~!CKAG^36;12EvaB(4kXRQ$TDCa^o!&snIGtHzqiC&J*R7zUy|B_F1St;rwu(=SB zH0^K(`DB_K_Dc1d9ow%j(^QpZc-Z57A1xc)GD-G_*yH-Fa7L>Tt(NVSTh-w2!DsX$ zt%vk&#P1$_h3I}m<8z%8@Z>9=A8?6hP}@G%aG4&L0$1k<{W*fy{Q`0D9nF6LehvMR nWk1y*8@2DvK`f1HxK5ZRHVE3l4cz4IaMN$0MazVqp&!tXsyb^$@Y2MRcV|YkXU?3NKYxGy1`uN3frWJ!bJ%dPhN_KC8(TKE8RqkI znfXnI^(Y>O%`glS-g_O0t1##!QmDK=8XZ&G8>wXemSM9tBd^|NusXUg7#1U`#K((a zPo!UYFQLd%q+_0Rc`A)R30kH+0~oybN{O_S@GKJ)sZKBBw}{Xpk8`QjXOW)jbSU}^ zTeWDw$2{Pdc_7BbJZKjwC&oTD)XHLJRq~W}9ufd_grm`n0PIM;K z*$0uI>%NU054+g&VB?Vo$5=jIk(^W2^ji#-f@#9lS@5Yh5HZoJ{+E0tvs{oa3~N&X ziKZD&M-N9@QLm(4xn}xxc^r!@^TQ_1_h{DOW=T@-Vw=`yj%G9uR;idyX{$=~J8&ub zn5-80CgL^@zJoP>pmba0cy!V$Ip4!B3PQ0Neul phRS{`KvoLhnSdA?%Xm&OWvmcr2`{ipw?&)&5*4xxNsDg!{sGixu+RVi diff --git a/build/classes/cm3033/lab2/ex3/ClientApp$5.class b/build/classes/cm3033/lab2/ex3/ClientApp$5.class deleted file mode 100644 index 0759413681e8cbf75675716c1d685646fe175699..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 787 zcmaJ<+fLg+5Ivh1TpI(SPzr@`DF%fg;i!g}QdNo~DpfLVrJ}rVoGmPJb|c%Q{T@_4 z00~sYLqDJ&Rdv>i$_t4l@6L>7&zw0kfBruF1`uM$frS+p6IgYzjH-<_8|yYU7$);` znfVQdl_>6ojW7%n-gy&UY-#?`h5}z)6 z9g&{$PC}9Ak&b!N=BYIPFld?b3}Em+DkaiZ!m~_Jq&m8ce@KL8d7MkFzKHajPJ5!u zuwIKU_<#redme}ZF%OzW%CWJJ47IWt5A z>g+`1=elcS)5B|Qd9d-!gJUco+a%{mHT^?|O2IVY>MZ!&xezhYsy<0Rl36ZD7l!4L zfJD;_r=@#+t*BR0uUs?zx;&0WmiY$_n(y0jgBvHwZW|l4J`*&fNw7-AbV^%QqThi_ z(J8VH$TtzUzIO*!|Ao>`k>k-xujstOG@V{yyO_Zod9)OmA0jk|2u}SLZ0{cBM*z2g p{z+x83y{UacZMK_#sXdtOc{#=TEa^#(QVPDze0s9L(-y~zJKJbu=D@` diff --git a/build/classes/cm3033/lab2/ex3/ClientApp$6.class b/build/classes/cm3033/lab2/ex3/ClientApp$6.class deleted file mode 100644 index 08e6aecd68020e639cccb587c540f13f4248f785..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 787 zcmaJ<+fLg+5Ivh1TpJhCmQrp3THGoGsg5w^0T5CYfmF%8NT9rLoCOv+yOC`|zo}{; zkU*_?=m+$ps?J&wypUM(?#yWR%$YOu_ut(g03qHvu(0G}0?RHIP_?mQW7WnQ!(@Ig zGrz&G6ve%;5r#p+J6nPH76z?E3Y9ne{XI(CmrCXb3@f!Uc^hp8tEIbwVJ4DFe7@{; zM0&zI2}PbqI_626r_%Vtpk>N4fWiBylt^0%&oV)g>gY254iTE+aW1v`D$-M(_C%Lq zwH96Q0T1|99*6-k51K{Fp|ST2wXzuG49nxv7~Erhna1Ks8qU-A8oW2yRQ6ECiO!@t z`y}#n-L>)B!yBx7u<^u$V=NzUNzRdK`a2Ajf@#9lS@5NEA!4FceUyA8vs{oa3=1Ox ziKZD&OZWO(QLm(4xn}xxc^r!@^FK6bzPsZFH%^j`Hr8l;CTK>JV3msLl(wowzXO+| zQ)F$EZz67e^A@cB3#IEK$D@;8(fJ)u>GTTQ#WbFgM@xYhLxkoK!KvSXZT?320l+Pw pe^A+<1;||CJ3|mdV-_z7ri?iPE#VdB>9%Oo7f~V0khJKg??3U*u@3+M diff --git a/build/classes/cm3033/lab2/ex3/ClientApp$7.class b/build/classes/cm3033/lab2/ex3/ClientApp$7.class deleted file mode 100644 index b032c01cce8f8a2dda4fe0096afb8aa0c7a540b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hcm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li`6aL+d$xVT-85V7{i8u;0vzlss7u{?dGJ+Z?F)imN5X%QM3b3&fqUW5&jpxU z=+2cot4MQ>ucAV}no9T@oXl%!9A8IM_d@chxeJ_YuI)i3+MH2@OF=fm&F-g7V9S|C|`a+;d0=Og3CbN;{r?`aUY`K{T_1OD7aEA z0EAZYYL}dMZ=ZjBz}`Nn$qd}v>Wmkg4;jQT{QdN;=HRyv(d#b`pzxB1g5Ss$@F4)z zxXUkft)sYn<{`4O+R?T}V?1IM^ICaSz+W-fG7J=S*5#*De7tnl=ciM2ymU6?r&D;m zbn5ccDL7s_8}rjq$4lpw{B-!Z=)h~#WA_v{(DzX9!!ytU)be+UE(uRj<}c~i``miB tTc6?9r|>PfAmD#Lp{rE=>T&!k>PA@9%cz@Be?#q3XRIEl+R%0i`9FqK+dlvR diff --git a/build/classes/cm3033/lab2/ex3/HeartBeat.class b/build/classes/cm3033/lab2/ex3/HeartBeat.class deleted file mode 100644 index ecb77fafd4c6d3c2129db326825d2d61d0a5162e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2502 zcmZ`)TT>Hf7=AVh*$`KOEut6?OBD+-7%*xzfUV#GC@00zs`aph&#;(m(%p?-zFhJ=}hvS-}imq=RNG-|NikOfE2!u;#G_{ zq5~5uCL@@NB8X|ZzaWQ;DrTaHlwVwuCvQhFi+AMku8PZ1Y{Pg2SLA$E4(~;9EsE>7 zAvZUrs2Rar1epltBM?#CLNxq8s#c)dRB%vR}@6&O;4OFI6P9&R@UN)WiNSV{hXQ_ zT+ej)pta7-u$dF~yy@^dJYdR} zxmnY(Xxip?yQ-!Xds+f5SiP3)y0wOA|-8$JcG1##xpawC(NSnv>!Sej?NTHPDY%w zBstsG{XHy$so^k=Yv@9^f?a-e{kY6n`C?AgqN5-(GLp{c)2=HeIK**CLjpYtnqN!` z4f}CGLnjWZ@HCWgN5c}BBs=_;CYgPPPlX|4 zZ`?6+CDB!|b9W8f&n4HG6W)>#w$ay<>h0}T@wtX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deleted file mode 100644 index f16ec6043661a2095a545d630f002dbe30669861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 787 zcmaJ<+iuf95Ivi?H8!RVx0ceT7YHa#r8>oZq6jI9iiBh?Qc)fdeb_idyOpyW*>1{j zAyF0azz6iBDrT(+UPvr?cV;wu=FFM7zWMbVK!oQW9IX17!P1Mgmh-}24R$Rymp#-;YI3Dd z-cfOC1}?S&Ji*fdE^Yd1nql9VI|4Tkrc|oj;z{*rW zrfG-MHN%n7+$*bBZQ6c)nIx3+blW`Nm$L>pOOov#HhF#Kct-OOwVLgex2nRw2cM(2 z+1h8{M*P;!B}D5AmG5Ovz$d@r^E2-78I-n<1>9wimjd@E2%QOn*ZKjm^Apv70DcMm ph07k7AWNn1O+YM-2YARZRV*=R1cJRLrOtOsB`3_Cje@y%gB(EXg|@2{=PDCV}-tX?lA#NvU`* z)0`tW6O+k&BnxHzdC;-t1t1W-)|!f8F3XZQ(q3F9>@%TtnN`Z@Qz|}~VnSnqy-so| zXEKr>tB7W#t7uTCoLKwVQftzz64+UmCg7i$t0JRU%5q-&tHBeC&1Fw?mYY)P^EXso zn6Zlo0UqKYfQxGZJZpt`#BwfFGwchrYNol==h3_Lk}{^%{xA7Nl@+lr0$U3KnWi1i z&`hRAbFZvkvt#@9WtLG{hEIDu-{;E)w@i}55%zg~R(M9M5UrN&l((wEzXzYA*V%f; zzK!_ZqpuL%Z)kk3a{@m36`v_?@EO#$k2P$t$4h}*bA-Vh!Rvm3IQov}KLEdm9&=f$ lK{jjOn}b*yw{eGIn%HE}2JYe>-wtp3eYDuJBptr_`vcKUu+snl diff --git a/build/classes/cm3033/lab2/ex3/ServerApp.class b/build/classes/cm3033/lab2/ex3/ServerApp.class deleted file mode 100644 index 164ec8ff8b23deefae9128fd38423cdba0f1f065..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5609 zcmbVQ33yaj75;A~nKv^$$Pgf5U&=OLf$Fx?-G!A z3we)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a;R=rZ$f zLws$aNC(9Zg@Yycq9`IZgtMr8d78xOYb|MF!dxoeafR+lMR;*DY=)D3eYWdyo`MPyz)CRrS4u-lxN_b z=XDyI-O!wd&u&yW4Zk$Rs0U(n1^ol6QGpu9WDZTwuEt_CW2x;-wPVnA zhNf`@F}l-71TV^`>bkglH0RQg$8V#6|}js0N0zt^&)QLD)b}aE;r<2 z`MJ_5^%>}+;p!N(`T{tA4$hAxQiLg!JHG?xc@|T|3D5ev5lrnqhiSv8q!^?)eVE}K zK^4Ur!&8%9Q!7>W7s+K!Kb=3+-sHs}%2o+Ve8LXmCg(rhLa(}kN?{;X} z4lUa;g8FWr$kiD(VW40${T`R z^2^{-0#ybtOviJ<3mIJI@l3z&B6~BqT(k-&EDZAJOyJ5lx*EZm@^iW?obC)-JRZ6v z(DQ>Af_@iSx?Dhx%*tRBnV*akC@sjT=9Q{BDt?^B<_xw_Nz0kYbuBD0uV(Z-?vZ#* zOBrmnh1P5|&LZS4HRQ&I_S-1Z92X`|y1t4xYza7l90#%yawF?7Dlr!J@`#>6J1w$L zD{T0(4SFPl5~)oRscmdXEOHH5pwn=y2Ity))ImMjIdy{_Uwd8KGuXl1-kDFmTd|zE zzk$hgDQn1Otge@{Vr*oq1#Q^G3cHy#atqUPD>JzjClJE*9JvYGa5J{!HtfJD?8Ir- zz_Z>d1FB6u4GRNy8Q@0%x2mkC_bdZY`6YQd1l*m6VB4v_Qh$%( zIBA)DOdyv!JTAoPi6DYL#^PERVj}^?3vXThIh2idMK8ed;-&V3K&t}Ww?&J0Pdj1@0!kEz02?6H^-m0&f(|BM*M=FpCSJ>`5(yt$gB8y{1ty| Go%3HEGwqB3 diff --git a/src/CM3033Tests/ServerApp.form b/src/CM3033Tests/ServerApp.form new file mode 100644 index 0000000..9110fb8 --- /dev/null +++ b/src/CM3033Tests/ServerApp.form @@ -0,0 +1,332 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CM3033Tests/ServerApp.java b/src/CM3033Tests/ServerApp.java new file mode 100644 index 0000000..66ff8f0 --- /dev/null +++ b/src/CM3033Tests/ServerApp.java @@ -0,0 +1,406 @@ +package CM3033Tests; + +import java.awt.Component; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import javax.swing.JOptionPane; + +/** + * + * @author Marina Shchukina 1014481@rgu.ac.uk + */ +public class ServerApp extends javax.swing.JFrame implements Runnable { + + //////////////////////////// + ////// VARIABLES /////// + //////////////////////////// + + // variable to store the maxLimit and minLimit + private int highValue, lowValue; + // variables to store the oldMaxLimit and oldMinLimit + private int oldHighValue = highValue, oldLowValue = lowValue; + // A date format template + final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); + // A calander to store the time of now and the time the application was started + Calendar now = null, start = Calendar.getInstance(); + // Variable to store the Shared Data class + DataShare dataShare; + + + //////////////////////////// + ////// CONSTRUCTOR /////// + //////////////////////////// + + public ServerApp(DataShare ds2) throws IOException { + // Initialise the components + initComponents(); + + // set the data share to that passed to this class + //dataShare = ds2; + + // Reset the max and min value dropdowns + //maxValue.removeAllItems(); + //minValue.removeAllItems(); + + // Add the options to the max/min + maxValue.addItem(40); + maxValue.addItem(60); + maxValue.addItem(80); + maxValue.addItem(100); + maxValue.addItem(120); + maxValue.addItem(140); + maxValue.addItem(160); + maxValue.addItem(180); + maxValue.addItem(200); + minValue.addItem(20); + minValue.addItem(40); + minValue.addItem(60); + minValue.addItem(80); + minValue.addItem(100); + minValue.addItem(120); + minValue.addItem(140); + minValue.addItem(160); + minValue.addItem(180); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + maxLabel = new javax.swing.JLabel(); + maxValue = new javax.swing.JComboBox(); + topPanel = new javax.swing.JPanel(); + elapsedTimeValue = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + jSeparator2 = new javax.swing.JSeparator(); + currentTime = new javax.swing.JLabel(); + elapsedTime = new javax.swing.JLabel(); + currentTimeValue = new javax.swing.JLabel(); + Connection1 = new javax.swing.JPanel(); + bpmLabel = new javax.swing.JLabel(); + bpmValue1 = new javax.swing.JLabel(); + lastUpdateLabel = new javax.swing.JLabel(); + lastUpdateValue = new javax.swing.JTextField(); + maxLabel1 = new javax.swing.JLabel(); + minLabel1 = new javax.swing.JLabel(); + maxValue1 = new javax.swing.JLabel(); + minValue1 = new javax.swing.JLabel(); + alarmLog1 = new javax.swing.JScrollPane(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + maxLabel.setText("Max:"); + + maxValue.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + maxValue.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + maxValueActionPerformed(evt); + } + }); + + elapsedTimeValue.setText("00:00:00"); + + jLabel1.setText("Connections"); + + currentTime.setText("Current Time:"); + + elapsedTime.setText("Elapsed Time:"); + + currentTimeValue.setText("00:00:00"); + + javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel); + topPanel.setLayout(topPanelLayout); + topPanelLayout.setHorizontalGroup( + topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(topPanelLayout.createSequentialGroup() + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(topPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(topPanelLayout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(elapsedTime)) + .addGroup(topPanelLayout.createSequentialGroup() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(currentTime))) + .addGap(31, 31, 31) + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(elapsedTimeValue, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(currentTimeValue, javax.swing.GroupLayout.Alignment.TRAILING))) + .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 681, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, Short.MAX_VALUE)) + ); + topPanelLayout.setVerticalGroup( + topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(topPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(elapsedTimeValue) + .addComponent(currentTime)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(currentTimeValue, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(elapsedTime, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + + Connection1.setBorder(javax.swing.BorderFactory.createTitledBorder("")); + Connection1.setName("Patient 1"); // NOI18N + + bpmLabel.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + bpmLabel.setText("Patient's BPM:"); + + bpmValue1.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N + bpmValue1.setForeground(new java.awt.Color(45, 2, 208)); + bpmValue1.setText("200"); + + lastUpdateLabel.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + lastUpdateLabel.setText("Last update:"); + + lastUpdateValue.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + lastUpdateValue.setText("jTextField1"); + + maxLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + maxLabel1.setText("Max:"); + + minLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + minLabel1.setText("Min:"); + + maxValue1.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + maxValue1.setText("60"); + + minValue1.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + minValue1.setText("120"); + + alarmLog1.setToolTipText(""); + alarmLog1.setAutoscrolls(true); + alarmLog1.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + alarmLog1.setName("Alarm Log"); // NOI18N + + javax.swing.GroupLayout Connection1Layout = new javax.swing.GroupLayout(Connection1); + Connection1.setLayout(Connection1Layout); + Connection1Layout.setHorizontalGroup( + Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Connection1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(alarmLog1) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection1Layout.createSequentialGroup() + .addComponent(maxLabel1) + .addGap(28, 28, 28) + .addComponent(maxValue1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(minLabel1) + .addGap(18, 18, 18) + .addComponent(minValue1)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection1Layout.createSequentialGroup() + .addComponent(bpmLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bpmValue1)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection1Layout.createSequentialGroup() + .addComponent(lastUpdateLabel) + .addGap(6, 6, 6) + .addComponent(lastUpdateValue, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE))) + .addContainerGap()) + ); + Connection1Layout.setVerticalGroup( + Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bpmLabel) + .addComponent(bpmValue1)) + .addGap(11, 11, 11) + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lastUpdateLabel) + .addComponent(lastUpdateValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(22, 22, 22) + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(maxLabel1) + .addComponent(maxValue1)) + .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(minLabel1) + .addComponent(minValue1))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(alarmLog1, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE) + .addContainerGap()) + ); + + alarmLog1.getAccessibleContext().setAccessibleName("Alarm log"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(37, 37, 37) + .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 450, Short.MAX_VALUE) + .addComponent(maxLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(156, Short.MAX_VALUE))) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(126, 126, 126) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(maxLabel) + .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createSequentialGroup() + .addGap(66, 66, 66) + .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(217, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 468, Short.MAX_VALUE))) + ); + + pack(); + }// //GEN-END:initComponents + + private void maxValueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maxValueActionPerformed + // Test the dropdown variables with the max + testDropDowns("max"); + }//GEN-LAST:event_maxValueActionPerformed + + // A method to update the time + public void updateTime() { + // set the now calander + now = Calendar.getInstance(); + // get the time from the now calander + Date time = now.getTime(); + // Set the time label to the selected time + currentTimeValue.setText(dateFormat.format(time)); + // Set the elapsed variable to the current time minus the start time. + elapsedTimeValue.setText(dateFormat.format((time.getTime() - start.getTimeInMillis() - 3600000))); + } + + // The method to test dropdowns + private void testDropDowns(String v) { + // if both max values and max strings have been initiated + if (maxValue.getSelectedItem() != null && maxValue.getSelectedItem().toString() != null) { + // if both max values and max strings have been initiated + if (minValue.getSelectedItem() != null && minValue.getSelectedItem().toString() != null) { + // Set highvalue to the value from the relative drop down + highValue = Integer.parseInt(maxValue.getSelectedItem().toString()); + // Set highvalue to the value from the relative drop down + lowValue = Integer.parseInt(minValue.getSelectedItem().toString()); + // If the high value is lower or equal to the min + if (highValue <= lowValue) { + switch (v) { + case "max": + // If max, set the max to the old value + maxValue.setSelectedItem(oldHighValue); + // break + break; + case "min": + // if min, set the min to the old value + minValue.setSelectedItem(oldLowValue); + // break + break; + } + // Create a frame to display the error message + Component frame = null; + // Show the error for the dropdown + JOptionPane.showMessageDialog(frame, "The \"Max Value\" must be more than the \"Min Value\"!"); + } else { + // Else valid change + switch (v) { + case "max": + // set the oldMax to the new max + oldHighValue = highValue; + case "min": + // set the oldMin to the new min + oldLowValue = lowValue; + } + // Set the data share maxmin to the relevant value + dataShare.setMaxMin(highValue + "," + lowValue); + } + } + } + } + + // A method to the configure if the client is connected or not. + public void setConnection(boolean connected) { + if (!connected) { + // If connected, disable the dropdowns + maxValue.setEnabled(false); + minValue.setEnabled(false); + // Set the mode lable to remote + opModeValue.setText("Remote"); + // change the connect button to disconnect + connectionButton.setText("Disconnect"); + } else { + // Set the mode label to local + opModeValue.setText("Local"); + // set the disconnect button to connect + connectionButton.setText("Connect"); + // enable both the dropdowns + maxValue.setEnabled(true); + minValue.setEnabled(true); + } + } + + // A method to alter the text in the scrollable text box + public void alterText(String text) { + // Display the time the message was posted to the text area as well as the text passed + now = Calendar.getInstance(); + textSpace.append(dateFormat.format(now.getTime()) + " | " + text + "\n"); + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel Connection1; + private javax.swing.JScrollPane alarmLog1; + private javax.swing.JLabel bpmLabel; + private javax.swing.JLabel bpmValue1; + private javax.swing.JLabel currentTime; + private javax.swing.JLabel currentTimeValue; + private javax.swing.JLabel elapsedTime; + private javax.swing.JLabel elapsedTimeValue; + private javax.swing.JLabel jLabel1; + private javax.swing.JSeparator jSeparator2; + private javax.swing.JLabel lastUpdateLabel; + private javax.swing.JTextField lastUpdateValue; + private javax.swing.JLabel maxLabel; + private javax.swing.JLabel maxLabel1; + private javax.swing.JComboBox maxValue; + private javax.swing.JLabel maxValue1; + private javax.swing.JLabel minLabel1; + private javax.swing.JLabel minValue1; + private javax.swing.JPanel topPanel; + // End of variables declaration//GEN-END:variables + + @Override + public void run() { + // Show the GUI + setVisible(true); + // Update the time in near real time + while (dataShare.isRunning()) { + updateTime(); + } + } +} From 0865b0cde707f11951755c1ad8cd9d3121922731 Mon Sep 17 00:00:00 2001 From: Marina Shchukina Date: Thu, 19 Dec 2013 02:21:58 +0000 Subject: [PATCH 2/5] Delete .gitignore~ --- .gitignore~ | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .gitignore~ diff --git a/.gitignore~ b/.gitignore~ deleted file mode 100644 index ab50f5e..0000000 --- a/.gitignore~ +++ /dev/null @@ -1,4 +0,0 @@ -/build/ -/nbproject/private/ -.DS-Store -.gitignore From c431f3445fcc47adc72d6c271ffee0f7ac2fdd65 Mon Sep 17 00:00:00 2001 From: marinamarina Date: Thu, 19 Dec 2013 02:57:39 +0000 Subject: [PATCH 3/5] Server GUI initialises --- build/built-jar.properties | 2 +- build/classes/CM3033Tests/Server.class | Bin 2198 -> 2384 bytes nbproject/project.properties | 2 +- src/CM3033Tests/Server.java | 10 +- src/CM3033Tests/ServerApp.form | 636 ++++++++++++++++++++++--- src/CM3033Tests/ServerApp.java | 504 +++++++++++++++++--- src/CM3033Tests/StartServer.java | 11 +- src/cm3033/lab2/ex3/Alarm.java | 111 ----- src/cm3033/lab2/ex3/Client.java | 129 ----- src/cm3033/lab2/ex3/ClientApp.form | 309 ------------ src/cm3033/lab2/ex3/ClientApp.java | 451 ------------------ src/cm3033/lab2/ex3/HeartBeat.java | 86 ---- src/cm3033/lab2/ex3/MainAppEx3.java | 44 -- src/cm3033/lab2/ex3/Server.java | 64 --- src/cm3033/lab2/ex3/ServerApp.form | 177 ------- src/cm3033/lab2/ex3/ServerApp.java | 194 -------- 16 files changed, 1034 insertions(+), 1696 deletions(-) delete mode 100644 src/cm3033/lab2/ex3/Alarm.java delete mode 100644 src/cm3033/lab2/ex3/Client.java delete mode 100644 src/cm3033/lab2/ex3/ClientApp.form delete mode 100644 src/cm3033/lab2/ex3/ClientApp.java delete mode 100644 src/cm3033/lab2/ex3/HeartBeat.java delete mode 100644 src/cm3033/lab2/ex3/MainAppEx3.java delete mode 100644 src/cm3033/lab2/ex3/Server.java delete mode 100644 src/cm3033/lab2/ex3/ServerApp.form delete mode 100644 src/cm3033/lab2/ex3/ServerApp.java diff --git a/build/built-jar.properties b/build/built-jar.properties index 0af396a..8f3975b 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Thu, 19 Dec 2013 01:55:35 +0000 +#Thu, 19 Dec 2013 02:53:37 +0000 /home/marina/NetBeansProjects/Coursework= diff --git a/build/classes/CM3033Tests/Server.class b/build/classes/CM3033Tests/Server.class index ee8e1f3770dc3e944e425414308f197fec004954..9104f34059d3d7dc649dab66258e4d8acd06e2d1 100644 GIT binary patch literal 2384 zcmaJ?+jA3D82_Cl?WWr;h4ey8O9?8F21?PYXp6V`qHy!AJiAAARy!XPg1Qb2gW)1t*j5>^a}}{myqkzux)jX8?Wp zRz(8oI&8zJAV&llQ*ji}Di~LgQE?2ulJhV?af%(Gu$0us5QO0DQ+{c6hocE?Rjnw6$%XN z(<7sOyZZW$amRIfGi8QQ*<+Z7JIJsju?jGCAFb{QhRBGO;|z^y!{kTgt;h7KJe|bS zR#wkX=(ZvDrNf9jYd8$e_W&dtLZ(H;(HX+FXA(__8^VrDp2U2s^13miuk1E#dVvZf%y2i5DT;WayHaog231j8skJESL59F> zsg|e!B1kDBB@Tf%SArKfrz#+fgO=kS(dVdxn#&#rO<>T<7agSvl%s)0 zThz7uS-_waL~rM59<ukrt*&&YN!))=jGirE}~*5 zrrt_qIhtrJ(n=T9^0S_vr>Lwj%CE+OZbGTa<}HUH?#Z9PW_pPdVCY5|Au&nly$Xq8 zB3GIxa%I%&50lg*wDX7`p|w4^1eV->8=++9ZG@9Ow-M=y6j5_as`L@vK<^F-l6VK| z&`B@UMl_)dZPk)ccc7rb~kfdNocyQx&T-;tn=e4_k)3ULMuKq}S z7)LYFEojA7`gP+Jy%m=!s|%FZMUuEmNw|UC_>RK-BL?srp2F|g%NT}O82eZ)o?#6* zM2H93I;2<|4$Bk{Qi^Y2mNfQIGF$N%=?&8DTk!`??58P(3%G(I3?oc>3P!L`+SXo5 l`hK#i3pIDJpx}T)m;8eZp}SNqOu<1xQVPi*BB>A#{|nArN1y-z delta 1202 zcmZ9K-E$LV6vlsVHti`8xf=RBc@B)QWFTY|+3Wi!jfbjA+kcizv^Vj9Sui*J<#o8Uilew8(vf%p3Ofi4L^?QaY2h@?ub#)^py^jR6Nrjau zPM7lTpf}|znlf%_#w~Ses!b;;o9*ndd5A>iTxfT>XmgTNI#SZ+v|@Eo#VaNcm%M_1 zwB-4&gnXuTd`7V@h)?AT6UmG(kcr-DZ)#j)-sX&=)yWp8om|Ov^2I{I&HL`S;};zr zeaGfq&YGOFd5>8|)G3w=&dFlQmvEW)Z9ZVu<~$#oT(EhHi_*W-x17f0lFb|+*?i2b z$tO0KbsB5b&3o>QJKpUmjNa^k%@wXHnw@^{^l}q6pOX5|-wllnoXNYDpAFME&u5jp z#=dV;;ZvdV7Fi3$HbU~rq-0k@dRW1!WCA-Sx=UVJ@f&ikOw>?`&fA0%?YA**1;8$` zF_9YD#IBcR*uVCn!3>}-u@K^aw6#8y^WRcEwRiOD0jdfBr^09DpjY5j(E zi@fsx!EJT0P8A^IM!Mr`W;?5_zqatV92=^%cZcKQI~-do9qSNMJS^t^j0)APR - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + - + + + - + + + + + + + + - - - - - - - - - - - - - - - - - - - - @@ -198,14 +202,14 @@ - + - + - + @@ -217,13 +221,13 @@ - + - - + + @@ -237,14 +241,14 @@ - - + + - + @@ -263,7 +267,7 @@ - + @@ -271,7 +275,7 @@ - + @@ -328,5 +332,529 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CM3033Tests/ServerApp.java b/src/CM3033Tests/ServerApp.java index 66ff8f0..dc73fd7 100644 --- a/src/CM3033Tests/ServerApp.java +++ b/src/CM3033Tests/ServerApp.java @@ -34,7 +34,7 @@ public class ServerApp extends javax.swing.JFrame implements Runnable { ////// CONSTRUCTOR /////// //////////////////////////// - public ServerApp(DataShare ds2) throws IOException { + public ServerApp() throws IOException { // Initialise the components initComponents(); @@ -46,7 +46,7 @@ public ServerApp(DataShare ds2) throws IOException { //minValue.removeAllItems(); // Add the options to the max/min - maxValue.addItem(40); + /*maxValue.addItem(40); maxValue.addItem(60); maxValue.addItem(80); maxValue.addItem(100); @@ -63,10 +63,11 @@ public ServerApp(DataShare ds2) throws IOException { minValue.addItem(120); minValue.addItem(140); minValue.addItem(160); - minValue.addItem(180); + minValue.addItem(180);*/ } + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -76,8 +77,6 @@ public ServerApp(DataShare ds2) throws IOException { // //GEN-BEGIN:initComponents private void initComponents() { - maxLabel = new javax.swing.JLabel(); - maxValue = new javax.swing.JComboBox(); topPanel = new javax.swing.JPanel(); elapsedTimeValue = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); @@ -86,27 +85,53 @@ private void initComponents() { elapsedTime = new javax.swing.JLabel(); currentTimeValue = new javax.swing.JLabel(); Connection1 = new javax.swing.JPanel(); - bpmLabel = new javax.swing.JLabel(); + bpmLabel1 = new javax.swing.JLabel(); bpmValue1 = new javax.swing.JLabel(); - lastUpdateLabel = new javax.swing.JLabel(); - lastUpdateValue = new javax.swing.JTextField(); + lastUpdateLabel1 = new javax.swing.JLabel(); + lastUpdateValue1 = new javax.swing.JTextField(); maxLabel1 = new javax.swing.JLabel(); minLabel1 = new javax.swing.JLabel(); maxValue1 = new javax.swing.JLabel(); minValue1 = new javax.swing.JLabel(); alarmLog1 = new javax.swing.JScrollPane(); + Connection2 = new javax.swing.JPanel(); + bpmLabel2 = new javax.swing.JLabel(); + bpmValue2 = new javax.swing.JLabel(); + lastUpdateLabel2 = new javax.swing.JLabel(); + lastUpdateValue2 = new javax.swing.JTextField(); + maxLabel2 = new javax.swing.JLabel(); + minLabel2 = new javax.swing.JLabel(); + maxValue2 = new javax.swing.JLabel(); + minValue2 = new javax.swing.JLabel(); + alarmLog2 = new javax.swing.JScrollPane(); + Connection3 = new javax.swing.JPanel(); + bpmLabel3 = new javax.swing.JLabel(); + bpmValue3 = new javax.swing.JLabel(); + lastUpdateLabel3 = new javax.swing.JLabel(); + lastUpdateValue3 = new javax.swing.JTextField(); + maxLabel3 = new javax.swing.JLabel(); + minLabel3 = new javax.swing.JLabel(); + maxValue3 = new javax.swing.JLabel(); + minValue3 = new javax.swing.JLabel(); + alarmLog3 = new javax.swing.JScrollPane(); + Connection4 = new javax.swing.JPanel(); + bpmLabel4 = new javax.swing.JLabel(); + bpmValue4 = new javax.swing.JLabel(); + lastUpdateLabel4 = new javax.swing.JLabel(); + lastUpdateValue4 = new javax.swing.JTextField(); + maxLabel4 = new javax.swing.JLabel(); + minLabel4 = new javax.swing.JLabel(); + maxValue4 = new javax.swing.JLabel(); + minValue4 = new javax.swing.JLabel(); + alarmLog4 = new javax.swing.JScrollPane(); + alarmButtons = new javax.swing.JPanel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - maxLabel.setText("Max:"); - - maxValue.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); - maxValue.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - maxValueActionPerformed(evt); - } - }); - elapsedTimeValue.setText("00:00:00"); jLabel1.setText("Connections"); @@ -159,18 +184,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { Connection1.setBorder(javax.swing.BorderFactory.createTitledBorder("")); Connection1.setName("Patient 1"); // NOI18N - bpmLabel.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - bpmLabel.setText("Patient's BPM:"); + bpmLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + bpmLabel1.setText("Patient's BPM:"); bpmValue1.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N bpmValue1.setForeground(new java.awt.Color(45, 2, 208)); bpmValue1.setText("200"); - lastUpdateLabel.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - lastUpdateLabel.setText("Last update:"); + lastUpdateLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + lastUpdateLabel1.setText("Last update:"); - lastUpdateValue.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - lastUpdateValue.setText("jTextField1"); + lastUpdateValue1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + lastUpdateValue1.setText("jTextField1"); maxLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N maxLabel1.setText("Max:"); @@ -206,13 +231,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGap(18, 18, 18) .addComponent(minValue1)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection1Layout.createSequentialGroup() - .addComponent(bpmLabel) + .addComponent(bpmLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(bpmValue1)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection1Layout.createSequentialGroup() - .addComponent(lastUpdateLabel) + .addComponent(lastUpdateLabel1) .addGap(6, 6, 6) - .addComponent(lastUpdateValue, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE))) + .addComponent(lastUpdateValue1, javax.swing.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE))) .addContainerGap()) ); Connection1Layout.setVerticalGroup( @@ -220,12 +245,12 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(Connection1Layout.createSequentialGroup() .addContainerGap() .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bpmLabel) + .addComponent(bpmLabel1) .addComponent(bpmValue1)) .addGap(11, 11, 11) .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lastUpdateLabel) - .addComponent(lastUpdateValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(lastUpdateLabel1) + .addComponent(lastUpdateValue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(22, 22, 22) .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(Connection1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) @@ -235,56 +260,370 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(minLabel1) .addComponent(minValue1))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(alarmLog1, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE) - .addContainerGap()) + .addComponent(alarmLog1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(20, Short.MAX_VALUE)) ); alarmLog1.getAccessibleContext().setAccessibleName("Alarm log"); + Connection2.setBorder(javax.swing.BorderFactory.createTitledBorder("")); + Connection2.setName("Patient 1"); // NOI18N + + bpmLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + bpmLabel2.setText("Patient's BPM:"); + + bpmValue2.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N + bpmValue2.setForeground(new java.awt.Color(45, 2, 208)); + bpmValue2.setText("200"); + + lastUpdateLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + lastUpdateLabel2.setText("Last update:"); + + lastUpdateValue2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + lastUpdateValue2.setText("jTextField1"); + + maxLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + maxLabel2.setText("Max:"); + + minLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + minLabel2.setText("Min:"); + + maxValue2.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + maxValue2.setText("60"); + + minValue2.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + minValue2.setText("120"); + + alarmLog2.setToolTipText(""); + alarmLog2.setAutoscrolls(true); + alarmLog2.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + alarmLog2.setName("Alarm Log"); // NOI18N + + javax.swing.GroupLayout Connection2Layout = new javax.swing.GroupLayout(Connection2); + Connection2.setLayout(Connection2Layout); + Connection2Layout.setHorizontalGroup( + Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Connection2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(alarmLog2) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection2Layout.createSequentialGroup() + .addComponent(maxLabel2) + .addGap(28, 28, 28) + .addComponent(maxValue2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(minLabel2) + .addGap(18, 18, 18) + .addComponent(minValue2)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection2Layout.createSequentialGroup() + .addComponent(bpmLabel2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bpmValue2)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection2Layout.createSequentialGroup() + .addComponent(lastUpdateLabel2) + .addGap(6, 6, 6) + .addComponent(lastUpdateValue2, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE))) + .addContainerGap()) + ); + Connection2Layout.setVerticalGroup( + Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bpmLabel2) + .addComponent(bpmValue2)) + .addGap(11, 11, 11) + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lastUpdateLabel2) + .addComponent(lastUpdateValue2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(22, 22, 22) + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(maxLabel2) + .addComponent(maxValue2)) + .addGroup(Connection2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(minLabel2) + .addComponent(minValue2))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(alarmLog2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + Connection3.setBorder(javax.swing.BorderFactory.createTitledBorder("")); + Connection3.setName("Patient 1"); // NOI18N + + bpmLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + bpmLabel3.setText("Patient's BPM:"); + + bpmValue3.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N + bpmValue3.setForeground(new java.awt.Color(45, 2, 208)); + bpmValue3.setText("200"); + + lastUpdateLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + lastUpdateLabel3.setText("Last update:"); + + lastUpdateValue3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + lastUpdateValue3.setText("jTextField1"); + + maxLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + maxLabel3.setText("Max:"); + + minLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + minLabel3.setText("Min:"); + + maxValue3.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + maxValue3.setText("60"); + + minValue3.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + minValue3.setText("120"); + + alarmLog3.setToolTipText(""); + alarmLog3.setAutoscrolls(true); + alarmLog3.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + alarmLog3.setName("Alarm Log"); // NOI18N + + javax.swing.GroupLayout Connection3Layout = new javax.swing.GroupLayout(Connection3); + Connection3.setLayout(Connection3Layout); + Connection3Layout.setHorizontalGroup( + Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Connection3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(alarmLog3) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection3Layout.createSequentialGroup() + .addComponent(maxLabel3) + .addGap(28, 28, 28) + .addComponent(maxValue3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(minLabel3) + .addGap(18, 18, 18) + .addComponent(minValue3)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection3Layout.createSequentialGroup() + .addComponent(bpmLabel3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bpmValue3)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection3Layout.createSequentialGroup() + .addComponent(lastUpdateLabel3) + .addGap(6, 6, 6) + .addComponent(lastUpdateValue3, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))) + .addContainerGap()) + ); + Connection3Layout.setVerticalGroup( + Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bpmLabel3) + .addComponent(bpmValue3)) + .addGap(11, 11, 11) + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lastUpdateLabel3) + .addComponent(lastUpdateValue3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(22, 22, 22) + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(maxLabel3) + .addComponent(maxValue3)) + .addGroup(Connection3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(minLabel3) + .addComponent(minValue3))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(alarmLog3, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(20, Short.MAX_VALUE)) + ); + + Connection4.setBorder(javax.swing.BorderFactory.createTitledBorder("")); + Connection4.setName("Patient 1"); // NOI18N + + bpmLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + bpmLabel4.setText("Patient's BPM:"); + + bpmValue4.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N + bpmValue4.setForeground(new java.awt.Color(45, 2, 208)); + bpmValue4.setText("200"); + + lastUpdateLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + lastUpdateLabel4.setText("Last update:"); + + lastUpdateValue4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N + lastUpdateValue4.setText("jTextField1"); + + maxLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + maxLabel4.setText("Max:"); + + minLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N + minLabel4.setText("Min:"); + + maxValue4.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + maxValue4.setText("60"); + + minValue4.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + minValue4.setText("120"); + + alarmLog4.setToolTipText(""); + alarmLog4.setAutoscrolls(true); + alarmLog4.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N + alarmLog4.setName("Alarm Log"); // NOI18N + + javax.swing.GroupLayout Connection4Layout = new javax.swing.GroupLayout(Connection4); + Connection4.setLayout(Connection4Layout); + Connection4Layout.setHorizontalGroup( + Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, Connection4Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(alarmLog4) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection4Layout.createSequentialGroup() + .addComponent(maxLabel4) + .addGap(28, 28, 28) + .addComponent(maxValue4) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(minLabel4) + .addGap(18, 18, 18) + .addComponent(minValue4)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection4Layout.createSequentialGroup() + .addComponent(bpmLabel4) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bpmValue4)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, Connection4Layout.createSequentialGroup() + .addComponent(lastUpdateLabel4) + .addGap(6, 6, 6) + .addComponent(lastUpdateValue4, javax.swing.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE))) + .addContainerGap()) + ); + Connection4Layout.setVerticalGroup( + Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection4Layout.createSequentialGroup() + .addContainerGap() + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bpmLabel4) + .addComponent(bpmValue4)) + .addGap(11, 11, 11) + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lastUpdateLabel4) + .addComponent(lastUpdateValue4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(22, 22, 22) + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(maxLabel4) + .addComponent(maxValue4)) + .addGroup(Connection4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(minLabel4) + .addComponent(minValue4))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(alarmLog4, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jButton1.setText("Turn off alarm 1"); + + jButton2.setText("Turn off alarm 2"); + + jButton3.setText("Turn off alarm 3"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + jButton4.setText("Turn off alarm 4"); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout alarmButtonsLayout = new javax.swing.GroupLayout(alarmButtons); + alarmButtons.setLayout(alarmButtonsLayout); + alarmButtonsLayout.setHorizontalGroup( + alarmButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(alarmButtonsLayout.createSequentialGroup() + .addGap(30, 30, 30) + .addComponent(jButton1) + .addGap(108, 108, 108) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(98, 98, 98) + .addComponent(jButton3) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE) + .addComponent(jButton4) + .addGap(27, 27, 27)) + ); + alarmButtonsLayout.setVerticalGroup( + alarmButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(alarmButtonsLayout.createSequentialGroup() + .addGap(32, 32, 32) + .addGroup(alarmButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2) + .addComponent(jButton4) + .addComponent(jButton3)) + .addContainerGap(63, Short.MAX_VALUE)) + ); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(37, 37, 37) - .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 450, Short.MAX_VALUE) - .addComponent(maxLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addGap(27, 27, 27) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(alarmButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(Connection2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(Connection4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addGap(37, 37, 37)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(156, Short.MAX_VALUE))) + .addContainerGap(238, Short.MAX_VALUE))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(22, 22, 22) + .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(488, Short.MAX_VALUE))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(126, 126, 126) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(maxLabel) - .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createSequentialGroup() - .addGap(66, 66, 66) - .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(217, Short.MAX_VALUE)) + .addGap(72, 72, 72) + .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(Connection2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(Connection4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(alarmButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 468, Short.MAX_VALUE))) + .addGap(0, 607, Short.MAX_VALUE))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(76, 76, 76) + .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(367, Short.MAX_VALUE))) ); pack(); }// //GEN-END:initComponents - private void maxValueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maxValueActionPerformed - // Test the dropdown variables with the max - testDropDowns("max"); - }//GEN-LAST:event_maxValueActionPerformed + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed // A method to update the time public void updateTime() { @@ -299,7 +638,7 @@ public void updateTime() { } // The method to test dropdowns - private void testDropDowns(String v) { + /*private void testDropDowns(String v) { // if both max values and max strings have been initiated if (maxValue.getSelectedItem() != null && maxValue.getSelectedItem().toString() != null) { // if both max values and max strings have been initiated @@ -341,10 +680,10 @@ private void testDropDowns(String v) { } } } - } + }*/ // A method to the configure if the client is connected or not. - public void setConnection(boolean connected) { + /*public void setConnection(boolean connected) { if (!connected) { // If connected, disable the dropdowns maxValue.setEnabled(false); @@ -362,35 +701,68 @@ public void setConnection(boolean connected) { maxValue.setEnabled(true); minValue.setEnabled(true); } - } + }*/ // A method to alter the text in the scrollable text box - public void alterText(String text) { + /*public void alterText(String text) { // Display the time the message was posted to the text area as well as the text passed now = Calendar.getInstance(); textSpace.append(dateFormat.format(now.getTime()) + " | " + text + "\n"); - } + }*/ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel Connection1; + private javax.swing.JPanel Connection2; + private javax.swing.JPanel Connection3; + private javax.swing.JPanel Connection4; + private javax.swing.JPanel alarmButtons; private javax.swing.JScrollPane alarmLog1; - private javax.swing.JLabel bpmLabel; + private javax.swing.JScrollPane alarmLog2; + private javax.swing.JScrollPane alarmLog3; + private javax.swing.JScrollPane alarmLog4; + private javax.swing.JLabel bpmLabel1; + private javax.swing.JLabel bpmLabel2; + private javax.swing.JLabel bpmLabel3; + private javax.swing.JLabel bpmLabel4; private javax.swing.JLabel bpmValue1; + private javax.swing.JLabel bpmValue2; + private javax.swing.JLabel bpmValue3; + private javax.swing.JLabel bpmValue4; private javax.swing.JLabel currentTime; private javax.swing.JLabel currentTimeValue; private javax.swing.JLabel elapsedTime; private javax.swing.JLabel elapsedTimeValue; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1; private javax.swing.JSeparator jSeparator2; - private javax.swing.JLabel lastUpdateLabel; - private javax.swing.JTextField lastUpdateValue; - private javax.swing.JLabel maxLabel; + private javax.swing.JLabel lastUpdateLabel1; + private javax.swing.JLabel lastUpdateLabel2; + private javax.swing.JLabel lastUpdateLabel3; + private javax.swing.JLabel lastUpdateLabel4; + private javax.swing.JTextField lastUpdateValue1; + private javax.swing.JTextField lastUpdateValue2; + private javax.swing.JTextField lastUpdateValue3; + private javax.swing.JTextField lastUpdateValue4; private javax.swing.JLabel maxLabel1; - private javax.swing.JComboBox maxValue; + private javax.swing.JLabel maxLabel2; + private javax.swing.JLabel maxLabel3; + private javax.swing.JLabel maxLabel4; private javax.swing.JLabel maxValue1; + private javax.swing.JLabel maxValue2; + private javax.swing.JLabel maxValue3; + private javax.swing.JLabel maxValue4; private javax.swing.JLabel minLabel1; + private javax.swing.JLabel minLabel2; + private javax.swing.JLabel minLabel3; + private javax.swing.JLabel minLabel4; private javax.swing.JLabel minValue1; + private javax.swing.JLabel minValue2; + private javax.swing.JLabel minValue3; + private javax.swing.JLabel minValue4; private javax.swing.JPanel topPanel; // End of variables declaration//GEN-END:variables diff --git a/src/CM3033Tests/StartServer.java b/src/CM3033Tests/StartServer.java index 4bb7c26..a75803c 100644 --- a/src/CM3033Tests/StartServer.java +++ b/src/CM3033Tests/StartServer.java @@ -1,7 +1,3 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package CM3033Tests; import java.io.IOException; @@ -17,7 +13,7 @@ */ public class StartServer { - public static void main(String[] args) { + public static void main(String[] args) throws IOException { // Set the thread size int tpSize = 4; // Start the thread pool @@ -27,6 +23,9 @@ public static void main(String[] args) { 50000L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue()); + ServerApp serverApp = new ServerApp(); + // ServerApp sv = new ServerApp(); + //serverApp.setVisible(true); try { // Try start the server on port 8189 ServerSocket socketServer = new ServerSocket(8189); @@ -39,7 +38,7 @@ public static void main(String[] args) { Socket incoming = socketServer.accept(); // Start a server instance using the incoming conncetion - pool.execute(new Server(incoming,pool.getPoolSize())); + pool.execute(new Server(incoming,pool.getPoolSize(), serverApp)); } } catch (IOException e) { diff --git a/src/cm3033/lab2/ex3/Alarm.java b/src/cm3033/lab2/ex3/Alarm.java deleted file mode 100644 index 7ab5f74..0000000 --- a/src/cm3033/lab2/ex3/Alarm.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import javax.swing.JOptionPane; - -/** - * - * @author Florin Mazilu 1114040 - */ -//alarm class -public class Alarm { -//int to determine the high and low tresholds for the alarm - - int low, high; -//boolean to determin if its active and if it's too high or too low - boolean isActive; - boolean ishigh; - //String that stores what the alarm was - String alarm; - //for logging when an alarm is started and stopped - final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); - Calendar start = Calendar.getInstance(); - Calendar stop = null; - String s; -//constructor - - public Alarm(int low, int high) { - isActive = false; - ishigh = false; - this.low = low; - this.high = high; - alarm = ""; - } -//activate the alarm - - public void activate() { - isActive = true; - } -//deactivate alarm - - public void deactivate() { - stop = Calendar.getInstance(); - Date time = stop.getTime(); - s = dateFormat.format(time); - isActive = false; - } -//check if alarm is active - - public boolean active() { - return isActive; - } -//check if the value is between the treshold - - public void check(int bpm) { - //check if it's to high - if (bpm > high) { - activate(); - ishigh = true; - } //check if it's to low - else if (bpm < low) { - ishigh = false; - activate(); - } else { - - deactivate(); - } - //pop up's with the alarm - if (active() - && ishigh) { - JOptionPane.showMessageDialog(null, "ALERT: HEART BEAT TOO HIGH"); - deactivate(); - alarm = "ALERT: HEART BEAT TOO HIGH, stopped at :" + s; - } else if (active() - && !ishigh) { - JOptionPane.showMessageDialog(null, "ALERT: HEART BEAT TOO LOW"); - deactivate(); - alarm = "ALERT: HEART BEAT TOO LOW, stopped at :" + s; - } - } -//check how long it has been since the last response - - public void timeout(Calendar start, Calendar current) { - if (start.compareTo(current) > 30000) { - JOptionPane.showMessageDialog(null, "ALERT: NO RESPONSE FOR 30 SECONDS"); - alarm = "ALERT: NO RESPONSE FOR 30 SECONDS"; - } - } -//get the alarm string - - public String info() { - return alarm; - } - -//setters for the high and low values - public void setLow(int low) { - this.low = low; - } - - public void setHigh(int high) { - this.high = high; - } - -} diff --git a/src/cm3033/lab2/ex3/Client.java b/src/cm3033/lab2/ex3/Client.java deleted file mode 100644 index 446e48a..0000000 --- a/src/cm3033/lab2/ex3/Client.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.awt.Component; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.net.Socket; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.swing.JOptionPane; - -/** - * - * @author samc - */ -public class Client implements Runnable { - - Socket requestSocket; - PrintWriter out; - BufferedReader in; - boolean connected; - String recievedStr = ""; - ClientApp ca; - String sendStr = "MaxMin:null"; - String oldSendStr = sendStr; - int test = 0; - Component frame = null; - - public static void main(String args[]) throws IOException { - Client client = new Client(); - client.run(); - } - - @Override - public void run() { - try { - ca = new ClientApp(); - ca.setVisible(true); - ca.setConnection(false); - - while (ca.running) { - try { - ca.updateTime(); - - if (ca.connect) { - if (!connected) { - String ip = JOptionPane.showInputDialog("input ip address"); - if (ip != null) { - ca.alterText("Connecting..."); - requestSocket = new Socket(ip, 8189); - System.out.println("Client>Connected to " - + requestSocket.getLocalAddress().getHostName() - + " on port " + requestSocket.getLocalPort()); - ca.setConnection(true); - connected = true; - ca.alterText("Connected to " + requestSocket.getLocalAddress().getHostName() - + " on port " + requestSocket.getLocalPort()); - out = new PrintWriter(requestSocket.getOutputStream(), true /* auto flush */); - in = new BufferedReader(new InputStreamReader(requestSocket.getInputStream())); - sendStr = "MaxMin:" + ca.getMaxMin(); - sendMessage(sendStr); - oldSendStr = sendStr; - test = 0; - test--; - - if (in.ready()) { - recievedStr = in.readLine(); - if (recievedStr != null) { - System.out.println("Server>" + recievedStr); - test++; - System.out.println("test=" + test); - } - } - - sendStr = "MaxMin:" + ca.getMaxMin(); - if (!sendStr.equals(oldSendStr)) { - sendMessage(sendStr); - oldSendStr = sendStr; - test--; - System.out.println("test=" + test); - - if (test < 1) { - System.out.println("test=" + test); - sendMessage("BYE"); - ca.setConnection(false); - if (ca.running) { - ca.alterText("Server Timeout!"); - } else { - System.exit(0); - } - } - } - } else { - ca.connect = false; - ca.setConnection(false); - JOptionPane.showMessageDialog(frame, "Please enter a valid IP."); - } - } - } else if (connected) { - ca.setConnection(false); - System.out.println("Disconnecting"); - sendMessage("BYE"); - ca.alterText("Disconnected"); - connected = false; - } - } catch (IOException ex) { - System.out.println(ex.toString()); - ca.connect = false; - JOptionPane.showMessageDialog(frame, "Connection Failed"); - ca.alterText("Connection Failed"); - ca.setConnection(false); - } - } - } catch (IOException ex) { - System.out.println(ex.toString()); - } - } - - private void sendMessage(String msg) { - out.println(msg); - System.out.println("Client>" + msg); - } -} diff --git a/src/cm3033/lab2/ex3/ClientApp.form b/src/cm3033/lab2/ex3/ClientApp.form deleted file mode 100644 index ffab166..0000000 --- a/src/cm3033/lab2/ex3/ClientApp.form +++ /dev/null @@ -1,309 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/cm3033/lab2/ex3/ClientApp.java b/src/cm3033/lab2/ex3/ClientApp.java deleted file mode 100644 index f527ef1..0000000 --- a/src/cm3033/lab2/ex3/ClientApp.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.awt.Component; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.swing.JOptionPane; - -/** - * - * @author Florin - */ - -public class ClientApp extends javax.swing.JFrame implements Runnable { - - public volatile String text; - private int highValue, lowValue; - private int oldHighValue = highValue, oldLowValue = lowValue; - private String highLowValue; - final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); - Calendar now = null, start = Calendar.getInstance(); - boolean running = true; - boolean connect = false; - Alarm a; - HeartBeat hb; - int heartbeatValue; - - public ClientApp() throws IOException { - initComponents(); - textSpace.setEditable(false); - //sendButton.setVisible(false); - text = ""; - maxValue.removeAllItems(); - minValue.removeAllItems(); - - maxValue.addItem(40); - maxValue.addItem(60); - maxValue.addItem(80); - maxValue.addItem(100); - maxValue.addItem(120); - maxValue.addItem(140); - maxValue.addItem(160); - maxValue.addItem(180); - maxValue.addItem(200); - - minValue.addItem(20); - minValue.addItem(40); - minValue.addItem(60); - minValue.addItem(80); - minValue.addItem(100); - minValue.addItem(120); - minValue.addItem(140); - minValue.addItem(160); - minValue.addItem(180); - a = new Alarm(Integer.parseInt(maxValue.getSelectedItem().toString()), Integer.parseInt(minValue.getSelectedItem().toString())); - hb = new HeartBeat(Integer.parseInt(maxValue.getSelectedItem().toString())); - - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - maxLabel = new javax.swing.JLabel(); - minLabel = new javax.swing.JLabel(); - currentTime = new javax.swing.JLabel(); - elapsedTime = new javax.swing.JLabel(); - maxValue = new javax.swing.JComboBox(); - minValue = new javax.swing.JComboBox(); - bpmLabel = new javax.swing.JLabel(); - opModeLabel = new javax.swing.JLabel(); - connectionButton = new javax.swing.JButton(); - jScrollPane1 = new javax.swing.JScrollPane(); - textSpace = new javax.swing.JTextArea(); - bpmValue = new javax.swing.JLabel(); - opModeValue = new javax.swing.JLabel(); - currentTimeValue = new javax.swing.JLabel(); - elapsedTimeValue = new javax.swing.JLabel(); - sendBPM = new javax.swing.JButton(); - jLabel1 = new javax.swing.JLabel(); - jMenuBar1 = new javax.swing.JMenuBar(); - menuExit = new javax.swing.JMenu(); - resetMenu = new javax.swing.JMenuItem(); - conectionsLeft = new javax.swing.JMenuItem(); - jSeparator1 = new javax.swing.JPopupMenu.Separator(); - exit = new javax.swing.JMenuItem(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - maxLabel.setText("Max:"); - - minLabel.setText("Min"); - - currentTime.setText("Current Time:"); - - elapsedTime.setText("Elapsed Time:"); - - maxValue.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); - maxValue.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - maxValueActionPerformed(evt); - } - }); - - minValue.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); - minValue.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - minValueActionPerformed(evt); - } - }); - - bpmLabel.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N - bpmLabel.setText("BPM:"); - - opModeLabel.setText("Operating Mode:"); - - connectionButton.setText("Connect"); - connectionButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - connectionButtonActionPerformed(evt); - } - }); - - textSpace.setColumns(20); - textSpace.setRows(5); - jScrollPane1.setViewportView(textSpace); - - bpmValue.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N - bpmValue.setText("200"); - - opModeValue.setText("Local"); - - currentTimeValue.setText("00:00:00"); - - elapsedTimeValue.setText("00:00:00"); - - sendBPM.setText("Send "); - sendBPM.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - sendBPMActionPerformed(evt); - } - }); - - jLabel1.setText("Send new Heart Beat value"); - - menuExit.setText("File"); - - resetMenu.setText("Reset"); - resetMenu.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - resetMenuActionPerformed(evt); - } - }); - menuExit.add(resetMenu); - - conectionsLeft.setText("Conections Left"); - conectionsLeft.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - conectionsLeftActionPerformed(evt); - } - }); - menuExit.add(conectionsLeft); - menuExit.add(jSeparator1); - - exit.setText("EXIT"); - exit.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - exitActionPerformed(evt); - } - }); - menuExit.add(exit); - - jMenuBar1.add(menuExit); - - setJMenuBar(jMenuBar1); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(opModeLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(opModeValue, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(minLabel) - .addGap(13, 13, 13) - .addComponent(minValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(12, 12, 12) - .addComponent(connectionButton) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(currentTime, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(elapsedTime, javax.swing.GroupLayout.Alignment.TRAILING)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(currentTimeValue) - .addComponent(elapsedTimeValue, javax.swing.GroupLayout.Alignment.TRAILING))) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bpmLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bpmValue) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(maxLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addContainerGap()) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(sendBPM) - .addGap(168, 168, 168)))) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(17, 17, 17) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(currentTime) - .addComponent(currentTimeValue)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(elapsedTime) - .addComponent(elapsedTimeValue))) - .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(opModeLabel) - .addComponent(connectionButton) - .addComponent(opModeValue)))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(32, 32, 32) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(maxLabel) - .addComponent(maxValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createSequentialGroup() - .addGap(33, 33, 33) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(minLabel) - .addComponent(minValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGroup(layout.createSequentialGroup() - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bpmLabel) - .addComponent(bpmValue)))) - .addGap(30, 30, 30) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(sendBPM) - .addComponent(jLabel1)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE) - .addContainerGap()) - ); - - pack(); - }// //GEN-END:initComponents - - private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed - running = false; - }//GEN-LAST:event_exitActionPerformed - - private void conectionsLeftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_conectionsLeftActionPerformed - hb.isAutomatic(); - try { - int temp = hb.getRandom(); - a.check(temp); - if (a.alarm != null) { - alterText(a.info()); - a.alarm = null; - } else { - alterText(hb.genTime(temp)); - } - } catch (InterruptedException ex) { - Logger.getLogger(ClientApp.class.getName()).log(Level.SEVERE, null, ex); - } - }//GEN-LAST:event_conectionsLeftActionPerformed - - private void resetMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetMenuActionPerformed - textSpace.setText(null); - }//GEN-LAST:event_resetMenuActionPerformed - - private void connectionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_connectionButtonActionPerformed - if (!connect) { - setConnection(!connect); - alterText("Min set to: " + lowValue + "\tMax set to: " + highValue); - } else { - setConnection(!connect); - } - - - }//GEN-LAST:event_connectionButtonActionPerformed - - private void minValueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_minValueActionPerformed - testDropDowns("min"); - }//GEN-LAST:event_minValueActionPerformed - - private void maxValueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maxValueActionPerformed - testDropDowns("max"); - }//GEN-LAST:event_maxValueActionPerformed -//send a user inputted BPM - private void sendBPMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendBPMActionPerformed - try { - //set the high and low value of the BPM for the alarm - a.setHigh(Integer.parseInt(maxValue.getSelectedItem().toString())); - a.setLow(Integer.parseInt(minValue.getSelectedItem().toString())); - //create a random bpm based on the user input - heartbeatValue = hb.getRandom(); - updateBpm(String.valueOf(heartbeatValue)); - //check with the alarm if the value is between the high and low - a.check(heartbeatValue); - } catch (InterruptedException ex) { - Logger.getLogger(ClientApp.class.getName()).log(Level.SEVERE, null, ex); - } - //log the alarm if it is triggered - if (a.alarm != null) { - alterText(a.info()); - a.alarm = null; - } - - }//GEN-LAST:event_sendBPMActionPerformed - - public void updateTime() { - now = Calendar.getInstance(); - Date time = now.getTime(); - currentTimeValue.setText(dateFormat.format(time)); - elapsedTimeValue.setText(dateFormat.format((time.getTime() - start.getTimeInMillis() - 3600000))); - } - - private void testDropDowns(String v) { - if (maxValue.getSelectedItem() != null && maxValue.getSelectedItem().toString() != null) { - if (minValue.getSelectedItem() != null && minValue.getSelectedItem().toString() != null) { - highValue = Integer.parseInt(maxValue.getSelectedItem().toString()); - lowValue = Integer.parseInt(minValue.getSelectedItem().toString()); - if (highValue <= lowValue) { - switch (v) { - case "max": - maxValue.setSelectedItem(oldHighValue); - break; - case "min": - minValue.setSelectedItem(oldLowValue); - break; - } - Component frame = null; - JOptionPane.showMessageDialog(frame, "The \"Max Value\" must be more than the \"Min Value\"!"); - } else { - switch (v) { - case "max": - oldHighValue = highValue; - break; - case "min": - oldLowValue = lowValue; - break; - } - highLowValue = highValue + "," + lowValue; - } - } - } - } - - public String getMaxMin() { - return highLowValue; - } - - public void setConnection(boolean connected) { - if (connected) { - connect = true; - maxValue.setEnabled(false); - minValue.setEnabled(false); - opModeValue.setText("Remote"); - connectionButton.setText("Disconnect"); - } else { - opModeValue.setText("Local"); - connectionButton.setText("Connect"); - connect = false; - maxValue.setEnabled(true); - minValue.setEnabled(true); - } - } - - public void alterText(String text) { - now = Calendar.getInstance(); - textSpace.append(dateFormat.format(now.getTime()) + " | " + text + "\n"); - } -//update the bpm text with the value recieved from the heartbeat class - - public void updateBpm(String bpm) { - bpmValue.setText(bpm); - } - - public int getHb() { - return heartbeatValue; - } - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel bpmLabel; - private javax.swing.JLabel bpmValue; - private javax.swing.JMenuItem conectionsLeft; - private javax.swing.JButton connectionButton; - private javax.swing.JLabel currentTime; - private javax.swing.JLabel currentTimeValue; - private javax.swing.JLabel elapsedTime; - private javax.swing.JLabel elapsedTimeValue; - private javax.swing.JMenuItem exit; - private javax.swing.JLabel jLabel1; - private javax.swing.JMenuBar jMenuBar1; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JPopupMenu.Separator jSeparator1; - private javax.swing.JLabel maxLabel; - private javax.swing.JComboBox maxValue; - private javax.swing.JMenu menuExit; - private javax.swing.JLabel minLabel; - private javax.swing.JComboBox minValue; - private javax.swing.JLabel opModeLabel; - private javax.swing.JLabel opModeValue; - private javax.swing.JMenuItem resetMenu; - private javax.swing.JButton sendBPM; - private javax.swing.JTextArea textSpace; - // End of variables declaration//GEN-END:variables - - @Override - public void run() { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } -} diff --git a/src/cm3033/lab2/ex3/HeartBeat.java b/src/cm3033/lab2/ex3/HeartBeat.java deleted file mode 100644 index b8625a5..0000000 --- a/src/cm3033/lab2/ex3/HeartBeat.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.util.Random; -import javax.swing.JOptionPane; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * - * @author Florin Mazilu 1114040 - */ -public class HeartBeat { -//create a random for the BPM - - private Random r; - //set a max value that the BPM can be - private int max; - //returns the automatic bpm - private int autoBPM; - - //boolean that decides if the bpm should be user inputted or automatic - private boolean automatic = false; - //gen date time for logging when a BPM is automaticly generated - private final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); - private Calendar start = null; - - //constructor - public HeartBeat(int max) { - r = new Random(); - this.max = max; - } -//set automatic true - - public void isAutomatic() { - automatic = true; - } - - public String genTime(int rand) throws InterruptedException { - start = Calendar.getInstance(); - Date time = start.getTime(); - String str = "BPM generated : " + rand + ", generated at :" + dateFormat.format(time); - return str; - } -//generate a random integer between 0 and the max value - - public int getRandom() throws InterruptedException { - //generate a temp value for the random; - int temp = 0; - if (automatic) { - temp = r.nextInt(max); - } else { //if the input is not automatic prompt the user for an input and a random number between 0-10 for variation - //user validation for using only numbers - boolean isValid = false; - //checks for the numbers being between 0 and 999 - String check1 = "[0-9]"; - String check2 = "[0-9]{0,9}"; - String check3 = "[0-9]{0,9}[0-9]"; - while (!isValid) { - String str = JOptionPane.showInputDialog("Insert Next Heart Beat value(only numbers between 1-300)"); - if (str != null) { - if (str.matches(check1) || str.matches(check2) || str.matches(check3)) { - temp = Integer.parseInt(str) + r.nextInt(10); - //check for the values to be between 0-300 as there will never be a bpm that high - if (temp > 0 && temp < 300) { - isValid = true; - } else { - JOptionPane.showMessageDialog(null, "Please only use values lower than 300"); - } - } else { - JOptionPane.showMessageDialog(null, "Please only use numerical values"); - - } - } - } - } - return temp; - } - -} diff --git a/src/cm3033/lab2/ex3/MainAppEx3.java b/src/cm3033/lab2/ex3/MainAppEx3.java deleted file mode 100644 index ff89076..0000000 --- a/src/cm3033/lab2/ex3/MainAppEx3.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.io.IOException; -import java.net.ServerSocket; -import java.net.Socket; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -/** - * - * @author David - */ -public class MainAppEx3 { - - public static void main(String[] args) { - int tpSize = 5; - ServerApp sv = new ServerApp(); - sv.setVisible(true); - ThreadPoolExecutor pool = new ThreadPoolExecutor( - tpSize, - tpSize, - 50000L, - TimeUnit.MILLISECONDS, - new LinkedBlockingQueue()); - try { - ServerSocket s = new ServerSocket(8189); - System.out.println("Server>Waiting For Clients..."); - // listen for a connection request on server socket s - // incoming is the connection socket - for (;;) { - Socket incoming = s.accept(); - pool.execute(new Server(incoming, sv)); - } - } catch (IOException e) { - System.out.println(e); - } - pool.shutdown(); - } -} diff --git a/src/cm3033/lab2/ex3/Server.java b/src/cm3033/lab2/ex3/Server.java deleted file mode 100644 index 6511307..0000000 --- a/src/cm3033/lab2/ex3/Server.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.net.Socket; - -/** - * - * @author David - */ -public class Server implements Runnable { - - private Socket incoming; - ServerApp sv; - - public Server(Socket incoming, ServerApp sv) { - this.incoming = incoming; - this.sv = sv; - sv.setVisible(true); - } - - @Override - public void run() { - try { - String s; - // set up streams for bidirectional transfer - // across connection socket - BufferedReader in = new BufferedReader(new InputStreamReader(incoming.getInputStream())); - PrintWriter out = new PrintWriter(incoming.getOutputStream(), true /* auto flush */); - out.println("You are connected to " - + incoming.getLocalAddress().getHostName() - + " on port " + incoming.getLocalPort() - ); - out.println("Type BYE to quit"); - System.out.println(incoming.getLocalAddress().getHostName() + " Connected"); - s = incoming.getLocalAddress().getHostName() + " Connected" + "\n"; - sv.appendText(s); - boolean done = false; - while (!done) { - String str = in.readLine(); - if (str == null) { - done = true; - } else { - out.println("Recieved: " + str); - if (str.trim().equals("BYE")) { - System.out.println(incoming.getLocalAddress().getHostName() + " Disconnected"); - s = incoming.getLocalAddress().getHostName() + " Disconnected" + "\n"; - sv.appendText(s); - done = true; - } - } - } - incoming.close(); - } catch (IOException e) { - System.out.println(e); - } - } -} diff --git a/src/cm3033/lab2/ex3/ServerApp.form b/src/cm3033/lab2/ex3/ServerApp.form deleted file mode 100644 index 63e15db..0000000 --- a/src/cm3033/lab2/ex3/ServerApp.form +++ /dev/null @@ -1,177 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/cm3033/lab2/ex3/ServerApp.java b/src/cm3033/lab2/ex3/ServerApp.java deleted file mode 100644 index 10f4e0e..0000000 --- a/src/cm3033/lab2/ex3/ServerApp.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package cm3033.lab2.ex3; - -/** - * - * @author Mazzy - */ -public class ServerApp extends javax.swing.JFrame { - - /** - * Creates new form ServerApp - */ - public ServerApp() { - initComponents(); - } - - public void con(int count) { - if (count == 1) { - con1.setSelected(true); - } - if (count == 3) { - con3.setSelected(true); - } - if (count == 4) { - con4.setSelected(true); - } - if (count == 2) { - con2.setSelected(true); - } - - } - - public void setCount(int Count) { - con(Count); - } - - public void appendText(String s) { - jTextArea1.append(s); - } - - /** - * This method is called from within the constructor to initialize the form. - * WARNING: Do NOT modify this code. The content of this method is always - * regenerated by the Form Editor. - */ - @SuppressWarnings("unchecked") - // //GEN-BEGIN:initComponents - private void initComponents() { - - jScrollPane1 = new javax.swing.JScrollPane(); - jTextArea1 = new javax.swing.JTextArea(); - jLabel1 = new javax.swing.JLabel(); - jLabel2 = new javax.swing.JLabel(); - jLabel3 = new javax.swing.JLabel(); - jLabel4 = new javax.swing.JLabel(); - con1 = new javax.swing.JCheckBox(); - con2 = new javax.swing.JCheckBox(); - jSeparator1 = new javax.swing.JSeparator(); - jSeparator2 = new javax.swing.JSeparator(); - con3 = new javax.swing.JCheckBox(); - jSeparator3 = new javax.swing.JSeparator(); - con4 = new javax.swing.JCheckBox(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - - jTextArea1.setColumns(20); - jTextArea1.setRows(5); - jScrollPane1.setViewportView(jTextArea1); - - jLabel1.setText("Client 1"); - - jLabel2.setText("Client 2"); - - jLabel3.setText("Client 3"); - - jLabel4.setText("Client 4"); - - con1.setText("Connected"); - con1.setEnabled(false); - - con2.setText("Connected"); - con2.setEnabled(false); - - con3.setText("Connected"); - con3.setEnabled(false); - con3.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - con3ActionPerformed(evt); - } - }); - - con4.setText("Connected"); - con4.setEnabled(false); - con4.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - con4ActionPerformed(evt); - } - }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(80, 80, 80) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(30, 30, 30) - .addComponent(jLabel1)) - .addGroup(layout.createSequentialGroup() - .addGap(20, 20, 20) - .addComponent(con1))) - .addGap(0, 0, 0) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel2) - .addComponent(con2)) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel3) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(con3))) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jLabel4) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(con4))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel1) - .addComponent(jLabel2) - .addComponent(jLabel3) - .addComponent(jLabel4)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(con1) - .addComponent(con2, javax.swing.GroupLayout.Alignment.TRAILING)) - .addComponent(con3, javax.swing.GroupLayout.Alignment.TRAILING)) - .addComponent(con4, javax.swing.GroupLayout.Alignment.TRAILING))) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 392, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - - pack(); - }// //GEN-END:initComponents - - private void con3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_con3ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_con3ActionPerformed - - private void con4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_con4ActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_con4ActionPerformed - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JCheckBox con1; - private javax.swing.JCheckBox con2; - private javax.swing.JCheckBox con3; - private javax.swing.JCheckBox con4; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel4; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JSeparator jSeparator1; - private javax.swing.JSeparator jSeparator2; - private javax.swing.JSeparator jSeparator3; - private javax.swing.JTextArea jTextArea1; - // End of variables declaration//GEN-END:variables -} From 8ca0ee0815f379ecac48debd31f9209fd83fe76c Mon Sep 17 00:00:00 2001 From: FlorinMazilu Date: Thu, 19 Dec 2013 11:20:01 +0200 Subject: [PATCH 4/5] cannot change branches without commiting... --- build/built-jar.properties | 4 ++-- build/classes/CM3033Tests/DataShare.class | Bin 0 -> 1206 bytes build/classes/CM3033Tests/ServerApp$1.class | Bin 0 -> 763 bytes build/classes/CM3033Tests/ServerApp$2.class | Bin 0 -> 763 bytes build/classes/CM3033Tests/ServerApp.class | Bin 0 -> 13066 bytes build/classes/CM3033Tests/StartServer.class | Bin 0 -> 1716 bytes build/classes/CM3033Tests/TestClientStart.class | Bin 0 -> 894 bytes nbproject/private/private.xml | 9 +++++---- 8 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 build/classes/CM3033Tests/DataShare.class create mode 100644 build/classes/CM3033Tests/ServerApp$1.class create mode 100644 build/classes/CM3033Tests/ServerApp$2.class create mode 100644 build/classes/CM3033Tests/ServerApp.class create mode 100644 build/classes/CM3033Tests/StartServer.class create mode 100644 build/classes/CM3033Tests/TestClientStart.class diff --git a/build/built-jar.properties b/build/built-jar.properties index 8f3975b..ae3e442 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Thu, 19 Dec 2013 02:53:37 +0000 +#Thu, 19 Dec 2013 11:16:19 +0200 -/home/marina/NetBeansProjects/Coursework= +C\:\\Users\\Mazzy\\Documents\\GitHub\\CM3033= diff --git a/build/classes/CM3033Tests/DataShare.class b/build/classes/CM3033Tests/DataShare.class new file mode 100644 index 0000000000000000000000000000000000000000..d10c57bcf953a50440d86036b03982029475ff64 GIT binary patch literal 1206 zcmZ{j-%b-z5XQgLZvSjq0c%@O6ct6=B2;ZOQNct@Oh{TyDB*&;ZP}D1Wt(ib#)tAk z?S+XKK7bEp{APE%m}N`C%+5J8-~7&*(?5TI{RYs)b^&>8>d4`dn8#wOVrqHRbJ)t^ zi9)VFavZDgDX0?#J&deV?zj`jv7LcJ_QL$qu^okC``r9&Hio7%XmmZ7n{T+gYdg00 zRv}%j9V=+9(W#}d)V3Y#r(I&E}Cc z_Qs8U(=)qgrfX4Mx5up+AsdjfFt)sCNvobn(}gHY$c@Vk2`Oi8EGj^u zoOl5W%a=F)sdvsn;XWsr=YTaFh#0>PM9=q>^gUJS3)E##+Uty(^lXJp{U_9Sexy+J zlTx(nl)H-?{4#H&%u!A#dnX5=yAPd lEPur`=ga@JHicHqhPwRm%N`X2TVid6FKv}o54e`X!+#J}owWb} literal 0 HcmV?d00001 diff --git a/build/classes/CM3033Tests/ServerApp$1.class b/build/classes/CM3033Tests/ServerApp$1.class new file mode 100644 index 0000000000000000000000000000000000000000..33074563797d8b9b8f5ac4a84cb5b075b6b4051b GIT binary patch literal 763 zcmaJmul=04{(U-y|v-i%;nRCzm`2FYSF90393Q)zf5OdfHv4L$L&wcFp*cF(!*Q#i= z1=f?^S*P9UTu@<)_?+?y<=yf4gduO0R`#91X7e7*L0_QSGeZ(sPL!sPx1#~&7jlqs zImzcl%Xh5|dyeS2K7)I4*J;THJRg?%tO@ct~%Zxk57P*ql@gl=DUl8 zt;25+t?%%@mY9hD{EFd=SYkhNKEJAAg)J`u9#0v%Q-+{*2XXiVmHz~xqxP1t;MGc! kwK7#OC2=yIV3lbqSYuKT>v+nx${W3jdYO*bkS%|I0k2f4(EtDd literal 0 HcmV?d00001 diff --git a/build/classes/CM3033Tests/ServerApp$2.class b/build/classes/CM3033Tests/ServerApp$2.class new file mode 100644 index 0000000000000000000000000000000000000000..5ee3fbf66b213f47eeaaebdcb8bef45d5b6bc69e GIT binary patch literal 763 zcmaJS{_!+)9lv7?Y;K#AHztNZ+U1D=gX0G&@86T_zfh z5B>mul=04{(U-y|v-i%;nRCzm`2FYSF92OU4^YR$5DVB2v56fYk9_R<*b`W^m$`{M z0vl=nq}%Cs&&gPmoKZQYvNxF=G2~6Ia{E?bt91ire;`or>k$d8q`9IG*W)3T=WRz z$j>&RDJh%uD#)?(kDRO;O|8K8Z7_lGOkbB7y~~~6<$txmaNL~sSY?Gaxw<$Zd#Oi0 z9!GeBrxAQCMF^Z1;~BSbZU^H-fkvgWkm@4&IJ}~aCGE@=p6139_d}pLmyG4PVf6KQ zq7~Q39jmomouSM!GA4f6;aR@EX;8PdVSj)oX@Y8agQx80q)NjdNYQg{T1Ti2WtNbLPzbbVaaP& kBPx# literal 0 HcmV?d00001 diff --git a/build/classes/CM3033Tests/ServerApp.class b/build/classes/CM3033Tests/ServerApp.class new file mode 100644 index 0000000000000000000000000000000000000000..2855ed78a8e6be692434133673d5130c9c1afd21 GIT binary patch literal 13066 zcmb7L34B~t)j#LWWZul=C7DdqCEZBvo-S#cv_M+grfJ%wCT(p(p_HZ5TtHxvaGSJd+T&wcOBdoz<3VaPe>o_p>& zclqD-_xjke`|c;A25n-PZsXBH#)Rp19vgx*PDr(o@j@o(JTb_V!W87ml0HdDO_-H5SW7cUG;@W_6Ea^&osb1W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>Y)^Wsdv)h$8}oRF_o8}25UL6IewVW>zk=ULssr&Na9`#- z8W_*wJ&xl&0A?}AS&X6HXAmwHDbAv_J<(RX2-Rk0CNT06kuIXO4zvzNOI^e`)XQCr z)y8LEbr4?;zr>lu*+ZP04j6zc5s^aZh+9T9To)R08a~lD a#SzsFpV~m*XZW1>Fk?;f|3wh}%YOiGGNsr6 literal 0 HcmV?d00001 diff --git a/build/classes/CM3033Tests/TestClientStart.class b/build/classes/CM3033Tests/TestClientStart.class new file mode 100644 index 0000000000000000000000000000000000000000..489fc85eb2447143cb48e62219ea47e77d9f9509 GIT binary patch literal 894 zcmZuvZEw<06n<_g6uRz3wt1pVHoZOPIp;jjIj8;g`^QfJRXj5>j~xSL1CMjC@Wez4PfcjB4eXjQ z5@*lAz6n!hRty|4X!4k$=+@4wN7ZV>i)7@yckdpEdkd0~UMdW7WNpv`-iJQT|R3+l2fB8H7AcBN743D1{x$wNsR`YjheL&3gs zZ}>;<^tj(~>M|65=Oh;8VTWjz{}ZML+cB5w;I6pQ4LyEM)VU=3=EE6-`RY^K>q`;% zk%2>o>?sA4;mmq42;1Ikp+;Gm>F`kTT3Et8hNW2z(w$sgGMI%0EUF4e9Y+kS|K_~t z_bnVN&Z*#d_Y9@UqM4qiI=N`wcx_1wiklOGb9ONvm0``ETK`xeUTx8y*xLJn@2jsD zN79k{I@qFLX`X&ChPP@cvQlKzF6hjY=g^zcJH0mq`$C3>WjZr4xPTS1tt0`fD3F&! z5%(!e6@NyW=zxO}wB`t@=2z%Lq=(4331TEjmXPzxcjWfzxf3Z+Ifyn-lx3{JMhO+H z$D*4FF&+>O$|%vjPK}hQfeo@WJS1EvsNB{r; literal 0 HcmV?d00001 diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index b90240a..b00184c 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -3,10 +3,11 @@ - file:/Users/samc/Desktop/CM3033/src/CM3033Tests/StartServer.java - file:/Users/samc/Desktop/CM3033/src/CM3033Tests/TestClientStart.java - file:/Users/samc/Desktop/CM3033/src/CM3033Tests/Server.java - file:/Users/samc/Desktop/CM3033/src/CM3033Tests/Test1.java + file:/C:/Users/Mazzy/Documents/GitHub/CM3033/src/CM3033Tests/Client.java + file:/C:/Users/Mazzy/Documents/GitHub/CM3033/src/CM3033Tests/ClientApp.java + file:/C:/Users/Mazzy/Documents/GitHub/CM3033/src/CM3033Tests/Server.java + file:/C:/Users/Mazzy/Documents/GitHub/CM3033/src/CM3033Tests/StartServer.java + file:/C:/Users/Mazzy/Documents/GitHub/CM3033/src/CM3033Tests/TestClientStart.java From 76ae155d0b57e1966ede1a22d7e441a6998a20ee Mon Sep 17 00:00:00 2001 From: "sam.cusson@hotmail.co.uk" Date: Thu, 19 Dec 2013 20:29:04 +0000 Subject: [PATCH 5/5] Small Updates, BPM requires vague redesign... --- .gitignore | 1 + build.xml | 0 build/built-jar.properties | 8 +- build/classes/CM3033Tests/Client.class | Bin build/classes/CM3033Tests/ClientApp$1.class | Bin build/classes/CM3033Tests/ClientApp$2.class | Bin build/classes/CM3033Tests/ClientApp$3.class | Bin build/classes/CM3033Tests/ClientApp$4.class | Bin build/classes/CM3033Tests/ClientApp$5.class | Bin build/classes/CM3033Tests/ClientApp$6.class | Bin build/classes/CM3033Tests/ClientApp.class | Bin build/classes/CM3033Tests/DataShare.class | Bin build/classes/CM3033Tests/Server.class | Bin 2384 -> 2513 bytes build/classes/CM3033Tests/ServerApp$1.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ServerApp$2.class | Bin 763 -> 763 bytes build/classes/CM3033Tests/ServerApp.class | Bin 13066 -> 15940 bytes build/classes/CM3033Tests/StartServer.class | Bin 1716 -> 2096 bytes .../classes/CM3033Tests/TestClientStart.class | Bin manifest.mf | 0 nbproject/build-impl.xml | 0 nbproject/genfiles.properties | 0 nbproject/private/private.properties | 2 +- nbproject/private/private.xml | 0 nbproject/project.properties | 0 nbproject/project.xml | 0 src/CM3033Tests/Client.java | 1 + src/CM3033Tests/ClientApp.form | 0 src/CM3033Tests/ClientApp.java | 0 src/CM3033Tests/DataShare.java | 0 .../MyRejectedExecutionHandlerImpl.java | 22 + src/CM3033Tests/Server.java | 17 +- src/CM3033Tests/ServerApp.form | 229 +++++---- src/CM3033Tests/ServerApp.java | 477 +++++++++++------- src/CM3033Tests/StartServer.java | 25 +- src/CM3033Tests/TestClientStart.java | 0 35 files changed, 500 insertions(+), 282 deletions(-) create mode 100644 .gitignore mode change 100644 => 100755 build.xml mode change 100644 => 100755 build/built-jar.properties mode change 100644 => 100755 build/classes/CM3033Tests/Client.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$1.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$2.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$3.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$4.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$5.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp$6.class mode change 100644 => 100755 build/classes/CM3033Tests/ClientApp.class mode change 100644 => 100755 build/classes/CM3033Tests/DataShare.class mode change 100644 => 100755 build/classes/CM3033Tests/Server.class mode change 100644 => 100755 build/classes/CM3033Tests/ServerApp$1.class mode change 100644 => 100755 build/classes/CM3033Tests/ServerApp$2.class mode change 100644 => 100755 build/classes/CM3033Tests/ServerApp.class mode change 100644 => 100755 build/classes/CM3033Tests/StartServer.class mode change 100644 => 100755 build/classes/CM3033Tests/TestClientStart.class mode change 100644 => 100755 manifest.mf mode change 100644 => 100755 nbproject/build-impl.xml mode change 100644 => 100755 nbproject/genfiles.properties mode change 100644 => 100755 nbproject/private/private.properties mode change 100644 => 100755 nbproject/private/private.xml mode change 100644 => 100755 nbproject/project.properties mode change 100644 => 100755 nbproject/project.xml mode change 100644 => 100755 src/CM3033Tests/Client.java mode change 100644 => 100755 src/CM3033Tests/ClientApp.form mode change 100644 => 100755 src/CM3033Tests/ClientApp.java mode change 100644 => 100755 src/CM3033Tests/DataShare.java create mode 100755 src/CM3033Tests/MyRejectedExecutionHandlerImpl.java mode change 100644 => 100755 src/CM3033Tests/Server.java mode change 100644 => 100755 src/CM3033Tests/ServerApp.form mode change 100644 => 100755 src/CM3033Tests/ServerApp.java mode change 100644 => 100755 src/CM3033Tests/StartServer.java mode change 100644 => 100755 src/CM3033Tests/TestClientStart.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..838458f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dist/ \ No newline at end of file diff --git a/build.xml b/build.xml old mode 100644 new mode 100755 diff --git a/build/built-jar.properties b/build/built-jar.properties old mode 100644 new mode 100755 index ae3e442..6c01d54 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Thu, 19 Dec 2013 11:16:19 +0200 - - -C\:\\Users\\Mazzy\\Documents\\GitHub\\CM3033= +#Thu, 19 Dec 2013 19:48:40 +0000 + + +H\:\\CM_3033\\Java\\CM3033-marina= diff --git a/build/classes/CM3033Tests/Client.class b/build/classes/CM3033Tests/Client.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$1.class b/build/classes/CM3033Tests/ClientApp$1.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$2.class b/build/classes/CM3033Tests/ClientApp$2.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$3.class b/build/classes/CM3033Tests/ClientApp$3.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$4.class b/build/classes/CM3033Tests/ClientApp$4.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$5.class b/build/classes/CM3033Tests/ClientApp$5.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp$6.class b/build/classes/CM3033Tests/ClientApp$6.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/ClientApp.class b/build/classes/CM3033Tests/ClientApp.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/DataShare.class b/build/classes/CM3033Tests/DataShare.class old mode 100644 new mode 100755 diff --git a/build/classes/CM3033Tests/Server.class b/build/classes/CM3033Tests/Server.class old mode 100644 new mode 100755 index 9104f34059d3d7dc649dab66258e4d8acd06e2d1..a6dc40569a882c3d5d7b812b747843c00a6c7f61 GIT binary patch delta 1384 zcmZ{k?Nd~B6vscm-Mif7a#33z6ogpA5Ef-E4C5h;hg1p>#Zbx~R=D6AvfHxIleJ|U zMP$;Jg_b?eIL$Pb6_+t)eA!IBsyDs!f9QP=bbh-6GtKno{C?-0@A;ndJLlZ{Yv8wn z)Gz=1cmt^C3yToFxzun#i#{z5njA9ew>Zqh7C8)9_&8#6R9gluEFLj=)FPi=Esptl zOrMWy_Y)RR67h3fD?{2mtOJ}}Mi}*T!Xk=eb#juYED>Xx`ji&q7BS*}p7xXQGoiJl zpGggx(p=A&JgbABGkM`OgV|VlaZ;2&D}KHY-fi}9bucD+?77<*`0dP<|R_v{jwIXC<-(_9F2wh64CMG zkwi4@HW!#PdB^5{((;I4$107dR1B&%o+iFP)qgov4 zx}1SLYj`zb`bQgO(*wC z(k7a-sXZ-1nggnR3E$unIfJ1e@VJFw6o?WibV=PZ6$!$n*k$8)Y+4Hx`W0|VHe6F>fTiA6Z-Y^OiTSgJ5?({+DKcC( zuP82MwJzoJ%Qxk?-KC<*SK|ALk(I&%L7l(EC&d3v9oQnqHBYI&Rs`;Fshnrq|5dnk zg{ahMy}BG-E8|YN%1f%QlGiQ4Qcd+W=_#r~r5f2LZPqgzk$E9nG1XMbMjVr`@0?72 zT4p~Zvp+AWIho)UncSB$mTzg{I<4H0PvCdj`GW`en|-Q+F13YjwUq-ZOrL6?Uo~=2 zHE~F_$MNvT#q9Gv$lSo30(G6_KM%=|^z-TlZ z%>$G5Mb;NVEpItTWw4}54_0~bq~6t|C(l}C71-Y(lv-s?P50Md|Nq@R-90~)d>_qz zxAf&#Ksz7VY^T4F2KH<5s1^ro26)Wkpv57Z!#r+dF=!L!h{aKTGh|c5F^eZ`*3qxU z@d!_9eL}mRvU!?#gp=AB*4HDNkSOF7qY+Nqog_)LL#%7FXBcvjvBaCb7xd<6e zp0Mz20Z&>?Sv+rXcIKO(Ok*OR|5#1stBht_iaZ)Pz5IYtTh&IVLyRVeW?CHXpw;39 zhZi}Q&l(-smmFT^yh9sVEiNcZ&cvtUt;uxjKqi^;j%1QvBIEE1uWJ8A#iqbN7Eg_~ z9`Xb-x^pr)Hli_?xU495htiX7Jd<#T)2UQq*h`GKUfR{(D-P4VW^vWw8aYLwo9;=u z$4;Z1T5Z}GOpj6*lq6-Dl@wJ;WWhj)0_;XQH|?>l@zE`QP7+CIw-MX}qP zoLEchFh}PS^S+01fTsluK}c!SA_=4wQVoi!aB)T%TfQmKEW5jCa zF=H+BgjzyA1-Al9yT~dTw*UoRO(8Y18MTy9M+KX?OFS|0WHsP!?h#X;bOkCnbw~|H zaJpBjFy;0>I#+5?zfm9$s&bL=&?44Q>~jpC$O456*!_zX{e9zv7AW4|yvVwt1=b77 z^w|*I=o4LGl=xXn#fp}#U6l*MXOmCGr%3!&qJ%H;SFlwpSRE<=R-0Y5H#pzqQ!~5# zhp1Ygy3SB#=vz*$rjBkFQl+#f`k&a@^-=dg8$Vxco1d$+pSf?jR?S>oSKqI`~97 z{RQ{)BM(yzF>@9GUho>3*!M9XgR+NuS?R`^Q-Ln zLo&r_uF%6yOyODVqBkfmn0uSlv|HXf3YM6*c-WFGe{#-PmX%Q!d$j1Ygs@jo2K)X3 DD=+O* diff --git a/build/classes/CM3033Tests/ServerApp$1.class b/build/classes/CM3033Tests/ServerApp$1.class old mode 100644 new mode 100755 index 33074563797d8b9b8f5ac4a84cb5b075b6b4051b..a2e0edc580d04558df8c776831456ae67c4d3cbc GIT binary patch delta 25 hcmey(`kQq_2@?}T@8mKjdp3rC1`dV^lXo*Y003{=2fY9Q delta 25 gcmey(`kQq_2@?|&_vA7rdp0Is1`Z~^$-9{x0ASz-Jpcdz diff --git a/build/classes/CM3033Tests/ServerApp$2.class b/build/classes/CM3033Tests/ServerApp$2.class old mode 100644 new mode 100755 index 5ee3fbf66b213f47eeaaebdcb8bef45d5b6bc69e..cfcc4a4f92ec1568595367b2b28e6e4a5cc664b4 GIT binary patch delta 25 hcmey(`kQq_2@?~;)X8N`_G}E(88{ebOy14p003~x2h{)o delta 25 gcmey(`kQq_2@?~O(Bv{Edp0H!1`a0C$-9{x0AaEQQUCw| diff --git a/build/classes/CM3033Tests/ServerApp.class b/build/classes/CM3033Tests/ServerApp.class old mode 100644 new mode 100755 index 2855ed78a8e6be692434133673d5130c9c1afd21..fd67fadb925e2dfb36a14b927211f8508e664567 GIT binary patch literal 15940 zcmbVT31C~r(Vkt&ezNjxE6Rm)fOFzFhhsYjaZcND5+`=z#Lmqn+e)HDmK<5m!4aU) zQjV50r9f%ReV3y|38V*YDYQVLK%pFkLZRFxy=iF+|2Mnu={-qy0zV=%v$M0av%BBh z-8YgS|Ma0B5mB|=dy?(0D24}J6Y$oS0`4W?JnViSu%S^t) z8E>nx<2-afBD3}+2bcX^Z)US|B45>)Bkbt zQ%3w}eo0dJrIa2Nr8f^x7tzd*&i2bZna`C5mPGn|vcQmjKRqHgfye<&OeTeJC5xC8 z8!}+XfrbnUB0*+jEEZ1GM?*b5;T}N+TO(Vxt_?+d!-7PkAYU}T%PN}jXy;O=b^wY^ z=}LcRC>dTHPjrQnf`&G23+)V5B*VLt6^qjPIf6W~_%1<%b#-qt60N8YMZ>YqPy&^C zJ;_i4tqb5P)Vej4KnTN{>YJ;lRadu#dy+luOIN^pKz$s6cO)b6Sf%Z9cSX;xNNh{R zvX)RR9L+SU%4kxZQJRiv2t`AQuDaf2G9Ke;P{pSB7Wghv;ii4Jb|m7_DEEL4(spp4 zmf<`t!*xM>cUM!WJsi!AQ>odFZNhGBncdj3 zB3+osfUBe|U=WUmx_iQ%mVv8e8Thv8`9Oz5GUq_+5x8xFIBXGN*dn6vZ>!%L?$}-z z-wiLrGQHR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33?VFmA_z%S|! zKI98}n;t%fi#vFMDg1m+VQK3_b@_hNnDiAxA?>k&{vZ85PoD!$C*zU zKhXC$B{6vTfH7K_!3N`eL|u}RZ!=be*~~NEBs-p_{T+l3sftQW2_Z2paaUqS;uDEa ZfkTc^o>PIqd$>>QFyqGgKkH}m;9o8X7pnjO delta 769 zcmYLH$x;(h6g@9Jyrk1iVUTpd2%-!o28m-pQIR2N7z_?^KmxW_gdzwj%5ou9{(y_; zKez?TN~%ni3*EWm4=h)Hg~rp__`3SmJ@=k>?$Ev8{JCN8$KNks0VMIlLKrEDQG<}@ z`$7O?xGHhYf{By`AI2rFTL^fp8y14N8NdW?`7vo>3e#R>Mk4JoXDzhgw&&fE$av{F z56nv}NGuANV};E^>6*a72Scb|BG=uJE#=qNGx@Eh{OX1)F~m+-j+H2&-uV)ygNQ)C zIuPxuCPIFRyEd{|QcYT1b8t_MYmR!Ybp{>Wmv~^~A#&=Y);s^m#$!CO@f6Dfp@~d# zIGJ2>cS<{nth>GIZrgZ<6&nunHde7F(E2LBn@<#qiS+#Bn>BZ2Wn>l+-sP8VbI2OAE!~Mz-+Q70?C-)9R-&s)h|m zIc8sLC)e#A9|UVhXuH&+*|FEnm`MaQ;yA5c_YFjGf+&C<^zu#@Aclxc##ZE56~0^~ z(gy7iMipkR0$G7SQ$>KTHCIJ2*Ao3xft}J1(GY4ZqbaPH(VQ}3RkY;7My!lbyn@#9 z9@;+De%EOpql1ZK2W+7Si+tLl!E11YZ2=)R(#A0yW}}GHUO+#8nnBFr4B0V$pEwsc z%nhHb4>JSFd(pxJd%3QD + - - - - - - + + + - - + + + - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + - - - - + + + - + + + @@ -99,25 +106,19 @@ - + - - - - - - - - - - - - - - - - + + + + + + + + + + @@ -131,47 +132,60 @@ - - + + + + - - - - - - + - - - - + - + + + + + + + + - + - + + + + + - + - + + + + + - + - + + + + + @@ -253,7 +267,7 @@ - + @@ -264,7 +278,7 @@ - + @@ -280,7 +294,7 @@ - + @@ -410,7 +424,7 @@ - + @@ -421,7 +435,7 @@ - + @@ -437,7 +451,7 @@ - + @@ -564,7 +578,7 @@ - + @@ -575,7 +589,7 @@ - + @@ -591,8 +605,11 @@ - + + + + @@ -718,7 +735,7 @@ - + @@ -729,7 +746,7 @@ - + @@ -745,7 +762,7 @@ - + @@ -856,5 +873,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CM3033Tests/ServerApp.java b/src/CM3033Tests/ServerApp.java old mode 100644 new mode 100755 index dc73fd7..7f43cce --- a/src/CM3033Tests/ServerApp.java +++ b/src/CM3033Tests/ServerApp.java @@ -10,34 +10,32 @@ /** * - * @author Marina Shchukina 1014481@rgu.ac.uk + * @author Marina Shchukina 1014481 + * @rgu.ac.uk */ public class ServerApp extends javax.swing.JFrame implements Runnable { //////////////////////////// ////// VARIABLES /////// //////////////////////////// - // variable to store the maxLimit and minLimit private int highValue, lowValue; // variables to store the oldMaxLimit and oldMinLimit private int oldHighValue = highValue, oldLowValue = lowValue; // A date format template final DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); - // A calander to store the time of now and the time the application was started + // A calendar to store the time of now and the time the application was started Calendar now = null, start = Calendar.getInstance(); // Variable to store the Shared Data class DataShare dataShare; - - + //////////////////////////// ////// CONSTRUCTOR /////// //////////////////////////// - public ServerApp() throws IOException { // Initialise the components initComponents(); - + // set the data share to that passed to this class //dataShare = ds2; @@ -47,27 +45,26 @@ public ServerApp() throws IOException { // Add the options to the max/min /*maxValue.addItem(40); - maxValue.addItem(60); - maxValue.addItem(80); - maxValue.addItem(100); - maxValue.addItem(120); - maxValue.addItem(140); - maxValue.addItem(160); - maxValue.addItem(180); - maxValue.addItem(200); - minValue.addItem(20); - minValue.addItem(40); - minValue.addItem(60); - minValue.addItem(80); - minValue.addItem(100); - minValue.addItem(120); - minValue.addItem(140); - minValue.addItem(160); - minValue.addItem(180);*/ + maxValue.addItem(60); + maxValue.addItem(80); + maxValue.addItem(100); + maxValue.addItem(120); + maxValue.addItem(140); + maxValue.addItem(160); + maxValue.addItem(180); + maxValue.addItem(200); + minValue.addItem(20); + minValue.addItem(40); + minValue.addItem(60); + minValue.addItem(80); + minValue.addItem(100); + minValue.addItem(120); + minValue.addItem(140); + minValue.addItem(160); + minValue.addItem(180);*/ } - /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -78,12 +75,12 @@ public ServerApp() throws IOException { private void initComponents() { topPanel = new javax.swing.JPanel(); - elapsedTimeValue = new javax.swing.JLabel(); - jLabel1 = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); - currentTime = new javax.swing.JLabel(); - elapsedTime = new javax.swing.JLabel(); - currentTimeValue = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + jCheckBox1 = new javax.swing.JCheckBox(); + jCheckBox2 = new javax.swing.JCheckBox(); + jCheckBox3 = new javax.swing.JCheckBox(); + jCheckBox4 = new javax.swing.JCheckBox(); Connection1 = new javax.swing.JPanel(); bpmLabel1 = new javax.swing.JLabel(); bpmValue1 = new javax.swing.JLabel(); @@ -129,39 +126,66 @@ private void initComponents() { jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); + elapsedTimeValue = new javax.swing.JLabel(); + currentTimeValue = new javax.swing.JLabel(); + elapsedTime = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + currentTime = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - elapsedTimeValue.setText("00:00:00"); - jLabel1.setText("Connections"); - currentTime.setText("Current Time:"); + jCheckBox1.setText("Patient 1"); + jCheckBox1.setEnabled(false); + jCheckBox1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCheckBox1ActionPerformed(evt); + } + }); - elapsedTime.setText("Elapsed Time:"); + jCheckBox2.setText("Patient 2"); + jCheckBox2.setEnabled(false); + jCheckBox2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCheckBox2ActionPerformed(evt); + } + }); - currentTimeValue.setText("00:00:00"); + jCheckBox3.setText("Patient 3"); + jCheckBox3.setEnabled(false); + jCheckBox3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCheckBox3ActionPerformed(evt); + } + }); + + jCheckBox4.setText("Patient 4"); + jCheckBox4.setEnabled(false); + jCheckBox4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCheckBox4ActionPerformed(evt); + } + }); javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel); topPanel.setLayout(topPanelLayout); topPanelLayout.setHorizontalGroup( topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(topPanelLayout.createSequentialGroup() - .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(topPanelLayout.createSequentialGroup() .addContainerGap() - .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(topPanelLayout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(elapsedTime)) - .addGroup(topPanelLayout.createSequentialGroup() - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(currentTime))) - .addGap(31, 31, 31) - .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(elapsedTimeValue, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(currentTimeValue, javax.swing.GroupLayout.Alignment.TRAILING))) + .addComponent(jLabel1) + .addGap(18, 18, 18) + .addComponent(jCheckBox1) + .addGap(29, 29, 29) + .addComponent(jCheckBox2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jCheckBox3) + .addGap(39, 39, 39) + .addComponent(jCheckBox4) + .addGap(198, 198, 198)) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 681, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE)) ); @@ -171,13 +195,11 @@ private void initComponents() { .addContainerGap() .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) - .addComponent(elapsedTimeValue) - .addComponent(currentTime)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(currentTimeValue, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(elapsedTime, javax.swing.GroupLayout.Alignment.TRAILING)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jCheckBox1) + .addComponent(jCheckBox2) + .addComponent(jCheckBox3) + .addComponent(jCheckBox4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) ); @@ -185,17 +207,17 @@ private void initComponents() { Connection1.setName("Patient 1"); // NOI18N bpmLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - bpmLabel1.setText("Patient's BPM:"); + bpmLabel1.setText("Patient's 1 BPM:"); bpmValue1.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N bpmValue1.setForeground(new java.awt.Color(45, 2, 208)); - bpmValue1.setText("200"); + bpmValue1.setText("Not Connected"); lastUpdateLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N lastUpdateLabel1.setText("Last update:"); lastUpdateValue1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - lastUpdateValue1.setText("jTextField1"); + lastUpdateValue1.setEnabled(false); maxLabel1.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N maxLabel1.setText("Max:"); @@ -270,17 +292,17 @@ private void initComponents() { Connection2.setName("Patient 1"); // NOI18N bpmLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - bpmLabel2.setText("Patient's BPM:"); + bpmLabel2.setText("Patient's 2 BPM:"); bpmValue2.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N bpmValue2.setForeground(new java.awt.Color(45, 2, 208)); - bpmValue2.setText("200"); + bpmValue2.setText("Not Connected"); lastUpdateLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N lastUpdateLabel2.setText("Last update:"); lastUpdateValue2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - lastUpdateValue2.setText("jTextField1"); + lastUpdateValue2.setEnabled(false); maxLabel2.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N maxLabel2.setText("Max:"); @@ -353,17 +375,22 @@ private void initComponents() { Connection3.setName("Patient 1"); // NOI18N bpmLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - bpmLabel3.setText("Patient's BPM:"); + bpmLabel3.setText("Patient's 3 BPM:"); bpmValue3.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N bpmValue3.setForeground(new java.awt.Color(45, 2, 208)); - bpmValue3.setText("200"); + bpmValue3.setText("Not Connected"); lastUpdateLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N lastUpdateLabel3.setText("Last update:"); lastUpdateValue3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - lastUpdateValue3.setText("jTextField1"); + lastUpdateValue3.setEnabled(false); + lastUpdateValue3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + lastUpdateValue3ActionPerformed(evt); + } + }); maxLabel3.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N maxLabel3.setText("Max:"); @@ -436,17 +463,17 @@ private void initComponents() { Connection4.setName("Patient 1"); // NOI18N bpmLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N - bpmLabel4.setText("Patient's BPM:"); + bpmLabel4.setText("Patient's 4 BPM:"); bpmValue4.setFont(new java.awt.Font("Arial", 0, 20)); // NOI18N bpmValue4.setForeground(new java.awt.Color(45, 2, 208)); - bpmValue4.setText("200"); + bpmValue4.setText("Not Connected"); lastUpdateLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N lastUpdateLabel4.setText("Last update:"); lastUpdateValue4.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N - lastUpdateValue4.setText("jTextField1"); + lastUpdateValue4.setEnabled(false); maxLabel4.setFont(new java.awt.Font("Arial", 1, 15)); // NOI18N maxLabel4.setText("Max:"); @@ -560,58 +587,74 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addContainerGap(63, Short.MAX_VALUE)) ); + elapsedTimeValue.setText("00:00:00"); + + currentTimeValue.setText("00:00:00"); + + elapsedTime.setText("Elapsed Time:"); + + currentTime.setText("Current Time:"); + jScrollPane1.setViewportView(currentTime); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addGap(27, 27, 27) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(37, 37, 37) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() - .addComponent(alarmButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(Connection2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(elapsedTime) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(Connection4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addGap(37, 37, 37)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(238, Short.MAX_VALUE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(22, 22, 22) - .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(488, Short.MAX_VALUE))) + .addComponent(elapsedTimeValue)) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(35, 35, 35) + .addComponent(currentTimeValue))) + .addGap(18, 18, 18)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addComponent(alarmButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Connection2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Connection4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(19, 19, 19)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(72, 72, 72) - .addComponent(Connection1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(Connection2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addComponent(Connection4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(currentTimeValue)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(elapsedTime) + .addComponent(elapsedTimeValue)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Connection1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Connection2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(Connection4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(alarmButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(topPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 607, Short.MAX_VALUE))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(76, 76, 76) - .addComponent(Connection3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(367, Short.MAX_VALUE))) ); pack(); @@ -625,6 +668,26 @@ private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS // TODO add your handling code here: }//GEN-LAST:event_jButton4ActionPerformed + private void lastUpdateValue3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lastUpdateValue3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_lastUpdateValue3ActionPerformed + + private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jCheckBox1ActionPerformed + + private void jCheckBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox3ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jCheckBox3ActionPerformed + + private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jCheckBox2ActionPerformed + + private void jCheckBox4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jCheckBox4ActionPerformed + // A method to update the time public void updateTime() { // set the now calander @@ -636,81 +699,76 @@ public void updateTime() { // Set the elapsed variable to the current time minus the start time. elapsedTimeValue.setText(dateFormat.format((time.getTime() - start.getTimeInMillis() - 3600000))); } - // The method to test dropdowns /*private void testDropDowns(String v) { - // if both max values and max strings have been initiated - if (maxValue.getSelectedItem() != null && maxValue.getSelectedItem().toString() != null) { - // if both max values and max strings have been initiated - if (minValue.getSelectedItem() != null && minValue.getSelectedItem().toString() != null) { - // Set highvalue to the value from the relative drop down - highValue = Integer.parseInt(maxValue.getSelectedItem().toString()); - // Set highvalue to the value from the relative drop down - lowValue = Integer.parseInt(minValue.getSelectedItem().toString()); - // If the high value is lower or equal to the min - if (highValue <= lowValue) { - switch (v) { - case "max": - // If max, set the max to the old value - maxValue.setSelectedItem(oldHighValue); - // break - break; - case "min": - // if min, set the min to the old value - minValue.setSelectedItem(oldLowValue); - // break - break; - } - // Create a frame to display the error message - Component frame = null; - // Show the error for the dropdown - JOptionPane.showMessageDialog(frame, "The \"Max Value\" must be more than the \"Min Value\"!"); - } else { - // Else valid change - switch (v) { - case "max": - // set the oldMax to the new max - oldHighValue = highValue; - case "min": - // set the oldMin to the new min - oldLowValue = lowValue; - } - // Set the data share maxmin to the relevant value - dataShare.setMaxMin(highValue + "," + lowValue); - } - } - } - }*/ - + // if both max values and max strings have been initiated + if (maxValue.getSelectedItem() != null && maxValue.getSelectedItem().toString() != null) { + // if both max values and max strings have been initiated + if (minValue.getSelectedItem() != null && minValue.getSelectedItem().toString() != null) { + // Set highvalue to the value from the relative drop down + highValue = Integer.parseInt(maxValue.getSelectedItem().toString()); + // Set highvalue to the value from the relative drop down + lowValue = Integer.parseInt(minValue.getSelectedItem().toString()); + // If the high value is lower or equal to the min + if (highValue <= lowValue) { + switch (v) { + case "max": + // If max, set the max to the old value + maxValue.setSelectedItem(oldHighValue); + // break + break; + case "min": + // if min, set the min to the old value + minValue.setSelectedItem(oldLowValue); + // break + break; + } + // Create a frame to display the error message + Component frame = null; + // Show the error for the dropdown + JOptionPane.showMessageDialog(frame, "The \"Max Value\" must be more than the \"Min Value\"!"); + } else { + // Else valid change + switch (v) { + case "max": + // set the oldMax to the new max + oldHighValue = highValue; + case "min": + // set the oldMin to the new min + oldLowValue = lowValue; + } + // Set the data share maxmin to the relevant value + dataShare.setMaxMin(highValue + "," + lowValue); + } + } + } + }*/ // A method to the configure if the client is connected or not. /*public void setConnection(boolean connected) { - if (!connected) { - // If connected, disable the dropdowns - maxValue.setEnabled(false); - minValue.setEnabled(false); - // Set the mode lable to remote - opModeValue.setText("Remote"); - // change the connect button to disconnect - connectionButton.setText("Disconnect"); - } else { - // Set the mode label to local - opModeValue.setText("Local"); - // set the disconnect button to connect - connectionButton.setText("Connect"); - // enable both the dropdowns - maxValue.setEnabled(true); - minValue.setEnabled(true); - } - }*/ - + if (!connected) { + // If connected, disable the dropdowns + maxValue.setEnabled(false); + minValue.setEnabled(false); + // Set the mode lable to remote + opModeValue.setText("Remote"); + // change the connect button to disconnect + connectionButton.setText("Disconnect"); + } else { + // Set the mode label to local + opModeValue.setText("Local"); + // set the disconnect button to connect + connectionButton.setText("Connect"); + // enable both the dropdowns + maxValue.setEnabled(true); + minValue.setEnabled(true); + } + }*/ // A method to alter the text in the scrollable text box /*public void alterText(String text) { - // Display the time the message was posted to the text area as well as the text passed - now = Calendar.getInstance(); - textSpace.append(dateFormat.format(now.getTime()) + " | " + text + "\n"); - }*/ - - + // Display the time the message was posted to the text area as well as the text passed + now = Calendar.getInstance(); + textSpace.append(dateFormat.format(now.getTime()) + " | " + text + "\n"); + }*/ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel Connection1; private javax.swing.JPanel Connection2; @@ -737,7 +795,12 @@ public void updateTime() { private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; + private javax.swing.JCheckBox jCheckBox1; + private javax.swing.JCheckBox jCheckBox2; + private javax.swing.JCheckBox jCheckBox3; + private javax.swing.JCheckBox jCheckBox4; private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSeparator jSeparator2; private javax.swing.JLabel lastUpdateLabel1; private javax.swing.JLabel lastUpdateLabel2; @@ -766,12 +829,80 @@ public void updateTime() { private javax.swing.JPanel topPanel; // End of variables declaration//GEN-END:variables + public void updateConnected(int frameNo) { + switch (frameNo) { + case 1: + + jCheckBox1.setSelected(true); + break; + case 2: + + jCheckBox2.setSelected(true); + break; + case 3: + + jCheckBox3.setSelected(true); + break; + case 4: + + jCheckBox4.setSelected(true); + break; + default: + break; + } + } + + public void disconnect(int frameNo) { + switch (frameNo) { + case 1: + jCheckBox1.setSelected(false); + bpmValue1.setText("Not connected"); + break; + case 2: + jCheckBox2.setSelected(false); + bpmValue2.setText("Not connected"); + break; + case 3: + jCheckBox3.setSelected(false); + bpmValue3.setText("Not connected"); + break; + case 4: + jCheckBox4.setSelected(false); + bpmValue4.setText("Not connected"); + break; + default: + break; + } + } + + public void updateBPM(int frameNo, int bpm) { + switch (frameNo) { + case 1: + bpmValue1.setText("" + bpm); + break; + case 2: + bpmValue2.setText("" + bpm); + break; + case 3: + bpmValue3.setText("" + bpm); + break; + case 4: + bpmValue4.setText("" + bpm); + break; + default: + break; + } + } + + public void updateMaxMin(int frameNo, int max, int min) { + } + @Override public void run() { // Show the GUI setVisible(true); // Update the time in near real time - while (dataShare.isRunning()) { + while (true) { updateTime(); } } diff --git a/src/CM3033Tests/StartServer.java b/src/CM3033Tests/StartServer.java old mode 100644 new mode 100755 index a75803c..750a7b8 --- a/src/CM3033Tests/StartServer.java +++ b/src/CM3033Tests/StartServer.java @@ -4,6 +4,7 @@ import java.net.ServerSocket; import java.net.Socket; import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.RejectedExecutionHandler; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -11,21 +12,29 @@ * * @author Sam Cusson 1006286 */ + public class StartServer { + public static void main(String[] args) throws IOException { // Set the thread size int tpSize = 4; + int count = 1; //@MS + + RejectedExecutionHandler executionHandler = new MyRejectedExecutionHandlerImpl(); // Start the thread pool ThreadPoolExecutor pool = new ThreadPoolExecutor( tpSize, tpSize, 50000L, TimeUnit.MILLISECONDS, - new LinkedBlockingQueue()); - ServerApp serverApp = new ServerApp(); - // ServerApp sv = new ServerApp(); - //serverApp.setVisible(true); + new LinkedBlockingQueue(), + executionHandler + ); + + ServerApp serverApp = new ServerApp(); //@MS + Thread serverGUI = new Thread(serverApp); //@MS + try { // Try start the server on port 8189 ServerSocket socketServer = new ServerSocket(8189); @@ -33,13 +42,15 @@ public static void main(String[] args) throws IOException { System.out.println("Server>Waiting For Clients..."); // listen for a connection request on SocketServer // incoming is the connection socket + serverGUI.start(); //@MS for (;;) { - // Accecpt the requested connection if there are less than 4 active threads + // Acccept the requested connection if there are less than 4 active threads Socket incoming = socketServer.accept(); // Start a server instance using the incoming conncetion - pool.execute(new Server(incoming,pool.getPoolSize(), serverApp)); - + pool.execute(new Server(incoming, count, serverApp)); + count++; + } } catch (IOException e) { System.out.println(e); diff --git a/src/CM3033Tests/TestClientStart.java b/src/CM3033Tests/TestClientStart.java old mode 100644 new mode 100755