TV-Browser 2.7.5 API

newsplugin
Class NewsPlugin

java.lang.Object
  extended by devplugin.Plugin
      extended by newsplugin.NewsPlugin
All Implemented Interfaces:
ContextMenuIf, Marker, ProgramReceiveIf

public class NewsPlugin
extends Plugin

A plugin that gets after each TV data update news from the TV-Browser website and shows them to the user.

Author:
Til Schneider, www.murfman.de

Field Summary
 
Fields inherited from class devplugin.Plugin
BIG_ICON, DISABLED_ON_TASK_MENU, parent, SINGLE_CLICK_WAITING_TIME
 
Constructor Summary
NewsPlugin()
          Creates a new instance of NewsPlugin.
 
Method Summary
 ActionMenu getButtonAction()
          Gets the action to use for the main menu and the toolbar.
 PluginInfo getInfo()
          Gets the plugin info.
static Plugin getInstance()
          Returns an Instance of this Plugin
static Version getVersion()
           
 void handleTvBrowserStartFinished()
          This method is called when the TV-Browser start is finished.
 void handleTvDataUpdateFinished()
          Checks for new news.
 void readData(ObjectInputStream in)
          Loads the news.
 void writeData(ObjectOutputStream out)
          Saves the news.
 
Methods inherited from class devplugin.Plugin
canReceivePrograms, canReceiveProgramsWithTarget, canUseProgramTree, createImageIcon, createImageIcon, createImageIcon, createImageIconForFileName, execute, execute, execute, getAvailableFilter, getAvailableFilterComponentClasses, getButtonIconName, getButtonText, getContextMenuActions, getContextMenuItemText, getId, getJarFile, getMarkIcon, getMarkIconFromTheme, getMarkIconName, getMarkIcons, getMarkIconsForProgram, getMarkPriorityForProgram, getParentFrame, getPluginManager, getProgramFromContextMenuActionEvent, getProgramReceiveTargets, getProgramTableIcons, getProgramTableIconText, getRatingInterfaces, getRootNode, getSettingsTab, handleTvDataAdded, handleTvDataAdded, handleTvDataChanged, handleTvDataChanged, handleTvDataDeleted, handleTvDataTouched, isAllowedToDeleteProgramFilter, layoutWindow, layoutWindow, loadSettings, onActivation, onDeactivation, receivePrograms, receivePrograms, receiveValues, saveMe, setJarFile, setParent, setPluginManager, storeRootNode, storeSettings, supportMultipleProgramExecution, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewsPlugin

public NewsPlugin()
Creates a new instance of NewsPlugin.

Method Detail

getInstance

public static Plugin getInstance()
Returns an Instance of this Plugin

Returns:
Instance

handleTvBrowserStartFinished

public void handleTvBrowserStartFinished()
Description copied from class: Plugin
This method is called when the TV-Browser start is finished.

Overrides:
handleTvBrowserStartFinished in class Plugin

getButtonAction

public ActionMenu getButtonAction()
Description copied from class: Plugin
Gets the action to use for the main menu and the toolbar.

Override this method to provide a menu item in the main menu and a toolbar button.

The following action values will be used:

Overrides:
getButtonAction in class Plugin
Returns:
the action to use for the menu and the toolbar or null if the plugin does not provide this feature.

getVersion

public static Version getVersion()

getInfo

public PluginInfo getInfo()
Gets the plugin info.

Overrides:
getInfo in class Plugin
Returns:
The plugin info.

handleTvDataUpdateFinished

public void handleTvDataUpdateFinished()
Checks for new news.

Overrides:
handleTvDataUpdateFinished in class Plugin
See Also:
Plugin.handleTvBrowserStartFinished(), Plugin.handleTvDataAdded(ChannelDayProgram), Plugin.handleTvDataDeleted(ChannelDayProgram), Plugin.handleTvDataChanged()

writeData

public void writeData(ObjectOutputStream out)
               throws IOException
Saves the news.

Overrides:
writeData in class Plugin
Parameters:
out - The stream to save to
Throws:
IOException - When saving failed.
See Also:
Plugin.readData(ObjectInputStream)

readData

public void readData(ObjectInputStream in)
              throws IOException,
                     ClassNotFoundException
Loads the news.

Overrides:
readData in class Plugin
Parameters:
in - The stream to read from.
Throws:
IOException - If reading failed
ClassNotFoundException - If the given stream is in a wrong format.
See Also:
Plugin.writeData(ObjectOutputStream)

TV-Browser 2.7.5 API

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