public abstract class AbstractPluginProxy extends Object implements PluginProxy, ContextMenuIf
This means that
Modifier and Type | Field and Description |
---|---|
static Localizer |
mLocalizer
The localizer for this class.
|
Constructor and Description |
---|
AbstractPluginProxy() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertActivatedState()
Checks whether the plugin is activated.
|
boolean |
canReceivePrograms()
Gets whether the plugin supports receiving programs from other plugins.
|
boolean |
canUseProgramTree() |
protected abstract boolean |
doCanReceivePrograms()
Really gets whether the plugin supports receiving programs from other
plugins.
|
protected abstract boolean |
doCanUseProgramTree() |
protected abstract ActionMenu |
doGetButtonAction()
Really gets the action to use for the main menu and the toolbar.
|
protected abstract PluginInfo |
doGetInfo()
Really gets the meta information about the plugin.
|
protected abstract Icon |
doGetMarkIcon()
Really gets the icon to use for marking programs in the program table.
|
protected abstract Icon[] |
doGetProgramTableIcons(Program program)
Really gets the icons this Plugin provides for the given program.
|
protected abstract String |
doGetProgramTableIconText()
Gets the description text for the program table icons provided by this
Plugin.
|
protected abstract SettingsTabProxy |
doGetSettingsTab()
Rally gets the SettingsTab object, which is added to the settings-window.
|
protected abstract void |
doHandleTvBrowserStartFinished() |
protected abstract void |
doHandleTvDataAdded(ChannelDayProgram newProg)
This method is automatically called, when TV data was added.
|
protected abstract void |
doHandleTvDataDeleted(ChannelDayProgram oldProg)
This method is automatically called, when TV data was deleted.
|
protected abstract void |
doHandleTvDataUpdateFinished()
This method is automatically called, when the TV data update is finished.
|
protected abstract void |
doLoadSettings(File userDirectory)
Really loads the settings for this plugin.
|
protected abstract void |
doOnActivation() |
protected abstract void |
doOnDeactivation() |
protected abstract void |
doReceivePrograms(Program[] programArr)
Really receives a list of programs from another plugin.
|
protected abstract void |
doSaveSettings(File userDirectory,
boolean log)
Really saves the settings for this plugin.
|
ActionMenu |
getButtonAction()
Gets the action to use for the main menu and the toolbar.
|
ActionMenu |
getContextMenuActions(Program program)
Gets the actions for the context menu of a program.
|
PluginInfo |
getInfo()
Gets the meta information about the plugin.
|
Icon |
getMarkIcon()
Gets the icon to use for marking programs in the program table.
|
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.
|
SettingsTabProxy |
getSettingsTab()
Gets the SettingsTab object, which is added to the settings-window.
|
protected abstract ActionMenu |
goGetContextMenuActions(Program program)
Really gets the actions for the context menu of a program.
|
void |
handlePluginException(Throwable t)
Handles a runtime exception that was caused by the plugin.
|
void |
handleTvBrowserStartFinished()
This method is called when the TV-Browser start is complete.
|
void |
handleTvDataAdded(ChannelDayProgram newProg)
This method is automatically called, when TV data was added.
|
void |
handleTvDataDeleted(ChannelDayProgram oldProg)
This method is automatically called, when TV data was deleted.
|
void |
handleTvDataUpdateFinished()
This method is automatically called, when the TV data update is finished.
|
boolean |
isActivated()
Gets whether the plugin is currently activated.
|
(package private) void |
loadSettings(File userDirectory)
Loads the settings for this plugin.
|
void |
onActivation()
This method is automatically called, when the plugin after activating
the plugin.
|
void |
onDeactivation()
This method is automatically called, when the plugin after deactivating
the plugin.
|
void |
receivePrograms(Program[] programArr)
Receives a list of programs from another plugin.
|
(package private) void |
saveSettings(File userDirectory,
boolean log)
Saves the settings for this plugin.
|
(package private) void |
setActivated(boolean activated)
Sets whether the plugin is currently activated.
|
(package private) abstract void |
setParentFrame(Frame parent)
Sets the parent frame to the plugin.
|
String |
toString()
Gets the name of the plugin.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRootNode
getId
getId
public static final Localizer mLocalizer
public final boolean isActivated()
isActivated
in interface PluginProxy
setActivated(boolean)
,
assertActivatedState()
final void setActivated(boolean activated)
This method may only be called by the PluginProxyManager
(that's
why it is package private).
activated
- Whether the plugin is currently activated.isActivated()
,
assertActivatedState()
abstract void setParentFrame(Frame parent)
parent
- The parent frame to set.final void loadSettings(File userDirectory) throws TvBrowserException
userDirectory
- The directory where the user data is stored.TvBrowserException
- If loading failed.protected abstract void doLoadSettings(File userDirectory) throws TvBrowserException
userDirectory
- The directory where the user data is stored.TvBrowserException
- If loading failed.final void saveSettings(File userDirectory, boolean log) throws TvBrowserException
userDirectory
- The directory where the user data is stored.TvBrowserException
- If saving failed.protected abstract void doSaveSettings(File userDirectory, boolean log) throws TvBrowserException
userDirectory
- The directory where the user data is stored.TvBrowserException
- If saving failed.public final PluginInfo getInfo()
getInfo
in interface PluginAccess
protected abstract PluginInfo doGetInfo()
public final boolean canReceivePrograms()
canReceivePrograms
in interface PluginAccess
receivePrograms(Program[])
protected abstract boolean doCanReceivePrograms()
receivePrograms(Program[])
public final void receivePrograms(Program[] programArr)
receivePrograms
in interface PluginAccess
programArr
- The programs passed from the other plugin.canReceivePrograms()
protected abstract void doReceivePrograms(Program[] programArr)
programArr
- The programs passed from the other plugin.canReceivePrograms()
public final SettingsTabProxy getSettingsTab()
getSettingsTab
in interface PluginProxy
null
if the plugin does
not provide this feature.protected abstract SettingsTabProxy doGetSettingsTab()
null
if the plugin does
not provide this feature.public final ActionMenu getContextMenuActions(Program program)
getContextMenuActions
in interface ContextMenuIf
getContextMenuActions
in interface PluginAccess
program
- The program the context menu will be shown for.null
if the plugin does not provide this feature.protected abstract ActionMenu goGetContextMenuActions(Program program)
program
- The program the context menu will be shown for.null
if the plugin does not provide this feature.getContextMenuActions(Program)
public final ActionMenu getButtonAction()
getButtonAction
in interface PluginProxy
null
if the plugin does not provide this feature.protected abstract ActionMenu doGetButtonAction()
null
if the plugin does not provide this feature.getButtonAction()
public final Icon getMarkIcon()
getMarkIcon
in interface Marker
getMarkIcon
in interface PluginAccess
protected abstract Icon doGetMarkIcon()
public final String getProgramTableIconText()
Return null
if your plugin does not provide this feature.
getProgramTableIconText
in interface PluginAccess
null
if the plugin does not provide this feature.getProgramTableIcons(Program)
protected abstract String doGetProgramTableIconText()
Return null
if your plugin does not provide this feature.
null
if the plugin does not provide this feature.getProgramTableIcons(Program)
public final Icon[] getProgramTableIcons(Program program)
Return null
if your plugin does not provide this feature.
getProgramTableIcons
in interface PluginAccess
program
- The programs to get the icons for.null
.getProgramTableIconText()
protected abstract Icon[] doGetProgramTableIcons(Program program)
Return null
if your plugin does not provide this feature.
program
- The programs to get the icons for.null
.getProgramTableIconText()
public final void handleTvDataUpdateFinished()
handleTvDataUpdateFinished
in interface PluginProxy
handleTvDataAdded(ChannelDayProgram)
,
handleTvDataDeleted(ChannelDayProgram)
protected abstract void doHandleTvDataUpdateFinished()
public final void handleTvDataAdded(ChannelDayProgram newProg)
The TV data may be modified by the plugin! So this method must be called before new TV data is saved.
handleTvDataAdded
in interface PluginProxy
newProg
- The new ChannelDayProgram.handleTvDataDeleted(ChannelDayProgram)
,
handleTvDataUpdateFinished()
protected abstract 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.
newProg
- The new ChannelDayProgram.handleTvDataDeleted(ChannelDayProgram)
,
handleTvDataUpdateFinished()
public final void handleTvDataDeleted(ChannelDayProgram oldProg)
handleTvDataDeleted
in interface PluginProxy
oldProg
- The old ChannelDayProgram which was deleted.handleTvDataAdded(ChannelDayProgram)
,
handleTvDataUpdateFinished()
protected abstract void doHandleTvDataDeleted(ChannelDayProgram oldProg)
oldProg
- The old ChannelDayProgram which was deleted.handleTvDataAdded(ChannelDayProgram)
,
handleTvDataUpdateFinished()
public void onActivation()
PluginProxy
onActivation
in interface PluginProxy
protected abstract void doOnActivation()
public void onDeactivation()
PluginProxy
onDeactivation
in interface PluginProxy
protected abstract void doOnDeactivation()
public boolean canUseProgramTree()
canUseProgramTree
in interface PluginAccess
canUseProgramTree
in interface PluginProxy
public void handleTvBrowserStartFinished()
handleTvBrowserStartFinished
in interface PluginProxy
protected abstract void doHandleTvBrowserStartFinished()
protected abstract boolean doCanUseProgramTree()
public final String toString()
This way Plugin objects may be used directly in GUI components like JLists.
public void handlePluginException(Throwable t)
handlePluginException
in interface PluginProxy
t
- The exception to handleprotected void assertActivatedState() throws TvBrowserException
TvBrowserException
- If the plugin is not activatedTV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)