diff options
author | lado <herrlado@gmail.com> | 2013-02-12 22:22:59 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2013-02-12 22:22:59 +0100 |
commit | 1ac50e0424d0232f511fac40f063d92ccce7e8f7 (patch) | |
tree | f64dfb6bf1b808034621b13461d9f8664d18ddae | |
parent | 4c2674d8cde2b99cf1c7b2c1b21425c82dff5a05 (diff) | |
download | vdr-manager-1ac50e0424d0232f511fac40f063d92ccce7e8f7.tar.gz vdr-manager-1ac50e0424d0232f511fac40f063d92ccce7e8f7.tar.bz2 |
isRecurring getter
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/data/Timer.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Timer.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Timer.java index 929165c..9d1d6d9 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Timer.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Timer.java @@ -11,12 +11,12 @@ import de.bjusystems.vdrmanager.gui.Utils; /** * Class for timer data - * + * * @author bju */ -public class Timer extends Event implements Timerable{ - - +public class Timer extends Event implements Timerable { + + // tfActive = 0x0001, // tfInstant = 0x0002, // tfVps = 0x0004, @@ -55,7 +55,7 @@ public class Timer extends Event implements Timerable{ /** * Constructs a timer from SvdrpHelper result line - * + * * @param timerData * result line * @param channels @@ -98,16 +98,16 @@ public class Timer extends Event implements Timerable{ if(values.length > 12 ){ this.channelId = values[12]; } - + if(values.length > 13) { this.weekdays = values[13]; } - - + + description = Utils.mapSpecialChars(description); } - + public Timer copy(){ Timer t = new Timer(this); t.flags = flags; @@ -120,7 +120,7 @@ public class Timer extends Event implements Timerable{ t.weekdays = weekdays; return t; } - + public Timer(final Event event) { final Preferences prefs = Preferences.getPreferences(); @@ -141,6 +141,10 @@ public class Timer extends Event implements Timerable{ this.description = event.getDescription(); } + public boolean isRecurring(){ + return weekdays.equals("-------") == false; + } + public String toCommandLine() { final StringBuilder line = new StringBuilder(); @@ -219,7 +223,7 @@ public class Timer extends Event implements Timerable{ flags = flags & ~VPS; } } - + public void setEnabled(final boolean enabled) { if (enabled) { flags = flags | ACTIVE; |