public class JavaPluginProxy extends AbstractPluginProxy
PluginProxy.Comparator
mLocalizer
Constructor and Description |
---|
JavaPluginProxy(PluginInfo info,
String pluginFileName,
String pluginId,
Icon pluginIcon) |
JavaPluginProxy(PluginInfo info,
String pluginFileName,
String pluginId,
String iconFileName) |
JavaPluginProxy(Plugin plugin,
String pluginFileName) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doCanReceivePrograms()
Deprecated.
Since 2.5
|
protected boolean |
doCanReceiveProgramsWithTarget()
Really gets whether the plugin supports receiving programs from other
plugins with target.
|
boolean |
doCanUseProgramTree() |
protected PluginsProgramFilter[] |
doGetAvailableFilter()
Really returns the available program filters that the plugin supports.
|
protected Class<? extends PluginsFilterComponent>[] |
doGetAvailableFilterComponentClasses()
Really gets the available filter component classes.
|
protected ActionMenu |
doGetButtonAction()
Really gets the action to use for the main menu and the toolbar.
|
protected PluginInfo |
doGetInfo()
Really gets the meta information about the plugin.
|
protected Icon[] |
doGetMarkIcons(Program p)
Really gets the icons to use for marking programs in the program table.
|
protected int |
doGetMarkPriorityForProgram(Program p)
Really gets the mark priority for the given Program.
|
protected ProgramReceiveTarget[] |
doGetProgramReceiveTargets()
Really return an array of receive target or
null if there is no target |
protected Icon[] |
doGetProgramTableIcons(Program program)
Really gets the icons this Plugin provides for the given program.
|
protected String |
doGetProgramTableIconText()
Gets the description text for the program table icons provided by this
Plugin.
|
protected SettingsTabProxy |
doGetSettingsTab()
Really gets the SettingsTab object, which is added to the settings-window.
|
protected void |
doHandleTvBrowserStartFinished()
This method is automatically called, when the TV-Browser start is complete.
|
protected void |
doHandleTvDataAdded(ChannelDayProgram newProg)
This method is automatically called, when TV data was added.
|
protected void |
doHandleTvDataAdded(MutableChannelDayProgram newProg)
This method is automatically called, when TV data was added.
|
protected void |
doHandleTvDataDeleted(ChannelDayProgram oldProg)
This method is automatically called, when TV data was deleted.
|
protected void |
doHandleTvDataTouched(ChannelDayProgram removedDayProgram,
ChannelDayProgram addedDayProgram)
This method is automatically called, when TV data was added.
|
protected void |
doHandleTvDataUpdateFinished()
This method is automatically called, when the TV data update is finished.
|
protected boolean |
doIsAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
Really return if a program filter can be deleted.
|
protected void |
doLoadSettings(File userDirectory)
Really loads the settings for this plugin.
|
void |
doOnActivation() |
void |
doOnDeactivation() |
protected void |
doReceivePrograms(Program[] programArr)
Deprecated.
Since 2.5
|
protected boolean |
doReceivePrograms(Program[] programArr,
ProgramReceiveTarget receiveTarget)
Really receives a list of programs from another plugin with target.
|
protected boolean |
doReceiveValues(String[] values,
ProgramReceiveTarget receiveTarget)
Really receives a list of Strings from another plugin with a target.
|
protected void |
doSaveSettings(File userDirectory,
boolean log)
Really saves the settings for this plugin.
|
String |
getButtonActionDescription()
Gets the description for this ButtonActionIf.
|
String |
getId()
Gets the ID of this plugin.
|
static String |
getJavaPluginId(Plugin javaPlugin)
Gets the ID of the given Java plugin.
|
String |
getPluginFileName()
return the file name of the plugin contained in this proxy
|
Icon |
getPluginIcon()
get the icon to represent this plugin in the settings
|
ProgramRatingIf[] |
getProgramRatingIfs()
If this plugin can rate programs, this interface makes it possible to offer this ratings
to other plugins.
|
PluginTreeNode |
getRootNode() |
protected ActionMenu |
goGetContextMenuActions(Program program)
Gets the actions for the context menu of a program.
|
(package private) void |
setParentFrame(Frame parent)
Sets the parent frame to the plugin.
|
void |
setPlugin(Plugin plugin,
String fileName)
connect a lazy loaded plugin to its proxy
|
addToArtificialPluginTree, assertActivatedState, canReceivePrograms, canReceiveProgramsWithTarget, canUseProgramTree, getArtificialRootNode, getAvailableFilter, getAvailableFilterComponentClasses, getButtonAction, getContextMenuActions, getInfo, getMarkIcon, getMarkIcons, getMarkPriorityForProgram, getProgramReceiveTargets, getProgramTableIcons, getProgramTableIconText, getSettingsTab, handlePluginException, handleTvBrowserStartFinished, handleTvDataAdded, handleTvDataAdded, handleTvDataDeleted, handleTvDataTouched, handleTvDataUpdateFinished, hasArtificialPluginTree, isActivated, isAllowedToDeleteProgramFilter, loadSettings, onActivation, onDeactivation, receivePrograms, receivePrograms, receiveValues, removeArtificialPluginTree, saveSettings, setActivated, toString
public JavaPluginProxy(PluginInfo info, String pluginFileName, String pluginId, Icon pluginIcon)
public JavaPluginProxy(PluginInfo info, String pluginFileName, String pluginId, String iconFileName)
public static String getJavaPluginId(Plugin javaPlugin)
javaPlugin
- The Java plugin to get the ID for.public String getId()
void setParentFrame(Frame parent)
setParentFrame
in class AbstractPluginProxy
parent
- The parent frame to set.protected void doLoadSettings(File userDirectory) throws TvBrowserException
doLoadSettings
in class AbstractPluginProxy
userDirectory
- The directory where the user data is stored.TvBrowserException
- If loading failed.protected void doSaveSettings(File userDirectory, boolean log) throws TvBrowserException
doSaveSettings
in class AbstractPluginProxy
userDirectory
- The directory where the user data is stored.TvBrowserException
- If saving failed.protected PluginInfo doGetInfo()
doGetInfo
in class AbstractPluginProxy
protected boolean doCanReceivePrograms()
doCanReceivePrograms
in class AbstractPluginProxy
AbstractPluginProxy.receivePrograms(Program[])
protected void doReceivePrograms(Program[] programArr)
doReceivePrograms
in class AbstractPluginProxy
programArr
- The programs passed from the other plugin.AbstractPluginProxy.canReceivePrograms()
protected SettingsTabProxy doGetSettingsTab()
doGetSettingsTab
in class AbstractPluginProxy
null
if the plugin does not
provide this feature.protected ActionMenu goGetContextMenuActions(Program program)
goGetContextMenuActions
in class AbstractPluginProxy
program
- The program the context menu will be shown for.null
if the plugin does not provide this feature.AbstractPluginProxy.getContextMenuActions(Program)
protected ActionMenu doGetButtonAction()
doGetButtonAction
in class AbstractPluginProxy
null
if the plugin does not provide this feature.AbstractPluginProxy.getButtonAction()
protected Icon[] doGetMarkIcons(Program p)
doGetMarkIcons
in class AbstractPluginProxy
protected String doGetProgramTableIconText()
Return null
if your plugin does not provide this feature.
doGetProgramTableIconText
in class AbstractPluginProxy
null
if the plugin does not provide this feature.AbstractPluginProxy.getProgramTableIcons(Program)
protected Icon[] doGetProgramTableIcons(Program program)
Return null
if your plugin does not provide this feature.
doGetProgramTableIcons
in class AbstractPluginProxy
program
- The programs to get the icons for.null
.AbstractPluginProxy.getProgramTableIconText()
protected void doHandleTvDataUpdateFinished()
protected void doHandleTvDataAdded(ChannelDayProgram newProg)
The TV data may be modified by the plugin! So this method must be called before new TV data is saved.
doHandleTvDataAdded
in class AbstractPluginProxy
newProg
- The new ChannelDayProgram.AbstractPluginProxy.handleTvDataDeleted(ChannelDayProgram)
,
AbstractPluginProxy.handleTvDataUpdateFinished()
protected void doHandleTvDataDeleted(ChannelDayProgram oldProg)
doHandleTvDataDeleted
in class AbstractPluginProxy
oldProg
- The old ChannelDayProgram which was deleted.AbstractPluginProxy.handleTvDataAdded(ChannelDayProgram)
,
AbstractPluginProxy.handleTvDataUpdateFinished()
protected void doHandleTvBrowserStartFinished()
doHandleTvBrowserStartFinished
in class AbstractPluginProxy
public void doOnActivation()
doOnActivation
in class AbstractPluginProxy
public void doOnDeactivation()
doOnDeactivation
in class AbstractPluginProxy
public boolean doCanUseProgramTree()
doCanUseProgramTree
in class AbstractPluginProxy
public PluginTreeNode getRootNode()
protected boolean doCanReceiveProgramsWithTarget()
doCanReceiveProgramsWithTarget
in class AbstractPluginProxy
AbstractPluginProxy.receivePrograms(Program[],ProgramReceiveTarget)
protected boolean doReceivePrograms(Program[] programArr, ProgramReceiveTarget receiveTarget)
doReceivePrograms
in class AbstractPluginProxy
programArr
- The programs passed from the other plugin with target.receiveTarget
- The target of the programs.AbstractPluginProxy.canReceiveProgramsWithTarget()
protected ProgramReceiveTarget[] doGetProgramReceiveTargets()
null
if there is no targetdoGetProgramReceiveTargets
in class AbstractPluginProxy
AbstractPluginProxy.canReceiveProgramsWithTarget()
,
AbstractPluginProxy.receivePrograms(Program[],ProgramReceiveTarget)
protected PluginsProgramFilter[] doGetAvailableFilter()
doGetAvailableFilter
in class AbstractPluginProxy
null
if it supports no filter.protected boolean doIsAllowedToDeleteProgramFilter(PluginsProgramFilter programFilter)
doIsAllowedToDeleteProgramFilter
in class AbstractPluginProxy
programFilter
- The program filter to delete.protected Class<? extends PluginsFilterComponent>[] doGetAvailableFilterComponentClasses()
doGetAvailableFilterComponentClasses
in class AbstractPluginProxy
null
if no plugins filter components are supported.protected int doGetMarkPriorityForProgram(Program p)
doGetMarkPriorityForProgram
in class AbstractPluginProxy
p
- The program to get the mark priority for.public String getPluginFileName()
PluginProxy
public void setPlugin(Plugin plugin, String fileName)
plugin
- public Icon getPluginIcon()
PluginProxy
getPluginIcon
in interface PluginProxy
getPluginIcon
in class AbstractPluginProxy
public ProgramRatingIf[] getProgramRatingIfs()
PluginProxy
PluginManager.getAllProgramRatingIfs()
The plugin can return more than one ratingif, e.g. average ratings, user rating ...public String getButtonActionDescription()
ButtonActionIf
protected void doHandleTvDataAdded(MutableChannelDayProgram newProg)
AbstractPluginProxy
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 AbstractPluginProxy.handleTvDataAdded(ChannelDayProgram)
istead.
doHandleTvDataAdded
in class AbstractPluginProxy
newProg
- The new ChannelDayProgram.AbstractPluginProxy.handleTvDataDeleted(ChannelDayProgram)
,
#handleTvDataChanged()
protected boolean doReceiveValues(String[] values, ProgramReceiveTarget receiveTarget)
AbstractPluginProxy
doReceiveValues
in class AbstractPluginProxy
values
- The value array passed from the other plugin.True
if the value array was handled correct,
false otherwise.AbstractPluginProxy.canReceiveProgramsWithTarget()
protected void doHandleTvDataTouched(ChannelDayProgram removedDayProgram, ChannelDayProgram addedDayProgram)
AbstractPluginProxy
The TV data may be modified by the plugin! So this method must be called before new TV data is saved.
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)