- java.lang.Object
-
- tvbrowser.extras.reminderplugin.ReminderList
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
public class ReminderList extends java.lang.Object implements java.awt.event.ActionListener
TV-Browser- Author:
- Martin Oberhauser
-
-
Constructor Summary
Constructors Constructor Description ReminderList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent event)
void
add(Program program, ReminderContent reminderContent)
void
addAndCheckBlocked(Program[] programs, int minutes)
Only adds a Program if it's not blockedvoid
addWithoutChecking(ReminderListItem item)
void
blockProgram(Program prg)
Block a Program.boolean
contains(Program program)
ReminderListItem
getReminderItem(Program program)
ReminderListItem[]
getReminderItems()
(package private) boolean
hasTimer()
(package private) boolean
isActive()
boolean
isBlocked(Program prg)
Is Program Blocked?(package private) void
pauseReminder(int minutes)
void
read(java.io.ObjectInputStream in)
reads the object from an input stream.void
remove(Program program)
void
remove(Program[] programs)
void
remove(ProgramItem item)
void
removeExpiredItems()
ReminderListItem
removeWithoutChecking(Program program)
void
removeWithoutChecking(ProgramItem item)
void
setReminderTimerListener(ReminderTimerListener listener)
protected void
startTimer()
(package private) void
toggleTimer()
void
unblockProgram(Program prg)
Remove a Program from the Block-Listvoid
update(Program[] programs, int minutes, int oldMinutesValue)
Only adds a Program if it's not blockedProgram[]
updatePrograms()
Checks all programs, if they currently existsvoid
writeData(java.io.ObjectOutputStream out)
serialize this object to a stream.
-
-
-
Method Detail
-
read
public void read(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
reads the object from an input stream.- Parameters:
in
- the input stream to read from.- Throws:
java.io.IOException
- if something went wrong reading the input streamjava.lang.ClassNotFoundException
- if the object could not be deserialized
-
writeData
public void writeData(java.io.ObjectOutputStream out) throws java.io.IOException
serialize this object to a stream.- Parameters:
out
- the stream to write to- Throws:
java.io.IOException
- if something went wrong writing to the stream
-
add
public void add(Program program, ReminderContent reminderContent)
-
addAndCheckBlocked
public void addAndCheckBlocked(Program[] programs, int minutes)
Only adds a Program if it's not blocked- Parameters:
programs
- Programs to addminutes
- remind x Minutes before start
-
update
public void update(Program[] programs, int minutes, int oldMinutesValue)
Only adds a Program if it's not blocked- Parameters:
programs
- Programs to addminutes
- remind x Minutes before startoldMinutesValue
- The old value for reminding.
-
setReminderTimerListener
public void setReminderTimerListener(ReminderTimerListener listener)
-
startTimer
protected void startTimer()
-
removeExpiredItems
public void removeExpiredItems()
-
remove
public void remove(ProgramItem item)
-
contains
public boolean contains(Program program)
-
remove
public void remove(Program program)
-
remove
public void remove(Program[] programs)
-
removeWithoutChecking
public void removeWithoutChecking(ProgramItem item)
-
removeWithoutChecking
public ReminderListItem removeWithoutChecking(Program program)
-
addWithoutChecking
public void addWithoutChecking(ReminderListItem item)
-
getReminderItem
public ReminderListItem getReminderItem(Program program)
-
getReminderItems
public ReminderListItem[] getReminderItems()
-
updatePrograms
public Program[] updatePrograms()
Checks all programs, if they currently exists- Returns:
- all removed programs
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
blockProgram
public void blockProgram(Program prg)
Block a Program. This Program won't get reminded- Parameters:
prg
- Program to block
-
unblockProgram
public void unblockProgram(Program prg)
Remove a Program from the Block-List- Parameters:
prg
- Program to remove from Block-List
-
isBlocked
public boolean isBlocked(Program prg)
Is Program Blocked?- Parameters:
prg
- Check if this Program is blocked- Returns:
- true, if Program is blocked
-
pauseReminder
void pauseReminder(int minutes)
-
toggleTimer
void toggleTimer()
-
hasTimer
boolean hasTimer()
-
isActive
boolean isActive()
-
-