TV-Browser 2.7.5 API

devplugin
Class Plugin

java.lang.Object
  extended by devplugin.Plugin
All Implemented Interfaces:
ContextMenuIf, Marker, ProgramReceiveIf
Direct Known Subclasses:
BlogThisPlugin, CalendarExportPlugin, CapturePlugin, ClipboardPlugin, EMailPlugin, GenrePlugin, GrowlPlugin, I18NPlugin, ImdbPlugin, KNotifyPlugin, ListViewPlugin, MovieAwardPlugin, NewsPlugin, PrintPlugin, ProgramListPlugin, SimpleMarkerPlugin, TimeListPlugin, TVRaterPlugin, WebPlugin, WirSchauenPlugin

public abstract class Plugin
extends Object
implements Marker, ContextMenuIf, ProgramReceiveIf

Superclass for all Java-TV-Browser plugins.

To create a plugin do the following:

  1. Create a class that extends this class and name its package equal to the class name but with lowercase letters. E.g. myplugin.MyPlugin.
  2. Write your plugin code in that class.
  3. Pack your plugin class including all needed ressources in a jar file named equal to your class. E.g. MyPlugin.jar.
  4. Put the jar in the plugin directory of your TV-Browser installation.

Author:
Martin Oberhauser, Til Schneider, www.murfman.de

Field Summary
static String BIG_ICON
          The name to use for the big icon (the 24x24 one for the toolbar) of the button action.
static String DISABLED_ON_TASK_MENU
          The name to use for disabling a menu part for showing in ProgramInfo.
protected  Frame parent
          Deprecated. Use method getParentFrame() instead.
static int SINGLE_CLICK_WAITING_TIME
          The waiting time for single click performing.
 
Constructor Summary
Plugin()
           
 
Method Summary
 boolean canReceivePrograms()
          Deprecated. Since 2.5 Use canReceiveProgramsWithTarget() instead.
 boolean canReceiveProgramsWithTarget()
          Gets whether the ProgramReceiveIf supports receiving programs from other plugins with a special target.
 boolean canUseProgramTree()
          Signal whether this plugin participates in the plugin tree view or not.
protected  ImageIcon createImageIcon(String fileName)
          Helper method that loads an ImageIcon from the plugin jar file and returns it.
 ImageIcon createImageIcon(String category, String icon, int size)
          Helper method that Loads an ImageIcon from the IconTheme
 ImageIcon createImageIcon(ThemeIcon icon)
          Helper method that Loads an ImageIcon from the IconTheme
protected  ImageIcon createImageIconForFileName(String fileName)
          Helper method that loads an ImageIcon from the file system and returns it.
 void execute()
          Deprecated. Since 1.1. Use getButtonAction() instead.
 void execute(Program program)
          Deprecated. Since 1.1. Use getContextMenuActions(Program) instead.
 void execute(Program[] programArr)
          Deprecated. Since 1.1. Use receivePrograms(Program[]) instead.
 PluginsProgramFilter[] getAvailableFilter()
          Returns the available program filters that the plugin supports.
 Class<? extends PluginsFilterComponent>[] getAvailableFilterComponentClasses()
          Returns the available plugins filter component classes.
 ActionMenu getButtonAction()
          Gets the action to use for the main menu and the toolbar.
protected  String getButtonIconName()
          Deprecated. Since 1.1. Use getButtonAction() instead.
protected  String getButtonText()
          Deprecated. Since 1.1. Use getButtonAction() instead.
 ActionMenu getContextMenuActions(Program program)
          Gets the actions for the context menu of a program.
 String getContextMenuItemText()
          Deprecated. Since 1.1. Use getContextMenuActions(Program) instead.
 String getId()
          Gets the ID of this plugin.
 PluginInfo getInfo()
          Gets the meta information about the plugin.
protected  JarFile getJarFile()
          Gets the jar file of this plugin.
 Icon getMarkIcon()
          Gets the icon used for marking programs in the program table.
 ThemeIcon getMarkIconFromTheme()
          This gets the ThemeIcon containg your mark icon.
