TV-Browser 3.3.3 API

tvbrowser.extras.reminderplugin
Class ReminderPlugin

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

public class ReminderPlugin
extends java.lang.Object

TV-Browser

Author:
Martin Oberhauser

Field Summary
(package private) static Localizer mLocalizer
          The localizer for this class.
static java.lang.String REMINDER_LIST_ACTION_ID
           
 
Method Summary
(package private)  void addPanel()
           
 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.
static RemindValue[] calculatePossibleReminders(Program program)
           
(package private)  AfterDataUpdateInfoPanel getAfterDataUpdateInfoPanel()
           
protected  ActionMenu getButtonAction()
           
protected  ProgramReceiveTarget[] getClientPluginsTargets()
           
protected  ActionMenu getContextMenuActions(java.awt.Frame parentFrame, Program program)
           
protected  ActionMenu getContextMenuActions(Program program)
           
 int getDefaultReminderTime()
          Gets the default reminder time.
static ReminderPlugin getInstance()
          Gets the current instance of this class, or if there is no instance creates a new one.
protected  int getMarkPriority()
           
(package private) static java.lang.String getName()
           
 PluginCenterPanelWrapper getPluginCenterPanelWrapper()
           
 int getReminderMinutesForProgram(Program prog)
          Gets the reminder minutes for the given program.
static java.lang.String getReminderPluginId()
          get the ID of the plugin (without the need to load the plugin)
static PluginTreeNode getRootNode()
          Gets the root node for the plugin tree.
 java.util.Properties getSettings()
          Gets the settings for the reminder.
static int getStartIndexForBeforeReminders(Program program)
           
protected static int getTimeToProgramStart(Program program)
           
 void handleTvBrowserStartFinished()
          Is been called by TVBrowser when the TV-Browser start is finished.
protected  void handleTvDataUpdateFinished()
           
protected  boolean isAllowedToStartTimer()
          Is used by the ReminderList to track if the TV-Browser start was finished.
static java.lang.Object playSound(java.lang.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.
static void resetLocalizer()
           
protected  void setClientPluginsTargets(ProgramReceiveTarget[] targets)
           
protected  void setMarkPriority(int priority)
           
 void setShowDateSeparators(boolean show)
           
 boolean showDateSeparators()
           
 void store()
          Save the reminder data.
 java.lang.String toString()
           
 void updateRootNode(boolean save)
          Updates the plugin tree entry for this plugin.
(package private)  void updateRootNode(boolean save, boolean scroll)
           
 void writeData(java.io.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

static Localizer mLocalizer
The localizer for this class.


REMINDER_LIST_ACTION_ID

public static final java.lang.String REMINDER_LIST_ACTION_ID
See Also:
Constant Field Values
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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

static java.lang.String getName()

handleTvBrowserStartFinished

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


addPanel

void addPanel()

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 java.util.Properties getSettings()
Gets the settings for the reminder.

Returns:
The settings of the reminder.

store

public void store()
Save the reminder data.


writeData

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

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

getContextMenuActions

protected ActionMenu getContextMenuActions(java.awt.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 ReminderFrame.DONT_REMIND_AGAIN 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 ReminderFrame.DONT_REMIND_AGAIN if the program is not in the reminder list
Since:
2.7

getRootNode

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

Returns:
The root node for the plugin tree.

updateRootNode

void updateRootNode(boolean save,
                    boolean scroll)

updateRootNode

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

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

getButtonAction

protected ActionMenu getButtonAction()

playSound

public static java.lang.Object playSound(java.lang.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)

getReminderPluginId

public static java.lang.String getReminderPluginId()
get the ID of the plugin (without the need to load the plugin)

Returns:
the id
Since:
3.0

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)

handleTvDataUpdateFinished

protected void handleTvDataUpdateFinished()

resetLocalizer

public static void resetLocalizer()

getPluginCenterPanelWrapper

public PluginCenterPanelWrapper getPluginCenterPanelWrapper()

getAfterDataUpdateInfoPanel

AfterDataUpdateInfoPanel getAfterDataUpdateInfoPanel()

showDateSeparators

public boolean showDateSeparators()

setShowDateSeparators

public void setShowDateSeparators(boolean show)

getStartIndexForBeforeReminders

public static int getStartIndexForBeforeReminders(Program program)

calculatePossibleReminders

public static RemindValue[] calculatePossibleReminders(Program program)

TV-Browser 3.3.3 API

TV-Browser 3.3.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)