Module tvbrowser

Class ReminderPlugin


  • public class ReminderPlugin
    extends java.lang.Object
    TV-Browser
    Author:
    Martin Oberhauser
    • Field Detail

      • LOCALIZER

        static Localizer LOCALIZER
        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

      • getKeyStrokeFrameReminders

        static javax.swing.KeyStroke getKeyStrokeFrameReminders()
      • endPause

        void endPause()
      • 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.
      • saveSettings

        void saveSettings()
      • 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 - Thrown if an IO operation went wrong.
      • getContextMenuActions

        protected ActionMenu getContextMenuActions​(java.awt.Window 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.
      • addPrograms

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

        Parameters:
        programArr - The programs to add.
        reminderMinutes - The reminder time.
      • updatePrograms

        public void updatePrograms​(Program[] programArr,
                                   int reminderMinutes,
                                   int oldMinutesValue)
        Add the given programs to the reminder list.

        Parameters:
        programArr - The programs to add.
        reminderMinutes - The reminder time.
        oldMinutesValue - The old reminder time.
      • 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
      • 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()
      • showDateSeparators

        public boolean showDateSeparators()
      • setShowDateSeparators

        public void setShowDateSeparators​(boolean show)
      • getStartIndexForBeforeReminders

        public static int getStartIndexForBeforeReminders​(Program program)
      • calculatePossibleReminders

        public static RemindValue[] calculatePossibleReminders​(Program program)