protected  String getMarkIconName()
          Gets the name of the file, containing your mark icon (in the jar-File).
 Icon[] getMarkIcons(Program p)
          Gets the icons used for marking programs in the program table.
 Icon[] getMarkIconsForProgram(Program p)
          This gets the mark icons for a Program.
 int getMarkPriorityForProgram(Program p)
          Gets the mark priority for the given program that this Plugin uses.
protected  Frame getParentFrame()
          Gets the parent frame.
static PluginManager getPluginManager()
          Use this method to call methods of the plugin manager.
protected  Program getProgramFromContextMenuActionEvent(ActionEvent evt)
          Gets the Program from the ActionEvent that was passed to a context menu action NOTE: At the moment the Program is passed as ActionEvent source.
 ProgramReceiveTarget[] getProgramReceiveTargets()
          Returns an array of receive target or null if there is no target
 Icon[] getProgramTableIcons(Program program)
          Gets the icons this Plugin provides for the given program.
 String getProgramTableIconText()
          Gets the description text for the program table icons provided by this Plugin.
 ProgramRatingIf[] getRatingInterfaces()
          If this plugin can rate programs, this interface makes it possible to offer this ratings to other plugins.
 PluginTreeNode getRootNode()
          Gets the root node of the plugin for the plugin tree.
 SettingsTab getSettingsTab()
          Gets the SettingsTab object, which is added to the settings-window.
static Version getVersion()
          Gets the version of this plugin.
 void handleTvBrowserStartFinished()
          This method is called when the TV-Browser start is finished.
 void handleTvDataAdded(ChannelDayProgram newProg)
          This method is automatically called, when TV data was added.
 void handleTvDataAdded(MutableChannelDayProgram newProg)
          This method is automatically called, when TV data was added.
 void handleTvDataChanged()
          Deprecated. Since 1.1. Use handleTvDataUpdateFinished() instead.
 void handleTvDataChanged(ChannelDayProgram newProg)
          Deprecated. Since 0.9.7.2. Use handleTvDataAdded(ChannelDayProgram) instead.
 void handleTvDataDeleted(ChannelDayProgram oldProg)
          This method is automatically called, when TV data was deleted.
 void handleTvDataTouched(ChannelDayProgram removedDayProgram, ChannelDayProgram addedDayProgram)
          This method is automatically called, when TV data was touched (that means something was done with it).
 void handleTvDataUpdateFinished()
          This method is automatically called, when the TV data update is finished.
 boolean isAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
          Is used to track if a program filter be deleted.
 void layoutWindow(String windowId, Window window)
          Sets the window position and size for the given window from remembered values for that id.
 void layoutWindow(String windowId, Window window, Dimension defaultSize)
          Sets the window position and size for the given window from remembered values for that id.
 void loadSettings(Properties settings)
          Called by the host-application during start-up.
 void onActivation()
          This method is automatically called immediatly before the plugin gets activated.
 void onDeactivation()
          This method is automatically called immediatly after deactivating the plugin.
 void readData(ObjectInputStream in)
          Called by the host-application during start-up.
 void receivePrograms(Program[] programArr)
          Deprecated. Since 2.5 Use receivePrograms(Program[],ProgramReceiveTarget) instead.
 boolean receivePrograms(Program[] programArr, ProgramReceiveTarget receiveTarget)
          Receives a list of programs from another plugin with a target.
 boolean receiveValues(String[] values, ProgramReceiveTarget receiveTarget)
          Receives a list of Strings from another plugin with a target.
protected  boolean saveMe()
          Says the plugin proxy manager to store the settings and data of this plugin.
 void setJarFile(File jarFile)
          Called by the host-application to provide the jar file.
 void setParent(Frame parent)
          Called by the host-application to provide the parent frame.
static void setPluginManager(PluginManager manager)
          Called by the host-application to provide access to the plugin manager.
 void storeRootNode()
          Saves the entries under the root node in a file.
 Properties storeSettings()
          Called by the host-application during shut-down.
 boolean supportMultipleProgramExecution()
          Deprecated. Since 1.1. Use canReceivePrograms() instead.
 String toString()
           
 void writeData(ObjectOutputStream out)
          Counterpart to loadData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BIG_ICON

