From 854554bfb82d0a3931d68a8a9059041b66aad91c Mon Sep 17 00:00:00 2001 From: Anugrah11 Date: Sun, 21 May 2017 21:08:51 +0700 Subject: [PATCH] Beres --- build.xml | 73 + .../task_5/Application$ThreadPlayer.class | Bin 0 -> 1527 bytes build/classes/task_5/Application.class | Bin 0 -> 1896 bytes build/classes/task_5/Controller.class | Bin 0 -> 2826 bytes build/classes/task_5/Driver.class | Bin 0 -> 452 bytes build/classes/task_5/PlayerGui$1.class | Bin 0 -> 1010 bytes build/classes/task_5/PlayerGui$2.class | Bin 0 -> 740 bytes build/classes/task_5/PlayerGui$3.class | Bin 0 -> 740 bytes build/classes/task_5/PlayerGui.class | Bin 0 -> 6429 bytes build/classes/task_5/PlayerGui.form | 164 ++ build/classes/task_5/Task_5.class | Bin 0 -> 375 bytes manifest.mf | 3 + nbproject/build-impl.xml | 1420 +++++++++++++++++ nbproject/genfiles.properties | 8 + nbproject/private/private.properties | 2 + nbproject/private/private.xml | 9 + nbproject/project.properties | 76 + nbproject/project.xml | 15 + src/task_5/Application.java | 91 ++ src/task_5/Controller.java | 74 + src/task_5/Driver.java | 16 + src/task_5/PlayerGui.form | 164 ++ src/task_5/PlayerGui.java | 203 +++ src/task_5/Task_5.java | 21 + 24 files changed, 2339 insertions(+) create mode 100644 build.xml create mode 100644 build/classes/task_5/Application$ThreadPlayer.class create mode 100644 build/classes/task_5/Application.class create mode 100644 build/classes/task_5/Controller.class create mode 100644 build/classes/task_5/Driver.class create mode 100644 build/classes/task_5/PlayerGui$1.class create mode 100644 build/classes/task_5/PlayerGui$2.class create mode 100644 build/classes/task_5/PlayerGui$3.class create mode 100644 build/classes/task_5/PlayerGui.class create mode 100644 build/classes/task_5/PlayerGui.form create mode 100644 build/classes/task_5/Task_5.class create mode 100644 manifest.mf create mode 100644 nbproject/build-impl.xml create mode 100644 nbproject/genfiles.properties create mode 100644 nbproject/private/private.properties create mode 100644 nbproject/private/private.xml create mode 100644 nbproject/project.properties create mode 100644 nbproject/project.xml create mode 100644 src/task_5/Application.java create mode 100644 src/task_5/Controller.java create mode 100644 src/task_5/Driver.java create mode 100644 src/task_5/PlayerGui.form create mode 100644 src/task_5/PlayerGui.java create mode 100644 src/task_5/Task_5.java diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..e10bdcc --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project Task_5. + + + diff --git a/build/classes/task_5/Application$ThreadPlayer.class b/build/classes/task_5/Application$ThreadPlayer.class new file mode 100644 index 0000000000000000000000000000000000000000..a76b4f32f8e8c9faa975b83f66c26b4f9297cd7f GIT binary patch literal 1527 zcmZ`(VN(=G5Pfrp?6ItfCn&}k&VXM&f ze6}iZRiP^Rp1z?`R(Ht>ysCnhY+7x1l?-xaW+-bdedS7-y5hJSQaSkxSk4S zyeCj}-pB)Kd(z*vH{!_kcOMD#hn{?=B7tj(_m?2px8HbnYPDY`P8}BSxvj}N0wYc= zTW^25Z!d(Q=Qd>Q2EO(`c6~Q~A}~`vE1>t}nJt07#h|GKE;z2Q*4q2qD%zCW9xX*D zXh?5MMy_6WjeQz|fVH_7DcMYsak=9ADq8eptEK3@amMMB*&W21kJ>)}Wep*}qjO$O z@wtIrC0i?g*p5k%lKVPZ9X15UPerT+aW!cB&85SJ3cC#C)S*E66p2mMV1bdnO4=RG zayI__Ml2g|U&ydq-b4`X&iN|dR?=_HZ3OM8p&WIfyanG6;)G`+9mz1cexRbrZ7PB^ z(|CzKB11!DqNl0oP#SI0af9ol{7B=pg;h)oT+e3e zp@qC9{$%7*f(vBwG!V9bkOl3j- zKhpwZOSRg1t@QJr&Zg&@gJ06O!oWHK_Kx$Zc_E$um5>gSz-Zd%Q&&k((^%I|X0t<- z%(_0A_e6%F@|yy;&q|SLZhAqxT(HB1I7m&Lf$~gGAR~&smEZ;+j>~*v^2q7VQ_Jb* z0mH+3CXzLqh|fSKxOz>0p7KIv_6VZVL9TM^2>JI(V2S^s#J!3Ec4Y_-4**K(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W!NL}KHoL%5%QNaoD`@~JCkv5f|T*jcGHqAqmJXLi21{&7`dmw3;TQ{dA!R=g+;A)+>r)b`h(K2y@ozznxJx7&9?3M zs;5-*C0Y6Oj7!%wha@?R26#Rubzr6+4IEg<7Hp;J-b)f4aXcWfINX^gh>p#8P{;Fl zLC1@DNyizytm75Ds^K*quj8zaH+VRQHwDT$#(b?2h-Yv8kA6@)x_Y;)Y41q1^-)?g zRSVcaY#mE&;p4oe<87SR@ebbA@gCmS@PUpGaY4sN_*ln9PVN#e>$rkXbbQLo&#+a; z=e+!aabGg-E1VU8j;jp#ngQRi^evaGbSC>B> zMV9INr1wdm5eh1>EH)2{GpLw1YjtO-O%yAj98oe>n-yo8-wfI7+s#9Clk(+>v|$l_ zmxc#XS3HE)9ukOU>%&y_GzD}Lebku7?mrhp|3fF;6^PuNgX(~^V*V{?bvL0!GAQ7=E`tSXz6nxAGbp^FTyCdv z6*L-`A%Zgcu9u?%%TYyR9V+oKR^TDp)q`NP-a#vYooJ-QD3P2=vL<`6e`5xE*Cq~< z!NLp{UBZ#OD56{zci%+WFV4JvS+ zXcSHKLzD|{(RozUxQ70gs!&RDCDsuW)>9j5(25v32zh`Sb{HFB5`!#a&?(~28Dh{m z;?G55&=q3Ob+WoaZM#EWf1$?yMh*R)TKXq>`iolnH+B=LnuLZuq8!bl275(4T0|rE zQ8sO2586d19#xbWMwDWfVHb8IpEBx36ZTNPTgm?;XeK(fQiglcLRp_7dbN_2OVL*b z68S1b8`?=nT?>ltyy2SS3_+f610&|&@P$< Jh3Bi%^B+&~$ngLG literal 0 HcmV?d00001 diff --git a/build/classes/task_5/Driver.class b/build/classes/task_5/Driver.class new file mode 100644 index 0000000000000000000000000000000000000000..c06711b866db6ed16e2cb45d90ddf554546ea286 GIT binary patch literal 452 zcmZuuO-sW-5PiE%lQd23hZ^DToKz#1OZp32f8;FHZ#pe}F$q zoJ}f0a1ZnG=FOX7_Urro6Tk>Z4w~4v;5p#hA6PhKFfU{#i%W*a@MOkdO!DWLp&Q67 zzFjTCSlx>-C1eofkw|AkNu6&&qj-@^%`U|9_37NdR&pJyG07~1%ox1kV=xzM;in=? z{Ar&;#H79vis60(eU1yrFR21Jxy;8dxccv$}FkvzDw~N$G z44psAG4$$z6KE*y&8ihwpnKnor0 s5Tcu}NQ`Uj1N>owMoX=woys<$ZOP=N-wNq*8gbhX_x&W$_P}ZAVghzO zie$1A`e`a@PM?D=Ewi@Sk;)4`5o>gzTxS;T-B5OAq_&mrs9wHkAQ1=%ULT4-Zym|D zB5d9ZI+3q>34vELfDdl^o)o#;Epp|zRU=5%9>)qd&*N_qq2R^6q%EHWdd`V6x|TG% zq+&N}hjB{4J*f`k0~4z@*S2nB5=9$RSQjV`FM>?hmF&(hpDNs3-?MtEteq-Ex`YWE zv$#o`hnH3&#GHoz?^G;5oWwEoo_FHz+c+Y>Tnahg$2?z>%~v#la3wqmJP<4QI@2jyXB6nR869X*!m7jQm%ojbNJpLYBIS zJeDv+`$`{*@)|9mnw8{IaUC}X1#6Uov0UXF@+Y6E^|5l9*UfP3{*3{S(0tLO+uh)8 zJ(8)jXIH)qrPuyx!#r!l#2jux6t@XiWswEzGB literal 0 HcmV?d00001 diff --git a/build/classes/task_5/PlayerGui$2.class b/build/classes/task_5/PlayerGui$2.class new file mode 100644 index 0000000000000000000000000000000000000000..728ce5fbd54843e8afc54daa7ec34e778eb7a28c GIT binary patch literal 740 zcmaJD#EG-C4XhI8QZCwnXP} zxQ_=RJX{UoJLw@>tnh5VS{nk5l3*&$e)P6~s1mYSypVIO^Fpx;3^|KKQm*S=J3O+6 zm9a(DwyQ3XNuqL2Yn}6Ye8EI6t9!MFWp2R~I8}&7!)GdEqy|sjN-Y8>pXA#^};k7)aYNL33|++Il{(}n2@TVm3>_0gF e6wb#i<_J^8Ji#kWcawLGt9u*uG95RMH@`o#yrVh* literal 0 HcmV?d00001 diff --git a/build/classes/task_5/PlayerGui$3.class b/build/classes/task_5/PlayerGui$3.class new file mode 100644 index 0000000000000000000000000000000000000000..329b6fabea241f29bb48d0cd81d25e558994c68a GIT binary patch literal 740 zcmaJE(CqTkdOwAW>FGNU(Iwo!r*q+>`rU^Stc5d z5B>mul<~~kpaH@rJ9F=yd(S=h z8v^ab%JTi&$MHcXKdIu`Sa0+7i8k8q2+ViRKCkr!8ohj|1e%F9>g9MeP{kWL$Y^ON zc`CEMEVR?7#)eBK5I#3X6}?QBrJ_1_20Gee?xsww&dq@;-sQze4F#4u$+4WsSbnsz znkZxA-O6Rp$=i-jT}`aO!bNTZ!Rvfnr0S`5JZDeJedw^6cF&|)UTSl=uk2Ai^spS_ zK2}0_xE#WF(kdcWc)DNFmO!f_m`QUOzZx8?lx!By<(%l!Dt3V(r*TNib-kC5KIDd# zu|@Tct1ggfs>(9j+~B-6&zZfT1PO2^IP&F>G-G^2a~ literal 0 HcmV?d00001 diff --git a/build/classes/task_5/PlayerGui.class b/build/classes/task_5/PlayerGui.class new file mode 100644 index 0000000000000000000000000000000000000000..96b42dc76bc590b81f0a6770d7e4d38865b97a0c GIT binary patch literal 6429 zcmbVR33yyp75?u_nm3uerju#5wv?uAplJ$CQ(6#OO4BASsna$vp(PZ7m&r>z?PO+{ zd0AROc4QS4R76x1P(V<&PM~2^6s7JcZs0D8q9}@>D8>K0_mWvUt=7IT_ndq0xo5lQ zoO|zd@4h`x09c|L{WujLmgXaVgmJTAAJuV-ACqu%IXfTIajPFbxASowpYWr??R-+l zZGKd`oloibv>#P&=XP0mhctIe^BHMAE6rUx?iLC6==hu;GjOkPzE5O*Uf6y?$NhdZ z$Z!Q7(D9%T5BV_{4~v-HK4b)r`tXQIB79Wf9v{Yhc+7{#eR#r$Cv`mK$7118B|N?; z^1kH9QatU)m+_TyJcF-F_iNHT>&ISvU7BzB@lAY7ux|_Y9l^d^j_2?_9p9JE^Fsdv z!G0(_ek4>smhMkv;sp`&qL}kjQGQggpXvCy55MqZBYvslS2}*JV06agR%&(3OsB21 zLRqgJZ|mz*s0nR1hs=?d^l&u3wPoF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%xn6^7Jt-G>K4_JQqtZ(Vt36on!CDX2c(6`j*0{r=lk+HzdxU5Fqo~Io7P~PP zw8yXrkLMWNI^n-o7Pt391$?+3H+ZU?;Hgs9ykHbsmcJYQl{tLM@B!x + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/task_5/Task_5.class b/build/classes/task_5/Task_5.class new file mode 100644 index 0000000000000000000000000000000000000000..564df2d040dd4eedb596c1094cdacedafb739aa9 GIT binary patch literal 375 zcmZusJx{|h5Pg^CgQkI&2C=ghkjMg45lf{`5e%)mFd!#b!6kL1)a8FMAu;d+_)&Ic-qE$BkB7O6q*0$S-_2b<|Hg_=QF)N`o;c#@DFU6C{YN4xaW?H4Iv9l3v z#lrNTG9jKdo3@lwWqo_wnP+xP0v`ck_m>-C@NIEZEM;kM1dsn{j|W}`0mqQDjFA|F ulNZplD@PndM<&?ecd~6j7cpmD^c-Wwr+lsWk1+iq + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..482dbd3 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=652a6206 +build.xml.script.CRC32=2cc291bd +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=652a6206 +nbproject/build-impl.xml.script.CRC32=c46ee1f5 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..0e7e243 --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\IRFAN\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..29463a8 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/E:/Kuliah/Semester%204/Tugas/PBO/Tugas%205/M.Anugrah_1301154348_IF3912/M.Anugrah_1301154348_IF3912/Task_5/src/task_5/Application.java + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..a531b0a --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,76 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Task_5.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.jl1.0.1.jar=C:\\Users\\IRFAN\\Downloads\\Compressed\\jlayer1.0.1\\JLayer1.0.1\\jl1.0.1.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.jl1.0.1.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=task_5.Task_5 +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..8494f7b --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + Task_5 + + + + + + + + + diff --git a/src/task_5/Application.java b/src/task_5/Application.java new file mode 100644 index 0000000..000e9df --- /dev/null +++ b/src/task_5/Application.java @@ -0,0 +1,91 @@ +/* + * 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 task_5; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import javazoom.jl.decoder.JavaLayerException; +import javazoom.jl.player.Player; + +/** + * + * @author ASUS ROG552VW + */ +public class Application { + private ArrayList musicList; + private ThreadPlayer thread; + private int nowPlaying; + + public Application(){ + musicList = new ArrayList(); + } + + public void addMusic(String path){ + musicList.add(path); + } + + public String[] getMusicList(){ + return (String[]) musicList.toArray(new String[0]); + } + + public String getNowPlayed(){ + return musicList.get(nowPlaying); + } + + public void removeMusic(int i){ + musicList.remove(i); + } + + public void play(int i){ + nowPlaying = i; + String filepath = musicList.get(i); + thread = new ThreadPlayer(filepath); + thread.start(); + } + + public void stop(){ + if (thread != null){ + thread.stop(); + } + } + + public void next(){ + if (nowPlaying < musicList.size() - 1){ + stop(); + play(nowPlaying + 1); + } + } + + public void prev(){ + if(nowPlaying != 0){ + stop(); + play(nowPlaying - 1); + } + } + + public class ThreadPlayer extends Thread{ + private String filepath; + private Player player; + + public ThreadPlayer(String filepath) { + this.filepath = filepath; + } + + @Override + public void run() { + try { + FileInputStream fis = new FileInputStream(filepath); + player = new Player(fis); + player.play(); + } catch (FileNotFoundException exc) { + throw new IllegalStateException("File " + filepath + "not found"); + } catch (JavaLayerException ex) { + throw new IllegalStateException("ERROR while playing file"); + } + } + } +} diff --git a/src/task_5/Controller.java b/src/task_5/Controller.java new file mode 100644 index 0000000..cabe76a --- /dev/null +++ b/src/task_5/Controller.java @@ -0,0 +1,74 @@ +/* + * 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 task_5; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.JOptionPane; +import javax.swing.JFileChooser; +import javax.swing.filechooser.FileNameExtensionFilter; + +/** + * + * @author ASUS ROG552VW + */ +public class Controller implements ActionListener{ + private Application app; + private PlayerGui view; + + public Controller(){ + app = new Application(); + view = new PlayerGui(); + view.setVisible(true); + view.addListener(this); + view.SetListMusic(app.getMusicList()); + } + + @Override + public void actionPerformed(ActionEvent ae) { + Object source = ae.getSource(); + try { + if(source.equals(view.getBtnAdd())){ + JFileChooser fc = new JFileChooser(); + FileNameExtensionFilter filter = new FileNameExtensionFilter("MP3 FILES","mp3","mp3"); + fc.setFileFilter(filter); + int returnVal = fc.showOpenDialog(view); + + if(returnVal == JFileChooser.APPROVE_OPTION){ + String path = fc.getSelectedFile().getAbsolutePath(); + app.addMusic(path); + view.SetListMusic(app.getMusicList()); + } + } + else if(source.equals(view.getBtnDelete())){ + int selected = view.getSelectedMusic(); + app.removeMusic(selected); + view.SetListMusic(app.getMusicList()); + } + else if(source.equals(view.getBtnPlay())){ + int selected = view.getSelectedMusic(); + app.stop(); + app.play(selected); + view.setTxFieldPlaying(app.getNowPlayed()); + } + else if(source.equals(view.getBtnStop())){ + app.stop(); + view.setTxFieldPlaying(""); + } + else if(source.equals(view.getBtnNext())){ + app.next(); + view.setTxFieldPlaying(app.getNowPlayed()); + } + else if(source.equals(view.getBtnPrev())){ + app.prev(); + view.setTxFieldPlaying(app.getNowPlayed()); + } + } catch (Exception e) { + JOptionPane.showMessageDialog(view, e.getMessage()); + } + } + +} diff --git a/src/task_5/Driver.java b/src/task_5/Driver.java new file mode 100644 index 0000000..325ddaa --- /dev/null +++ b/src/task_5/Driver.java @@ -0,0 +1,16 @@ +/* + * 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 task_5; + +/** + * + * @author ASUS ROG552VW + */ +public class Driver { + public static void main(String[] args) { + Controller co = new Controller(); + } +} diff --git a/src/task_5/PlayerGui.form b/src/task_5/PlayerGui.form new file mode 100644 index 0000000..68031ea --- /dev/null +++ b/src/task_5/PlayerGui.form @@ -0,0 +1,164 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/task_5/PlayerGui.java b/src/task_5/PlayerGui.java new file mode 100644 index 0000000..f294bcb --- /dev/null +++ b/src/task_5/PlayerGui.java @@ -0,0 +1,203 @@ +/* + * 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 task_5; + +import java.awt.event.ActionListener; + +/** + * + * @author ASUS ROG552VW + */ +public class PlayerGui extends javax.swing.JFrame { + + /** + * Creates new form PlayerGui + */ + public PlayerGui() { + initComponents(); + } + + /** + * 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(); + listMusic = new javax.swing.JList<>(); + txFieldPlaying = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + btnAdd = new javax.swing.JButton(); + btnDelete = new javax.swing.JButton(); + btnPrev = new javax.swing.JButton(); + btnPlay = new javax.swing.JButton(); + btnStop = new javax.swing.JButton(); + btnNext = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + listMusic.setModel(new javax.swing.AbstractListModel() { + String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; + public int getSize() { return strings.length; } + public String getElementAt(int i) { return strings[i]; } + }); + jScrollPane1.setViewportView(listMusic); + + txFieldPlaying.setEditable(false); + txFieldPlaying.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txFieldPlayingActionPerformed(evt); + } + }); + + jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + jLabel1.setText("Now Playing"); + + btnAdd.setText("ADD"); + btnAdd.setToolTipText(""); + + btnDelete.setText("DELETE"); + + btnPrev.setText("<<"); + + btnPlay.setText("PLAY"); + + btnStop.setText("STOP"); + + btnNext.setText(">>"); + btnNext.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnNextActionPerformed(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() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1)) + .addGroup(layout.createSequentialGroup() + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(btnAdd)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(74, 74, 74) + .addComponent(txFieldPlaying)) + .addGroup(layout.createSequentialGroup() + .addGap(49, 49, 49) + .addComponent(btnDelete) + .addGap(55, 55, 55) + .addComponent(btnPrev) + .addGap(64, 64, 64) + .addComponent(btnPlay) + .addGap(64, 64, 64) + .addComponent(btnStop) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 85, Short.MAX_VALUE) + .addComponent(btnNext) + .addGap(23, 23, 23))))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txFieldPlaying, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addGap(29, 29, 29) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(btnAdd) + .addComponent(btnDelete) + .addComponent(btnPrev) + .addComponent(btnPlay) + .addComponent(btnStop) + .addComponent(btnNext)) + .addContainerGap(34, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void txFieldPlayingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txFieldPlayingActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txFieldPlayingActionPerformed + + private void btnNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNextActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_btnNextActionPerformed + + public Object getBtnAdd(){ + return btnAdd; + } + + public Object getBtnDelete(){ + return btnDelete; + } + + public Object getBtnNext(){ + return btnNext; + } + + public Object getBtnPlay(){ + return btnPlay; + } + + public Object getBtnPrev(){ + return btnPrev; + } + + public Object getBtnStop(){ + return btnStop; + } + + public void SetListMusic(String[] musicList){ + listMusic.setListData(musicList); + } + + public void setTxFieldPlaying(String filename){ + txFieldPlaying.setText(filename); + } + + public int getSelectedMusic(){ + if(listMusic.getSelectedIndex() == -1){ + throw new IllegalStateException("Please select any music"); + } + return listMusic.getSelectedIndex(); + } + + public void addListener(ActionListener e){ + btnAdd.addActionListener(e); + btnDelete.addActionListener(e); + btnNext.addActionListener(e); + btnPlay.addActionListener(e); + btnPrev.addActionListener(e); + btnStop.addActionListener(e); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnAdd; + private javax.swing.JButton btnDelete; + private javax.swing.JButton btnNext; + private javax.swing.JButton btnPlay; + private javax.swing.JButton btnPrev; + private javax.swing.JButton btnStop; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JList listMusic; + private javax.swing.JTextField txFieldPlaying; + // End of variables declaration//GEN-END:variables +} diff --git a/src/task_5/Task_5.java b/src/task_5/Task_5.java new file mode 100644 index 0000000..b7e90b9 --- /dev/null +++ b/src/task_5/Task_5.java @@ -0,0 +1,21 @@ +/* + * 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 task_5; + +/** + * + * @author ASUS ROG552VW + */ +public class Task_5 { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +}