TV-Browser 2.7.5 API

tvbrowser.extras.reminderplugin
Class ReminderPlugin

java.lang.Object
  extended by tvbrowser.extras.reminderplugin.ReminderPlugin

public class ReminderPlugin
extends Object

TV-Browser

Author:
Martin Oberhauser

Field Summary
static Localizer mLocalizer
          The localizer for this class.
 
Method Summary
 void addProgram(Program prog, int reminderMinutes)
          Adds a program to the reminder list.
 void addPrograms(Program[] programArr)
          Add the given programs to the reminder list.
protected  ActionMenu getButtonAction()
           
protected  ProgramReceiveTarget[] getClientPluginsTargets()
           
protected  ActionMenu getContextMenuActions(Frame parentFrame, Program program)
           
protected  ActionMenu getContextMenuActions(Program program)
           
 int getDefaultReminderTime()
          Gets the default reminder time.
 String getId()
          Gets the id of this plugin.
static ReminderPlugin getInstance()
          Gets the current instance of this class, or if there is no instance creates a new one.
protected  int getMarkPriority()
           
 int getReminderMinutesForProgram(Program prog)
          Gets the reminder minutes for the given program.
 PluginTreeNode getRootNode()
          Gets the root node for the plugin tree.
 Properties getSettings()
          Gets the settings for the reminder.
protected static int getTimeToProgramStart(Program program)
           
 void handleTvBrowserStartFinished()
          Is been called by TVBrowser when the TV-Browser start is finished.
protected  boolean isAllowedToStartTimer()
          Is used by the ReminderList to track if the TV-Browser start was finished.
 void pauseRemider()
          Halt the remider listener.
static Object playSound(String fileName)
          Plays a sound.
 int removeProgram(Program prog)
          Removes the given program from the reminder list.
 void removePrograms(Program[] progArr)
          Remove the given programs from the reminder list.
protected  void setClientPluginsTargets(ProgramReceiveTarget[] targets)
           
protected  void setMarkPriority(int priority)
           
 void store()
          Save the reminder data.
 String toString()
           
 void updateRootNode(boolean save)
          Updates the plugin tree entry for this plugin.
 void writeData(ObjectOutputStream out)
          Save the data of this plugin in the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mLocalizer

public static final Localizer mLocalizer
The localizer for this class.

Method Detail

getInstance

public static ReminderPlugin getInstance()
Gets the current instance of this class, or if there is no instance creates a new one.

Returns:
The current instance of this class.

toString

public String toString()
Overrides:
toString in class Object

handleTvBrowserStartFinished

public void handleTvBrowserStartFinished()
Is been called by TVBrowser when the TV-Browser start is finished.


isAllowedToStartTimer

protected boolean isAllowedToStartTimer()
Is used by the ReminderList to track if the TV-Browser start was finished. (When it's finished then the Timer is allowed to start.)

Returns:
If the Timer is allowed to start.

getSettings

public Properties getSettings()
Gets the settings for the reminder.

Returns:
The settings of the reminder.

pauseRemider

public void pauseRemider()
Halt the remider listener.


store

public void store()
Save the reminder data.


writeData

public void writeData(ObjectOutputStream out)
               throws IOException
Save the data of this plugin in the given stream.

Parameters:
out - The stream to write the data in.
Throws:
IOException

getContextMenuActions

protected ActionMenu getContextMenuActions(Frame parentFrame,
                                           Program program)

getDefaultReminderTime

public int getDefaultReminderTime()
Gets the default reminder time.

Returns:
The default reminder time in minutes.

addPrograms

public void addPrograms(Program[] programArr)
Add the given programs to the reminder list.

Parameters:
programArr - The programs to add.

removeProgram

public int removeProgram(Program prog)
Removes the given program from the reminder list.

Parameters:
prog - The program to remove.
Returns:
The reminder minutes of the program or -1 if the program was not in the list.

removePrograms

public void removePrograms(Program[] progArr)
Remove the given programs from the reminder list.

Parameters:
progArr - The programs to remove.

addProgram

public void addProgram(Program prog,
                       int reminderMinutes)
Adds a program to the reminder list.

Parameters:
prog - The program to add.
reminderMinutes - The reminder minutes for the program.

getReminderMinutesForProgram

public int getReminderMinutesForProgram(Program prog)
Gets the reminder minutes for the given program.

Parameters:
prog - The program to get the reminder minutes for.
Returns:
The reminder minutes of the program or -1 if the program is not in the reminder list
Since:
2.7

getRootNode

public PluginTreeNode getRootNode()
Gets the root node for the plugin tree.

Returns:
The root node for the plugin tree.

updateRootNode

public void updateRootNode(boolean save)
Updates the plugin tree entry for this plugin.

Parameters:
save - True if the remider entries should be saved.

getButtonAction

protected ActionMenu getButtonAction()

playSound

public static Object playSound(String fileName)
Plays a sound.

Parameters:
fileName - The file name of the sound to play.
Returns:
The sound Object.

getContextMenuActions

protected ActionMenu getContextMenuActions(Program program)

getId

public String getId()
Gets the id of this plugin.

Returns:
The id of this plugin.

getClientPluginsTargets

protected ProgramReceiveTarget[] getClientPluginsTargets()

setClientPluginsTargets

protected void setClientPluginsTargets(ProgramReceiveTarget[] targets)

getMarkPriority

protected int getMarkPriority()

setMarkPriority

protected void setMarkPriority(int priority)

getTimeToProgramStart

protected static int getTimeToProgramStart(Program program)

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)