public static final String BIG_ICON
The name to use for the big icon (the 24x24 one for the toolbar) of the button action.

See Also:
getButtonAction(), Constant Field Values

DISABLED_ON_TASK_MENU

public static final String DISABLED_ON_TASK_MENU
The name to use for disabling a menu part for showing in ProgramInfo.

Since:
2.6
See Also:
Constant Field Values

SINGLE_CLICK_WAITING_TIME

public static final int SINGLE_CLICK_WAITING_TIME
The waiting time for single click performing.

Since:
2.7
See Also:
Constant Field Values

parent

protected Frame parent
Deprecated. Use method getParentFrame() instead.
The old member for the parent frame.

Some old plugin may still directly access it.

Constructor Detail

Plugin

public Plugin()
Method Detail

setPluginManager

public static final void setPluginManager(PluginManager manager)
Called by the host-application to provide access to the plugin manager.

Parameters:
manager - The plugin manager the plugins should use.

getPluginManager

public static final PluginManager getPluginManager()
Use this method to call methods of the plugin manager.

The plugin manager is your connection to TV-Browser. Every communication between TV-Browser and the plugin is either initiated by TV-Browser or made by using the plugin manager.

Returns:
The plugin manager.

setJarFile

public final void setJarFile(File jarFile)
                      throws TvBrowserException
Called by the host-application to provide the jar file.

Parameters:
jarFile - The jar file of this plugin.
Throws:
TvBrowserException - If the given file is no jar file.

getJarFile

protected final JarFile getJarFile()
Gets the jar file of this plugin. May be used to load ressources.

Returns:
The jar file of this plugin.

getId

public final String getId()
Gets the ID of this plugin.

Specified by:
getId in interface ContextMenuIf
Specified by:
getId in interface Marker
Specified by:
getId in interface ProgramReceiveIf
Returns:
The ID of this plugin.

setParent

public final void setParent(Frame parent)
Called by the host-application to provide the parent frame.

Parameters:
parent - The parent frame.

getParentFrame

protected final Frame getParentFrame()
Gets the parent frame.

The parent frame may be used for showing dialogs.

Returns:
The parent frame.

createImageIcon

protected final ImageIcon createImageIcon(String fileName)
Helper method that loads an ImageIcon from the plugin jar file and returns it.

Parameters:
fileName - The name of the icon file.
Returns:
The icon.

createImageIconForFileName

protected final ImageIcon createImageIconForFileName(String fileName)
Helper method that loads an ImageIcon from the file system and returns it.

Parameters:
fileName - The name of the icon file.
Returns:
The icon.
Since:
2.3

createImageIcon

public final ImageIcon createImageIcon(String category,
                                       String icon,
                                       int size)
Helper method that Loads an ImageIcon from the IconTheme

Parameters:
category - Category the Icon resists in
icon - Icon to load (without extension)
size - Size of the Icon
Returns:
The Icon
Since:
2.2

createImageIcon

public final ImageIcon createImageIcon(ThemeIcon icon)
Helper method that Loads an ImageIcon from the IconTheme

Parameters:
icon - Icon to load
Returns:
The Icon
Since:
2.2

readData

public void readData(ObjectInputStream in)
              throws IOException,
                     ClassNotFoundException
Called by the host-application during start-up.

Override this method to load any objects from the file system.

Parameters:
in - The stream to read the objects from.
Throws:
IOException - If reading failed.
ClassNotFoundException - If an object could not be casted correctly.
See Also:
writeData(ObjectOutputStream)

writeData

public void writeData(ObjectOutputStream out)
               throws IOException
Counterpart to loadData. Called when the application shuts down.

Override this method to store any objects to the file system. ATTENTION: Don't use any logger, thread or access to Frames in this method.

Parameters:
out - The stream to write the objects to
Throws:
IOException - If writing failed.
See Also:
readData(ObjectInputStream)

