Author: jerome
Date: 2009-04-09 14:36:11 +0200 (Thu, 09 Apr 2009)
New Revision: 4444
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
Log:
* Updated french configuration.
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
2009-04-09 10:36:28 UTC (rev 4443)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
2009-04-09 12:36:11 UTC (rev 4444)
@@ -21,13 +21,20 @@
package com.kysoh.tvPrograms.gadget;
-public class FrenchConfiguration extends Configuration{
+import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadgetConfiguration;
+public class FrenchConfiguration extends SimpleGadgetConfiguration{
+
private String digitalChannel = "Disney Channel";
private boolean useDigital = false;
private boolean useStandard = true;
+ private String channel = "ARTE";
+ private boolean giveProgramDescription = true;
+ private boolean giveMorning = true;
+ private boolean giveAfternoon = true;
+ private boolean giveEvening = true;
+ private boolean giveNowPlaying = true;
-
/**
* Return the selected digital channel.
* @return
@@ -86,4 +93,124 @@
{
this.useStandard = aUseStandard;
}
+
+
+ /**
+ * Return the channel.
+ * @return
+ */
+ public String getChannel()
+ {
+ return this.channel;
+ }
+
+
+ /**
+ * Sets the channel.
+ * @param aChannel
+ */
+ public void setChannel(String aChannel)
+ {
+ this.channel = aChannel;
+ }
+
+
+ /**
+ * Return true if user wants to hear the programs description.
+ * @return
+ */
+ public boolean getGiveProgramDescription()
+ {
+ return this.giveProgramDescription;
+ }
+
+
+ /**
+ * Sets to give program desciption parameter.
+ * @param give
+ */
+ public void setGiveProgramDescription(boolean give)
+ {
+ this.giveProgramDescription = give;
+ }
+
+
+ /**
+ * Sets the 'now playing' parameter.
+ * @param aNowPlaying
+ */
+ public void setNowPlaying(boolean aNowPlaying)
+ {
+ this.giveNowPlaying = aNowPlaying;
+ }
+
+
+ /**
+ * Return true if user wants to hear the current played program.
+ * @return
+ */
+ public boolean getGiveNowPlaying()
+ {
+ return this.giveNowPlaying;
+ }
+
+
+ /**
+ * Set the 'give morning' parameter.
+ * @param aGiveMorning
+ */
+ public void setGiveMorning(boolean aGiveMorning)
+ {
+ this.giveMorning = aGiveMorning;
+ }
+
+
+ /**
+ * Return true if user wants to hear the morning program.
+ * @return
+ */
+ public boolean getGiveMorning()
+ {
+ return this.giveMorning;
+ }
+
+
+ /**
+ * Return true if user wants to hear the afternoon program.
+ * @return
+ */
+ public boolean getGiveAfternoon()
+ {
+ return this.giveAfternoon;
+ }
+
+
+ /**
+ * Set the afternnon parameter.
+ * @param aGiveAfternoon
+ */
+ public void setGiveAfternoon(boolean aGiveAfternoon)
+ {
+ this.giveAfternoon = aGiveAfternoon;
+ }
+
+
+ /**
+ * Return true if user wants to hear the evening prgrams.
+ * @return
+ */
+ public boolean getGiveEvening()
+ {
+ return this.giveEvening;
+ }
+
+
+ /**
+ * Set the 'give evening' parameter.
+ * @param aGiveEvening
+ */
+ public void setGiveEvening(boolean aGiveEvening)
+ {
+ this.giveEvening = aGiveEvening;
+ }
}
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
2009-04-09 10:36:28 UTC (rev 4443)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
2009-04-09 12:36:11 UTC (rev 4444)
@@ -73,7 +73,7 @@
{
try
{
- GadgetProgramTV.giveProgram(this.configuration(),
completeProgram, this);
+ giveProgram(completeProgram);
//Checking if gadget has to release digital program.
if(this.configuration().getUseDigital())
@@ -91,6 +91,74 @@
/**
+ * Used function to give the current tv program.
+ * @param configuration
+ */
+ public void giveProgram(Vector<Program> programme)
+ {
+ //Morning program.
+ if(this.configuration().getGiveMorning())
+ {
+ Vector<Program> morning =
SimplePrograms.sortMorning(programme);
+
+ for(Program oneProgram : morning)
+ {
+
if(!this.configuration().getGiveProgramDescription())
+ {
+ throwMessage("On {0} at {1} {2}",
oneProgram.getChannel(), oneProgram.getStartTime(), oneProgram.getTitle());
+ }
+ else
+ {
+ throwMessage("On {0} at {1} {2}, the
description is {3}",oneProgram.getChannel(), oneProgram.getStartTime(),
oneProgram.getTitle(), oneProgram.getDescription());
+ }
+ }
+ }
+
+ //Afternoon program.
+ if (this.configuration().getGiveAfternoon())
+ {
+ Vector<Program> afternoon =
SimplePrograms.sortAfternoon(programme);
+ for(Program oneProgram : afternoon)
+ {
+
+
if(!this.configuration().getGiveProgramDescription())
+ {
+ throwMessage("On {0} at {1} {2}",
oneProgram.getChannel(), oneProgram.getStartTime(), oneProgram.getTitle());
+ }
+ else
+ {
+ throwMessage("On {0} at {1} {2}, the
description is {3}", oneProgram.getChannel(), oneProgram.getStartTime(),
oneProgram.getTitle(), oneProgram.getDescription());
+ }
+ }
+ }
+
+ //Evening program.
+ if(this.configuration().getGiveEvening())
+ {
+ Vector<Program> evening =
SimplePrograms.sortEvening(programme);
+ for(Program oneProgram : evening)
+ {
+
if(!this.configuration().getGiveProgramDescription())
+ {
+ throwMessage("On {0} at {1} {2}",
oneProgram.getChannel(), oneProgram.getStartTime(), oneProgram.getTitle());
+ }
+ else
+ {
+ throwMessage("On {0} at {1} {2}, the
description is {3}", oneProgram.getChannel(), oneProgram.getStartTime(),
oneProgram.getTitle(), oneProgram.getDescription());
+ }
+ }
+ }
+
+ //Give now playing program.
+ if(this.configuration().getGiveNowPlaying())
+ {
+ Program nowPlaying =
SimplePrograms.getNowPlaying(programme);
+ throwMessage("Now playing {0} on {1}",
nowPlaying.getTitle(), nowPlaying.getChannel());
+ }
+ }
+
+
+ /**
* Main entry point.
* @param args
*/
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn