|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdevplugin.Plugin
tvraterplugin.TVRaterPlugin
public class TVRaterPlugin
This Plugin gives the User the possibility to rate a Movie TODO: Get Personal Ratings from Server TODO: Send Original-Titles to Server
| Field Summary | |
|---|---|
protected static int |
MINLENGTH
|
| Fields inherited from class devplugin.Plugin |
|---|
BIG_ICON, DISABLED_ON_TASK_MENU, parent, SINGLE_CLICK_WAITING_TIME |
| Constructor Summary | |
|---|---|
TVRaterPlugin()
|
|
| Method Summary | |
|---|---|
boolean |
canUseProgramTree()
Signal whether this plugin participates in the plugin tree view or not. |
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. |
ActionMenu |
getContextMenuActions(Program program)
Gets the actions for the context menu of a program. |
Database |
getDatabase()
Returns the Database for the Ratings |
PluginInfo |
getInfo()
Gets the meta information about the plugin. |
static TVRaterPlugin |
getInstance()
Returns an Instance of this Plugin |
String |
getMarkIconName()
Gets the name of the file, containing your mark icon (in the jar-File). |
Frame |
getParentFrameForTVRater()
Gets the parent frame. |
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. |
Rating |
getRating(Program program)
Returns the Rating for a program. |
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. |
Properties |
getSettings()
Returns the Settings for this Plugin |
SettingsTab |
getSettingsTab()
Gets the SettingsTab object, which is added to the settings-window. |
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. |
boolean |
isProgramRateable(Program program)
Returns true if Program is rateable (Length > MINLENGTH or last Program of Day) |
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 |
readData(ObjectInputStream in)
Called by the host-application during start-up. |
void |
showDialog()
This method is invoked by the host-application if the user has choosen your plugin from the menu. |
void |
showRatingDialog(Program program)
|
Properties |
storeSettings()
Called by the host-application during shut-down. |
void |
updateCurrentDate()
Force an update of the currently shown programs in the program table where we need to add/update a TV rating. |
protected void |
updateRootNode()
collect all expired favorites without rating for the plugin tree |
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 |
|---|
protected static final int MINLENGTH
| Constructor Detail |
|---|
public TVRaterPlugin()
| Method Detail |
|---|
public static Version getVersion()
public PluginInfo getInfo()
PluginOverride this method to provide information about your plugin.
getInfo in class Pluginpublic ActionMenu getButtonAction()
PluginOverride 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 Pluginnull
if the plugin does not provide this feature.public void showDialog()
public ActionMenu getContextMenuActions(Program program)
Plugin
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:
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 ContextMenuIfgetContextMenuActions in class Pluginprogram - The program the context menu will be shown for.
null if the plugin does not provide this feature.Plugin.getProgramFromContextMenuActionEvent(ActionEvent)public void showRatingDialog(Program program)
public Properties storeSettings()
PluginOverride 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.
storeSettings in class Pluginnull if this plugin
does not need to save any settings.public void loadSettings(Properties settings)
PluginOverride this method to load your plugins settings from the file system.
loadSettings in class Pluginsettings - The settings for this plugin (May be empty).public SettingsTab getSettingsTab()
PluginOverride this method to provide a settings tab. The settings tab will be shown in the settings dialog in the plugin section.
getSettingsTab in class Pluginnull if the plugin does not
provide this feature.public String getMarkIconName()
PluginThis 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 Plugin.getMarkIconFromTheme()
getMarkIconName in class Pluginnull if the plugin does not provide this feature.Plugin.getMarkIcon(),
Program.mark(Plugin),
Program.unmark(Plugin)public String getProgramTableIconText()
Return null if your plugin does not provide this feature.
getProgramTableIconText in class PlugingetProgramTableIcons(Program)public Icon[] getProgramTableIcons(Program program)
Return null if your plugin does not provide this feature.
getProgramTableIcons in class Pluginprogram - The programs to get the icons for.
null.getProgramTableIconText()public Rating getRating(Program program)
program - Get rating for this program
public Database getDatabase()
public Properties getSettings()
public void readData(ObjectInputStream in)
throws IOException,
ClassNotFoundException
readData in class Pluginin - 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 Pluginout - The stream to write the objects to
IOException - If writing failed.readData(ObjectInputStream)public Frame getParentFrameForTVRater()
The parent frame may be used for showing dialogs.
public void handleTvBrowserStartFinished()
Plugin
handleTvBrowserStartFinished in class Pluginpublic void handleTvDataUpdateFinished()
PluginOverride 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.
handleTvDataUpdateFinished in class PluginPlugin.handleTvBrowserStartFinished(),
Plugin.handleTvDataAdded(ChannelDayProgram),
Plugin.handleTvDataDeleted(ChannelDayProgram),
Plugin.handleTvDataChanged()public static TVRaterPlugin getInstance()
public boolean isProgramRateable(Program program)
program - Program to check
public Class<? extends PluginsFilterComponent>[] getAvailableFilterComponentClasses()
Plugin(Class extends PluginsFilterComponent>[]) new Class[] {MyFilterComponent1.class,MyFilterComponent2.class};
because the creation of a class array with generic type didn't work.
getAvailableFilterComponentClasses in class Pluginnull if no plugins filter components are supported.public PluginsProgramFilter[] getAvailableFilter()
Plugin
getAvailableFilter in class Pluginnull if it supports no filter.public void updateCurrentDate()
public boolean canUseProgramTree()
Plugin
canUseProgramTree in class PluginPlugin.getRootNode()public PluginTreeNode getRootNode()
Plugin
getRootNode in class PluginPlugin.canUseProgramTree()protected void updateRootNode()
public void onActivation()
Plugin
onActivation in class Pluginpublic ProgramRatingIf[] getRatingInterfaces()
PluginPluginManager.getAllProgramRatingIfs()
The plugin can return more than one ratingif, e.g. average ratings, user rating ...
getRatingInterfaces in class Plugin
|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||