loadSettings

public void loadSettings(Properties settings)
Called by the host-application during start-up.

Override this method to load your plugins settings from the file system.

Parameters:
settings - The settings for this plugin (May be empty).

storeSettings

public Properties storeSettings()
Called by the host-application during shut-down.

Override this method to store your plugins settings to the file system. ATTENTION: Don't use any logger, thread or access to Frames in this method.

Returns:
The settings for this plugin or null if this plugin does not need to save any settings.

getVersion

public static Version getVersion()
Gets the version of this plugin.

Override this to provide a check of the plugin for the version to load from main plugins dir or the user plugins dir. The plugin with the highest version will be loaded.

Returns:
The version of this plugin.
Since:
2.6

getInfo

public PluginInfo getInfo()
Gets the meta information about the plugin.

Override this method to provide information about your plugin.

Returns:
The meta information about the plugin.

canReceivePrograms

public boolean canReceivePrograms()
Deprecated. Since 2.5 Use canReceiveProgramsWithTarget() instead.

Gets whether the plugin supports receiving programs from other plugins.

Override this method and return true, if your plugin is able to receive programs from other plugins.

Specified by:
canReceivePrograms in interface ProgramReceiveIf
Returns:
Whether the plugin supports receiving programs from other plugins.
See Also:
receivePrograms(Program[])

receivePrograms

public void receivePrograms(Program[] programArr)
Deprecated. Since 2.5 Use receivePrograms(Program[],ProgramReceiveTarget) instead.

Receives a list of programs from another plugin.

Override this method to receive programs from other plugins.

Specified by:
receivePrograms in interface ProgramReceiveIf
Parameters:
programArr - The programs passed from the other plugin.
See Also:
canReceivePrograms()

getContextMenuActions

public ActionMenu getContextMenuActions(Program program)
Gets the actions for the context menu of a program.

Override this method to provide context menu items for programs (e.g. in the program table). If your plugin shows a context menu only for some programs, but not for all, then you should explicitly return a non-null menu for the example program. Otherwise your context menu will not be shown in the settings dialog for the context menu order.

The following action values will be used:

Specified by:
getContextMenuActions in interface ContextMenuIf
Parameters:
program - The program the context menu will be shown for.
Returns:
the actions this plugin provides for the given program or null if the plugin does not provide this feature.
See Also:
getProgramFromContextMenuActionEvent(ActionEvent)

getProgramFromContextMenuActionEvent

protected final Program getProgramFromContextMenuActionEvent(ActionEvent evt)
Gets the Program from the ActionEvent that was passed to a context menu action

NOTE: At the moment the Program is passed as ActionEvent source. Please use this method to get the program and not directly the ActionEvent source. Because in future versions of TV-Browser the Program may be passed in another way!!

Parameters:
evt - The ActionEvent to get the Program from.
Returns:
The Program from the ActionEvent.
See Also:
getContextMenuActions(Program)

getButtonAction

public ActionMenu getButtonAction()
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:

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

getProgramTableIconText

public String getProgramTableIconText()
Gets the description text for the program table icons provided by this Plugin.

Override this method if your plugin provides icons for the program table (shown below the start time). The returned String will be shown in settings dialog (german: Aussehen->Sendungsanzeige->Plugin-Icons).

Returns:
The description text for the program table icons or null if the plugin does not provide this feature.
See Also:
getProgramTableIcons(Program)

getProgramTableIcons

public Icon[] getProgramTableIcons(Program program)
Gets the icons this Plugin provides for the given program. These icons will be shown in the program table under the start time.

Override this method to return the icons for the program table (shown below the start time).

This method is only called, if the option to show program table icons for this plugin is set in the options.

Parameters:
program - The programs to get the icons for.
Returns:
The icons for the given program or null if the plugin does not provide this feature.
See Also:
getProgramTableIconText()

getSettingsTab

public SettingsTab getSettingsTab()
Gets the SettingsTab object, which is added to the settings-window.

Override this method to provide a settings tab. The settings tab will be shown in the settings dialog in the plugin section.

