TV-Browser 2.7.5 API

webplugin
Class WebPlugin

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

public class WebPlugin
extends Plugin

This Plugin is a generic Web-Tool. A User can configure his favorite Search-Engines and search for the given Movie


Field Summary
(package private) static WebAddress[] DEFAULT_ADRESSES
          Default-Addresses
 
Fields inherited from class devplugin.Plugin
BIG_ICON, DISABLED_ON_TASK_MENU, parent, SINGLE_CLICK_WAITING_TIME
 
Constructor Summary
WebPlugin()
          Creates the Plugin
 
Method Summary
 boolean canReceiveProgramsWithTarget()
          Gets whether the ProgramReceiveIf supports receiving programs from other plugins with a special target.
 ActionMenu getContextMenuActions(Program program)
          Creates the Context-Menu-Entries
 PluginInfo getInfo()
          Returns the Plugin-Info
static WebPlugin getInstance()
          Returns the Instance of the Plugin
 ThemeIcon getMarkIconFromTheme()
          This gets the ThemeIcon containg your mark icon.
 ProgramReceiveTarget[] getProgramReceiveTargets()
          Returns an array of receive target or null if there is no target
 SettingsTab getSettingsTab()
          Creates the Settings-Tab
protected  boolean getShowDetailMenus()
           
static Version getVersion()
           
 void handleTvBrowserStartFinished()
          This method is called when the TV-Browser start is finished.
 void handleTvDataUpdateFinished()
          This method is automatically called, when the TV data update is finished.
protected  void openUrl(Program program, WebAddress address)
          Opens the Address in a browser
 void readData(ObjectInputStream in)
          Loads the Data
 boolean receivePrograms(Program[] programArr, ProgramReceiveTarget target)
          Receives a list of programs from another plugin with a target.
 boolean receiveValues(String[] values, ProgramReceiveTarget target)
          Receives a list of Strings from another plugin with a target.
protected  void setShowDetailMenus(boolean showDetails)
           
 void writeData(ObjectOutputStream out)
          Saves the Data
 
Methods inherited from class devplugin.Plugin
canReceivePrograms, canUseProgramTree, createImageIcon, createImageIcon, createImageIcon, createImageIconForFileName, execute, execute, execute, getAvailableFilter, getAvailableFilterComponentClasses, getButtonAction, getButtonIconName, getButtonText, getContextMenuItemText, getId, getJarFile, getMarkIcon, getMarkIconName, getMarkIcons, getMarkIconsForProgram, getMarkPriorityForProgram, getParentFrame, getPluginManager, getProgramFromContextMenuActionEvent, getProgramTableIcons, getProgramTableIconText, getRatingInterfaces, getRootNode, handleTvDataAdded, handleTvDataAdded, handleTvDataChanged, handleTvDataChanged, handleTvDataDeleted, handleTvDataTouched, isAllowedToDeleteProgramFilter, layoutWindow, layoutWindow, loadSettings, onActivation, onDeactivation, receivePrograms, 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
 

Field Detail

DEFAULT_ADRESSES

static final WebAddress[] DEFAULT_ADRESSES
Default-Addresses

Constructor Detail

WebPlugin

public WebPlugin()
Creates the Plugin

Method Detail

getInstance

public static WebPlugin getInstance()
Returns the Instance of the Plugin

Returns:
Plugin-Instance

getMarkIconFromTheme

public ThemeIcon getMarkIconFromTheme()
Description copied from class: Plugin
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)

Overrides:
getMarkIconFromTheme in class Plugin
Returns:
ThemeIcon that identifies the Icon in the Theme

getVersion

public static Version getVersion()

getInfo

public PluginInfo getInfo()
Returns the Plugin-Info

Overrides:
getInfo in class Plugin
Returns:
The meta information about the plugin.

readData

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

Overrides:
readData in class Plugin
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:
Plugin.writeData(ObjectOutputStream)

writeData

public void writeData(ObjectOutputStream out)
               throws IOException
Saves the Data

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

getSettingsTab

public SettingsTab getSettingsTab()
Creates the Settings-Tab

Overrides:
getSettingsTab in class Plugin
Returns:
the SettingsTab object or null if the plugin does not provide this feature.

getContextMenuActions

public ActionMenu getContextMenuActions(Program program)
Creates the Context-Menu-Entries

Specified by:
getContextMenuActions in interface ContextMenuIf
Overrides:
getContextMenuActions in class Plugin
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:
Plugin.getProgramFromContextMenuActionEvent(ActionEvent)

canReceiveProgramsWithTarget

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

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

getProgramReceiveTargets

public ProgramReceiveTarget[] getProgramReceiveTargets()
Description copied from class: Plugin
Returns an array of receive target or null if there is no target

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

receiveValues

public boolean receiveValues(String[] values,
                             ProgramReceiveTarget target)
Description copied from class: Plugin
Receives a list of Strings from another plugin with a target.

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

receivePrograms

public boolean receivePrograms(Program[] programArr,
                               ProgramReceiveTarget target)
Description copied from class: Plugin
Receives a list of programs from another plugin with a target.

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

openUrl

protected void openUrl(Program program,
                       WebAddress address)
Opens the Address in a browser

Parameters:
program - Program to search on the Web
address - Search-Engine to use

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

handleTvDataUpdateFinished

public void handleTvDataUpdateFinished()
Description copied from class: Plugin
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.

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

getShowDetailMenus

protected boolean getShowDetailMenus()

setShowDetailMenus

protected void setShowDetailMenus(boolean showDetails)

TV-Browser 2.7.5 API

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