@ -34,7 +37,7 @@ public class RadioPlayer implements Device {
String[]YouFMInfo={"YOUFM Good Morning Show","YOUFM Worktime","YOUFM am Nachmittag","YOUFM am Abend","YOUFM Wir feiern euch","YOUFM Deutschrap ideal","YOUFM Junge Nacht der ARD"};
publicStringgetBR3InfoByTime(intx){
if(x>=5&&x<9)returnBR3Info[0];
if(x>=5&&x<9)returnBR3Info[0];
elseif(x>=9&&x<12)returnBR3Info[1];
elseif(x==12)returnBR3Info[2];
elseif(x>=13&&x<16)returnBR3Info[3];
@ -44,73 +47,66 @@ public class RadioPlayer implements Device {
elsereturnBR3Info[7];
}
String[]BR3Info={"Sebastian Winkler und die Frühaufdreher","BAYERN 3 - und DU mittendrin!","Update","Hits, Hits, Hits für euren Nachmittag","Die Zwei für euren Feierabend","Was geht?!","Matuschke - der etwas andere Abend","Die Nacht"};
String[]BR3Info={"Sebastian Winkler und die Frühaufdreher","BAYERN 3 - und DU mittendrin!","Update","Hits, Hits, Hits für euren Nachmittag","Die Zwei für euren Feierabend","Was geht?!","Matuschke - der etwas andere Abend","Die Nacht"};
publicStringgetAntenneBYInfoByTime(intx){
if(x>=5&&x<9)returnAntenneBYInfo[0];
if(x>=5&&x<9)returnAntenneBYInfo[0];
elseif(x>=9&&x<12)returnAntenneBYInfo[1];
elseif(x>=12&&x<15)returnAntenneBYInfo[2];
elseif(x>=15&&x<19)returnAntenneBYInfo[3];
elsereturnAntenneBYInfo[4];
}
String[]AntenneBYInfo={"ANTENNE BAYERN Guten Morgen Bayern","ANTENNE BAYERN bei der Arbeit","ANTENNE BAYERN am Nachmittag","ANTENNE BAYERN am Abend","ANTENNE BAYERN Hit-Nacht"};
String[]AntenneBYInfo={"ANTENNE BAYERN Guten Morgen Bayern","ANTENNE BAYERN bei der Arbeit","ANTENNE BAYERN am Nachmittag","ANTENNE BAYERN am Abend","ANTENNE BAYERN Hit-Nacht"};
intLautstaerke=0;
StringplayTrack="";
publicvoidsetLautstaerke(intlautstaerke){
Lautstaerke=lautstaerke;
}
publicvoidchangeRegion(Stringregion){
publicvoidchangeRegion(Stringregion){
switch(region){
case"BY":
Playlist.clear();
Playlist.add("Antenne Bayern");
Playlist.add("Bayern 1");
Playlist.add("Bayern 3");
Playlist.add("Hit Radio N1");
playTrack=Playlist.get(0);
regionPlaylist.clear();
regionPlaylist.add("Antenne Bayern");
regionPlaylist.add("Bayern 1");
regionPlaylist.add("Bayern 3");
regionPlaylist.add("Hit Radio N1");
playedStation=regionPlaylist.get(0);
break;
case"HE":
Playlist.clear();
Playlist.add("Hit Radio FFH");
Playlist.add("HR 1");
Playlist.add("HR 3");
Playlist.add("YouFM");
playTrack=Playlist.get(0);
regionPlaylist.clear();
regionPlaylist.add("Hit Radio FFH");
regionPlaylist.add("HR 1");
regionPlaylist.add("HR 3");
regionPlaylist.add("YouFM");
playedStation=regionPlaylist.get(0);
break;
case"BW":
Playlist.clear();
Playlist.add("DASDING");
Playlist.add("SWR 1");
Playlist.add("SWR 3");
Playlist.add("sunshine live");
playTrack=Playlist.get(0);
break;
default:
Playlist.clear();
Playlist.add("YouFM");
Playlist.add("Teddy");
Playlist.add("MegaHits");
playTrack=Playlist.get(0);
regionPlaylist.clear();
regionPlaylist.add("DASDING");
regionPlaylist.add("SWR 1");
regionPlaylist.add("SWR 3");
regionPlaylist.add("sunshine live");
playedStation=regionPlaylist.get(0);
break;
}
}
@Override
publicvoidlouder(){
if(Lautstaerke<100){Lautstaerke+=1;}
elseLautstaerke=100;
if(Lautstaerke<100){
Lautstaerke+=1;
}elseLautstaerke=100;
}
@Override
publicvoidquieter(){
if(Lautstaerke>0){Lautstaerke-=1;}
elseLautstaerke=0;
if(Lautstaerke>0){
Lautstaerke-=1;
}elseLautstaerke=0;
}
@Override
publicintgetVolume(){
returnLautstaerke;
@ -118,17 +114,19 @@ public class RadioPlayer implements Device {