Returns:
the SettingsTab object or null if the plugin does not provide this feature.

getMarkIcon

public final Icon getMarkIcon()
Gets the icon used for marking programs in the program table.

Specified by:
getMarkIcon in interface Marker
Returns:
the icon to use for marking programs in the program table.
See Also:
getMarkIconName()

getMarkIcons

public final Icon[] getMarkIcons(Program p)
Gets the icons used for marking programs in the program table.

Specified by:
getMarkIcons in interface Marker
Returns:
the icons to use for marking programs in the program table.
Since:
2.5

getMarkIconsForProgram

public Icon[] getMarkIconsForProgram(Program p)
This gets the mark icons for a Program. Please cache the icons in the Plugin.

Parameters:
p - The Program to get the icons for.
Returns:
The icons for the Program.
Since:
2.5

getMarkIconFromTheme

public ThemeIcon getMarkIconFromTheme()
This gets the ThemeIcon containg your mark icon. This Function uses the Icon-Theme-Function of the TV-Browser. For details see PluginManager.getIconFromTheme(Plugin, String, String, int)

Returns:
ThemeIcon that identifies the Icon in the Theme
Since:
2.2

getMarkIconName

protected String getMarkIconName()
Gets the name of the file, containing your mark icon (in the jar-File). Should be 16x16.

This icon is used for marking programs in the program table.

Override this method if your plugin is able to mark programs As an alternative you can use an Icon from the Icon-Theme using getMarkIconFromTheme()

Returns:
the name of the file, containing your icon for the toolbar or null if the plugin does not provide this feature.
See Also:
getMarkIcon(), Program.mark(Plugin), Program.unmark(Plugin)

handleTvDataUpdateFinished

public void handleTvDataUpdateFinished()
This method is automatically called, when the TV data update is finished.

Override this method to react on this event. If you want to read data from the internet use this method to track if a connection was established. ATTENTION: If you do so take care of the TV-Browser start, at the start this method mustn't use an internet connection. Use the method handleTvBrowserStartFinished() to track if the TV-Browser start was finished before allowing access to the internet in this method.

See Also:
handleTvBrowserStartFinished(), handleTvDataAdded(ChannelDayProgram), handleTvDataDeleted(ChannelDayProgram), handleTvDataChanged()

handleTvDataAdded

public void handleTvDataAdded(MutableChannelDayProgram newProg)
This method is automatically called, when TV data was added. (E.g. after an update).

The TV data can be modified by the plugin!

Override this method if you want to change/add data. Don't do other things than changing/adding data, use handleTvDataAdded(ChannelDayProgram) istead.

Parameters:
newProg - The new ChannelDayProgram.
See Also:
handleTvDataDeleted(ChannelDayProgram), handleTvDataChanged()

handleTvDataAdded

public void handleTvDataAdded(ChannelDayProgram newProg)
This method is automatically called, when TV data was added. (E.g. after an update).

The TV data cannot be changed in here because the saving of the data was allready done.

So use this method if you want to mark or do something else than changing with the program. If you want to change/add data use handleTvDataAdded(MutableChannelDayProgram) instead.

Parameters:
newProg - The new ChannelDayProgram.
See Also:
handleTvDataDeleted(ChannelDayProgram), handleTvDataChanged()

handleTvDataDeleted

public void handleTvDataDeleted(ChannelDayProgram oldProg)
This method is automatically called, when TV data was deleted. (E.g. after an update).

Override this method to react on this event.

Parameters:
oldProg - The old ChannelDayProgram which was deleted.
See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataChanged()

handleTvDataTouched

public void handleTvDataTouched(ChannelDayProgram removedDayProgram,
                                ChannelDayProgram addedDayProgram)
This method is automatically called, when TV data was touched (that means something was done with it). (E.g. after an update).

Parameters:
removedDayProgram - The old ChannelDayProgram.
addedDayProgram - The new ChannelDayProgram.
Since:
2.7.3
See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataDeleted(ChannelDayProgram), handleTvDataUpdateFinished()

supportMultipleProgramExecution

