public class CapturePlugin extends Plugin
Constructor and Description |
---|
CapturePlugin()
Creates the Plugin
|
Modifier and Type | Method and Description |
---|---|
boolean |
canReceivePrograms()
Return true if execute(program[]) is supported
|
boolean |
canUseProgramTree() |
ActionMenu |
getButtonAction()
Gets the action to use for the main menu and the toolbar.
|
CapturePluginData |
getCapturePluginData()
Returns the CapturePluginData
|
ActionMenu |
getContextMenuActions(Program program)
Gets the actions for the context menu of a program.
|
PluginInfo |
getInfo()
Implement this function to provide information about your plugin.
|
static CapturePlugin |
getInstance()
Returns this Instance
|
ThemeIcon |
getMarkIconFromTheme()
This gets the ThemeIcon containg your mark icon.
|
ProgramPanelSettings |
getProgramPanelSettings() |
PluginTreeNode |
getRootNode()
Get the Root-Node.
|
SettingsTab |
getSettingsTab()
Returns a new SettingsTab object, which is added to the settings-window.
|
Frame |
getSuperFrame() |
static Version |
getVersion() |
void |
handleTvBrowserStartFinished()
This method is called when the TV-Browser start is finished.
|
void |
handleTvDataUpdateFinished()
Check the programs after data update.
|
void |
loadSettings(Properties settings)
Called by the host-application during start-up.
|
void |
readData(ObjectInputStream in)
Called by the host-application during start-up.
|
void |
receivePrograms(Program[] programArr)
Receives a list of programs from another plugin.
|
void |
setCapturePluginData(CapturePluginData data)
Sets the CaputePluginData
|
void |
showDialog()
This method is invoked by the host-application if the user has choosen
your plugin from the menu.
|
Properties |
storeSettings()
Called by the host-application during shut-down.
|
void |
updateMarkedPrograms()
Updates the marked Programs.
|
void |
writeData(ObjectOutputStream out)
Counterpart to loadData.
|
createImageIcon, createImageIcon, createImageIcon, execute, execute, execute, getButtonIconName, getButtonText, getContextMenuItemText, getId, getJarFile, getMarkIcon, getMarkIconName, getParentFrame, getPluginManager, getProgramFromContextMenuActionEvent, getProgramTableIcons, getProgramTableIconText, handleTvDataAdded, handleTvDataChanged, handleTvDataChanged, handleTvDataDeleted, onActivation, onDeactivation, setJarFile, setParent, setPluginManager, storeRootNode, supportMultipleProgramExecution, toString
public static CapturePlugin getInstance()
public void readData(ObjectInputStream in) throws IOException, ClassNotFoundException
readData
in class Plugin
in
- The stream to read the objects from.IOException
- If reading failed.ClassNotFoundException
- If an object could not be casted correctly.writeData(ObjectOutputStream)
public void writeData(ObjectOutputStream out) throws IOException
writeData
in class Plugin
out
- The stream to write the objects toIOException
- If writing failed.readData(ObjectInputStream)
public void loadSettings(Properties settings)
loadSettings
in class Plugin
settings
- The settings for this plugin (May be empty).public Properties storeSettings()
storeSettings
in class Plugin
null
if this plugin
does not need to save any settings.public static Version getVersion()
public PluginInfo getInfo()
public SettingsTab getSettingsTab()
getSettingsTab
in class Plugin
null
if the plugin does not
provide this feature.public boolean canReceivePrograms()
canReceivePrograms
in class Plugin
Plugin.receivePrograms(Program[])
public void receivePrograms(Program[] programArr)
Override this method to receive programs from other plugins.
receivePrograms
in class Plugin
programArr
- The programs passed from the other plugin.canReceivePrograms()
public ActionMenu getContextMenuActions(Program program)
Plugin
Override this method to provide context menu items for programs (e.g. in the program table).
The following action values will be used:
Action.NAME
: The text for the context menu item.Action.SMALL_ICON
: The icon for the context menu item.
Should be 16x16.getContextMenuActions
in interface ContextMenuIf
getContextMenuActions
in class Plugin
program
- The program the context menu will be shown for.null
if the plugin does not provide this feature.Plugin.getProgramFromContextMenuActionEvent(ActionEvent)
public void updateMarkedPrograms()
public ActionMenu getButtonAction()
Plugin
Override this method to provide a menu item in the main menu and a toolbar button.
The following action values will be used:
Action.NAME
: The text for the main menu item and the
toolbar button.Action.SHORT_DESCRIPTION
: The description for the button
action. Used as tooltip and for the status bar.Action.SMALL_ICON
: The icon for the main menu item. Should
be 16x16.BIG_ICON
: The icon for the toolbar button. Should be
24x24.getButtonAction
in class Plugin
null
if the plugin does not provide this feature.public void showDialog()
public ThemeIcon getMarkIconFromTheme()
Plugin
PluginManager.getIconFromTheme(Plugin, String, String, int)
getMarkIconFromTheme
in class Plugin
public void setCapturePluginData(CapturePluginData data)
data
- CapturePluginDatapublic CapturePluginData getCapturePluginData()
public PluginTreeNode getRootNode()
getRootNode
in class Plugin
public boolean canUseProgramTree()
canUseProgramTree
in class Plugin
public void handleTvBrowserStartFinished()
Plugin
handleTvBrowserStartFinished
in class Plugin
public void handleTvDataUpdateFinished()
public Frame getSuperFrame()
public ProgramPanelSettings getProgramPanelSettings()
TV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)