public boolean supportMultipleProgramExecution()
Deprecated. Since 1.1. Use canReceivePrograms() instead.

Gets whether the plugin supports execution of multiple programs.

Returns:
Whether the plugin supports execution of multiple programs.
See Also:
execute(Program[])

execute

public void execute(Program[] programArr)
Deprecated. Since 1.1. Use receivePrograms(Program[]) instead.

This method is invoked for multiple program execution.

Parameters:
programArr - The programs to execute this plugins with.
See Also:
supportMultipleProgramExecution()

getContextMenuItemText

public String getContextMenuItemText()
Deprecated. Since 1.1. Use getContextMenuActions(Program) instead.

Gets the text to use for the context menu.

This method is called by the host-application to show the plugin in the context menu.

Return null if your plugin does not provide this feature.

Returns:
the text to use for the context menu or null if the plugin does not provide this feature.

execute

public void execute(Program program)
Deprecated. Since 1.1. Use getContextMenuActions(Program) instead.

This method is invoked by the host-application if the user has choosen your plugin from the context menu.

Parameters:
program - The program from whichs context menu the plugin was chosen.

getButtonText

protected String getButtonText()
Deprecated. Since 1.1. Use getButtonAction() instead.

Gets the text to use for the main menu or the toolbar.

This method is called by the host-application to show the plugin in the menu or in the toolbar.

Returns:
the text to use for the menu or the toolbar or null if the plugin does not provide this feature.

getButtonIconName

protected String getButtonIconName()
Deprecated. Since 1.1. Use getButtonAction() instead.

Returns the name of the file, containing your button icon (in the jar-File).

This icon is used for the toolbar and the menu. Return null if your plugin does not provide this feature.

Returns:
the name of the file, containing your icon for the main menu and the toolbar.

execute

public void execute()
Deprecated. Since 1.1. Use getButtonAction() instead.

This method is invoked by the host-application if the user has choosen your plugin from the menu or the toolbar.


handleTvDataChanged

public void handleTvDataChanged()
Deprecated. Since 1.1. Use handleTvDataUpdateFinished() instead.

This method is automatically called, when the TV data update is finished.

Does by default nothing.

See Also:
handleTvDataAdded(ChannelDayProgram), handleTvDataDeleted(ChannelDayProgram)

handleTvDataChanged

public void handleTvDataChanged(ChannelDayProgram newProg)
Deprecated. Since 0.9.7.2. Use handleTvDataAdded(ChannelDayProgram) instead.

This method is automatically called, when the TV data has changed. (E.g. after an update).

The TV data may be modified by the plugin!

Does by default nothing.

Parameters:
newProg - The new ChannelDayProgram.

onActivation

public void onActivation()
This method is automatically called immediatly before the plugin gets activated.

Since:
1.1

onDeactivation

public void onDeactivation()
This method is automatically called immediatly after deactivating the plugin. ATTENTION: Don't use any logger, thread or access to Frames in this method.

Since:
1.1

canUseProgramTree

public boolean canUseProgramTree()
Signal whether this plugin participates in the plugin tree view or not.

Returns:
true, if the programs of this plugin are handled by the plugin tree view
Since:
1.1
See Also:
getRootNode()

handleTvBrowserStartFinished

public void handleTvBrowserStartFinished()
This method is called when the TV-Browser start is finished.

Since:
2.2

getRootNode

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

Returns:
The root node.
See Also:
canUseProgramTree()

storeRootNode

public void storeRootNode()
Saves the entries under the root node in a file.


canReceiveProgramsWithTarget

public boolean canReceiveProgramsWithTarget()
Gets whether the ProgramReceiveIf supports receiving programs from other plugins with a special target.

Specified by:
canReceiveProgramsWithTarget in interface ProgramReceiveIf
Returns:
Whether the ProgramReceiveIf supports receiving programs from other plugins with a special target.
Since:
2.5
See Also:
receivePrograms(Program[],ProgramReceiveTarget)

receivePrograms

public boolean receivePrograms(Program[] programArr,
                               ProgramReceiveTarget receiveTarget)
Receives a list of programs from another plugin with a target.

Specified by:
receivePrograms in interface ProgramReceiveIf
Parameters:
programArr - The programs passed from the other plugin.
receiveTarget - The receive target of the programs.
Returns:
If the programs were correct received (the target really exists).
Since:
2.5
See Also:
canReceiveProgramsWithTarget()

receiveValues

public boolean receiveValues(String[] values,
                             ProgramReceiveTarget receiveTarget)
Receives a list of Strings from another plugin with a target.

Specified by:
receiveValues in interface ProgramReceiveIf
Parameters:
values - The value array passed from the other plugin.
receiveTarget - The receive target of the programs.
Returns:
True if the value array was handled correct, false otherwise.
Since:
2.7
See Also:
canReceiveProgramsWithTarget()

getProgramReceiveTargets

public ProgramReceiveTarget[] getProgramReceiveTargets()
Returns an array of receive target or null if there is no target

Specified by:
getProgramReceiveTargets in interface ProgramReceiveIf
Returns:
The supported receive targets.
Since:
2.5
See Also:
canReceiveProgramsWithTarget(), receivePrograms(Program[],ProgramReceiveTarget)

getAvailableFilter

public PluginsProgramFilter[] getAvailableFilter()
Returns the available program filters that the plugin supports.

Returns:
The available program filters that the plugin supports or null if it supports no filter.
Since:
2.5

isAllowedToDeleteProgramFilter

public boolean isAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
Is used to track if a program filter be deleted. Should be make sure only the plugin itself can delete program filters.

Parameters:
programFilter - The program filter to delete.
Returns:
True if the program filter component can be deleted.

toString

public String toString()
Overrides:
toString in class Object

getAvailableFilterComponentClasses

public Class<? extends PluginsFilterComponent>[] getAvailableFilterComponentClasses()
Returns the available plugins filter component classes.
ATTENTON: Use return (Class[]) new Class[] {MyFilterComponent1.class,MyFilterComponent2.class}; because the creation of a class array with generic type didn't work.

Returns:
The available plugins filter components classes or null if no plugins filter components are supported.
Since:
2.5

getMarkPriorityForProgram

public int getMarkPriorityForProgram(Program p)
Gets the mark priority for the given program that this Plugin uses.

The mark priority can be Program.NO_MARK_PRIORITY, Program.MIN_MARK_PRIORITY, Program.LOWER_MEDIUM_MARK_PRIORITY, Program.MEDIUM_MARK_PRIORITY, Program.HIGHER_MEDIUM_MARK_PRIORITY or Program.MAX_MARK_PRIORITY.

Specified by:
getMarkPriorityForProgram in interface Marker
Parameters:
p - The program to get the mark prioriy for.
Returns:
The mark priority for the given program for this plugin.
Since:
2.5.1

saveMe

protected final boolean saveMe()
Says the plugin proxy manager to store the settings and data of this plugin.

Returns:
True if the settings could be saved successfully.
Since:
2.5.3

layoutWindow

public final void layoutWindow(String windowId,
                               Window window)
Sets the window position and size for the given window from remembered values for that id.

Parameters:
windowId - The relative id of the window. The ID only needs to unique for this plugin.
window - The window to layout.
Since:
2.7

layoutWindow

public final void layoutWindow(String windowId,
                               Window window,
                               Dimension defaultSize)
Sets the window position and size for the given window from remembered values for that id.

Parameters:
windowId - The relative id of the window. The ID only needs to unique for this plugin.
window - The window to layout.
defaultSize - The default size for the window.
Since:
2.7

getRatingInterfaces

public ProgramRatingIf[] getRatingInterfaces()
If this plugin can rate programs, this interface makes it possible to offer this ratings to other plugins. You can get all ProgramRatingIfs of all plugins using PluginManager.getAllProgramRatingIfs() The plugin can return more than one ratingif, e.g. average ratings, user rating ...

Returns:
the RatingIfs of this plugin
Since:
2.7

TV-Browser 2.7.5 API

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