|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tvbrowser.core.plugin.PluginManagerImpl
public class PluginManagerImpl
The implementation of the PluginManager interface. This class is the connection for the plugins to TV-Browser.
Nested Class Summary | |
---|---|
static class |
PluginManagerImpl.RatingFieldRating
|
Field Summary |
---|
Fields inherited from interface devplugin.PluginManager |
---|
SEARCHER_TYPE_BOOLEAN, SEARCHER_TYPE_EXACTLY, SEARCHER_TYPE_KEYWORD, SEARCHER_TYPE_REGULAR_EXPRESSION |
Method Summary | |
---|---|
javax.swing.JPopupMenu |
createPluginContextMenu(Program program,
ContextMenuIf caller)
Creates a context menu for the given program containing all plugins. |
ProgramSearcher |
createProgramSearcher(int type,
java.lang.String searchTerm,
boolean caseSensitive)
Creates a ProgramSearcher. |
javax.swing.JPopupMenu |
createRemovedProgramContextMenu(Program program)
Creates a context menu for the given program. |
void |
deleteFileOnNextStart(java.lang.String path)
adds a file name to the list of files to be deleted on next TV-Browser start |
PluginAccess |
getActivatedPluginForId(java.lang.String pluginId)
Gets the activated plugin with the given ID. |
PluginAccess[] |
getActivatedPlugins()
Returns all activated Plugins. |
ProgramRatingIf[] |
getAllProgramRatingIfs()
Gets all ProgramRatingIfs of all plugins. |
AbstractPluginProgramFormating[] |
getAvailableGlobalPuginProgramFormatings()
Gets the available global program configurations. |
java.util.Iterator<Program> |
getChannelDayProgram(Date date,
Channel channel)
Gets an iterator through all programs of the specified channel at the specified date. |
Date |
getCurrentDate()
Get the date currently shown in the program table. |
TvDataServiceProxy |
getDataServiceProxy(java.lang.String id)
|
PluginAccess |
getDefaultContextMenuPlugin()
Gets the plugin that is used as default in the context menu. |
Program |
getExampleProgram()
Returns an example program. |
FilterManager |
getFilterManager()
Returns the filter manager of TV-Browser. |
javax.swing.ImageIcon |
getIconFromTheme(Plugin plugin,
java.lang.String category,
java.lang.String iconName,
int size)
Returns an icon from the icon-theme-system If your plugin has icons that are not available as icons within an theme, you can add your icons into your jar-file. |
javax.swing.ImageIcon |
getIconFromTheme(Plugin plugin,
ThemeIcon icon)
Returns an Icon from the Icon-Theme-System If your Plugin has Icons that are not available as Icons within an Theme, you can add your Icons into your Jar-File. |
static PluginManager |
getInstance()
Returns the instance of this class, if there is no instance it is created first. |
java.lang.String |
getJavaPluginId(Plugin javaPlugin)
Gets the ID of the given Java plugin. |
Program[] |
getMarkedPrograms()
Return all marked programs. |
Program |
getProgram(Date date,
java.lang.String progID)
Gets a program. |
Program |
getProgram(java.lang.String uniqueID)
Gets a program. |
Program[] |
getPrograms(Date date,
java.lang.String progID)
Gets a program. |
Program[] |
getPrograms(java.lang.String uniqueID)
Gets programs. |
ProgramReceiveIf |
getReceiceIfForId(java.lang.String id)
Return the ReceiveIfFor given id or null if there is
no ReceiveIf for the given id. |
ProgramReceiveIf[] |
getReceiveIfs()
Return all Plugins/Functions that are able to receive programs. |
ProgramReceiveIf[] |
getReceiveIfs(ProgramReceiveIf caller,
ProgramReceiveTarget callerTarget)
Return all Plugins/Functions that are able to receive programs. |
Channel[] |
getSubscribedChannels()
Gets all channels the user has subscribed. |
TvBrowserSettings |
getTvBrowserSettings()
Returns some settings a plugin may need. |
Version |
getTVBrowserVersion()
|
void |
goToDate(Date date)
Let TV-Browser change the date to the given date. |
void |
handleProgramDoubleClick(Program program)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramDoubleClick(Program program,
ContextMenuIf caller)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramMiddleClick(Program program)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramMiddleClick(Program program,
ContextMenuIf caller)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramMiddleDoubleClick(Program program)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramMiddleDoubleClick(Program program,
ContextMenuIf caller)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramSingleClick(Program program)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramSingleClick(Program program,
ContextMenuIf caller)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
void |
handleProgramSingleCtrlClick(Program program,
ContextMenuIf caller)
Deprecated. since 3.3.1 Use #ProgramMouseEventHandler and/or #ProgramKeyEventHandler instead. |
protected void |
handleTvBrowserStartFinished()
|
boolean |
isDataAvailable(Date date)
check if some TV data is available on the given date |
boolean |
isTvBrowserStartFinished()
Gets if TV-Browser start was finished. |
void |
scrollToChannel(Channel channel)
Let TV-Browser scroll to the given channel. |
void |
scrollToProgram(Program program)
Let TV-Browser scroll to the given program. |
void |
scrollToTime(int time)
Let TV-Browser scroll to the given time. |
void |
scrollToTime(int time,
boolean highlight)
Let TV-Browser scroll to the given time. |
void |
selectProgram(Program program)
Selects the given program in the program table. |
boolean |
showBalloonTip(java.lang.String caption,
java.lang.String message,
java.awt.TrayIcon.MessageType messageType)
Shows a balloon tip on the TV-Browser tray icon. |
void |
showSettings(Plugin plugin)
Show the Settings-Dialog for a Plugin |
void |
showSettings(java.lang.String settingsItem)
Show the Settings-Dialog with a Specific SettingsItem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PluginManager getInstance()
public Program getProgram(Date date, java.lang.String progID)
PluginManager
getProgram
in interface PluginManager
date
- The date when the program is shown.progID
- The ID of the program.
null
if there is no such program.public Program[] getPrograms(Date date, java.lang.String progID)
getPrograms
in interface PluginManager
date
- The date when the program is shown.progID
- The ID of the program.
null
if there is no such program.public Program getProgram(java.lang.String uniqueID)
getProgram
in interface PluginManager
uniqueID
- The unique ID (Program.getUniqueID()
) of this program.
null
if there is no such program.public Program[] getPrograms(java.lang.String uniqueID)
PluginManager
getPrograms
in interface PluginManager
uniqueID
- The unique ID (Program.getUniqueID()
) of the programs.
null
if there are no such programs.public Channel[] getSubscribedChannels()
getSubscribedChannels
in interface PluginManager
public java.util.Iterator<Program> getChannelDayProgram(Date date, Channel channel)
getChannelDayProgram
in interface PluginManager
date
- The date of the programs.channel
- The channel of the programs.
null
.public ProgramSearcher createProgramSearcher(int type, java.lang.String searchTerm, boolean caseSensitive) throws TvBrowserException
createProgramSearcher
in interface PluginManager
type
- The searcher type to create. Must be one of
PluginManager.SEARCHER_TYPE_EXACTLY
,PluginManager.SEARCHER_TYPE_KEYWORD
,PluginManager.SEARCHER_TYPE_REGULAR_EXPRESSION
orPluginManager.SEARCHER_TYPE_BOOLEAN
.searchTerm
- The search term the searcher should look for.caseSensitive
- Specifies whether the searcher should be case sensitive.
TvBrowserException
- If creating the program searcher failed.public PluginAccess[] getActivatedPlugins()
getActivatedPlugins
in interface PluginManager
public java.lang.String getJavaPluginId(Plugin javaPlugin)
getJavaPluginId
in interface PluginManager
javaPlugin
- The Java plugin to get the ID for.
public PluginAccess getActivatedPluginForId(java.lang.String pluginId)
getActivatedPluginForId
in interface PluginManager
pluginId
- The ID of the wanted plugin.
null
if no such plugin
exists or if the plugin is not activated.public TvDataServiceProxy getDataServiceProxy(java.lang.String id)
getDataServiceProxy
in interface PluginManager
public javax.swing.JPopupMenu createPluginContextMenu(Program program, ContextMenuIf caller)
createPluginContextMenu
in interface PluginManager
program
- The program to create the context menu forcaller
- The calling plugin.
public Program getExampleProgram()
getExampleProgram
in interface PluginManager
public void handleProgramSingleClick(Program program)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
PluginManager
Executes the single left click context menu function. Plugins should use handleProgramDoubleClick(Program program, Plugin caller). It prevents the Plugin to be activated a second time.
handleProgramSingleClick
in interface PluginManager
program
- The program to pass to the single left click context menu function.public void handleProgramSingleClick(Program program, ContextMenuIf caller)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
PluginManager
Executes the default context menu plugin.
handleProgramSingleClick
in interface PluginManager
program
- The program to pass to the default context menu function.caller
- The ContextMenuIf that calls this. Prevents the ContextMenuIf
to be activated twicepublic void handleProgramSingleCtrlClick(Program program, ContextMenuIf caller)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
PluginManager
Executes the default context menu plugin.
handleProgramSingleCtrlClick
in interface PluginManager
program
- The program to pass to the default context menu function.caller
- The ContextMenuIf that calls this. Prevents the ContextMenuIf
to be activated twicepublic void handleProgramDoubleClick(Program program)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the default context menu plugin. Plugins should use handleProgramDoubleClick(Program program, Plugin caller). It prevetns the Plugin to be activated a second time.
handleProgramDoubleClick
in interface PluginManager
program
- The program to pass to the default context menu plugin.public void handleProgramDoubleClick(Program program, ContextMenuIf caller)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the default context menu plugin.
handleProgramDoubleClick
in interface PluginManager
program
- The program to pass to the default context menu plugin.caller
- ContextMenuIf that calls this. Prevents the ContextMenuIf to be activated twicepublic void handleProgramMiddleClick(Program program)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the middle click context menu plugin. Plugins should use handleProgramMiddleClick(Program program, Plugin caller). It prevents the Plugin to be activated a second time.
handleProgramMiddleClick
in interface PluginManager
program
- The program to pass to the middle click context menu plugin.public void handleProgramMiddleClick(Program program, ContextMenuIf caller)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the middle click context menu action.
handleProgramMiddleClick
in interface PluginManager
program
- The program to pass to the middle click context menu action.caller
- ContextMenuIf that calls this. Prevents the ContextMenuIf to be activated twice.public void handleProgramMiddleDoubleClick(Program program)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the middle click context menu action. Plugins should use handleProgramMiddleClick(Program program, Plugin caller). It prevents the Plugin to be activated a second time.
handleProgramMiddleDoubleClick
in interface PluginManager
program
- The program to pass to the middle click context menu action.public void handleProgramMiddleDoubleClick(Program program, ContextMenuIf caller)
#ProgramMouseEventHandler
and/or #ProgramKeyEventHandler
instead.
Executes the middle double click context menu action.
handleProgramMiddleDoubleClick
in interface PluginManager
program
- The program to pass to the middle double click context menu action.caller
- ContextMenuIf that calls this. Prevents the ContextMenuIf to be activated twice.public PluginAccess getDefaultContextMenuPlugin()
public TvBrowserSettings getTvBrowserSettings()
getTvBrowserSettings
in interface PluginManager
public javax.swing.ImageIcon getIconFromTheme(Plugin plugin, java.lang.String category, java.lang.String iconName, int size)
getIconFromTheme
in interface PluginManager
plugin
- Plugin that wants to load an iconcategory
- Category of the icon (action, etc...)iconName
- icon name without file extensionsize
- Size of the icon
null
if notpublic javax.swing.ImageIcon getIconFromTheme(Plugin plugin, ThemeIcon icon)
getIconFromTheme
in interface PluginManager
plugin
- Plugin that wants to load an Iconicon
- ThemeIcon that represents the Icon
public void showSettings(Plugin plugin)
showSettings
in interface PluginManager
plugin
- Use this Pluginpublic void showSettings(java.lang.String settingsItem)
showSettings
in interface PluginManager
settingsItem
- SettingsItem to show (e.g. SettingsItem.CHANNELS)public Program[] getMarkedPrograms()
getMarkedPrograms
in interface PluginManager
public ProgramReceiveIf[] getReceiveIfs()
getReceiveIfs
in interface PluginManager
public ProgramReceiveIf[] getReceiveIfs(ProgramReceiveIf caller, ProgramReceiveTarget callerTarget)
getReceiveIfs
in interface PluginManager
caller
- The caller ProgramReceiveIf.callerTarget
- The target that calls the receive if array.
public ProgramReceiveIf getReceiceIfForId(java.lang.String id)
null
if there is
no ReceiveIf for the given id.
getReceiceIfForId
in interface PluginManager
id
- The id of the ReceiveIf.
null
public void scrollToProgram(Program program)
scrollToProgram
in interface PluginManager
program
- The program to scroll to.public void selectProgram(Program program)
PluginManager
selectProgram
in interface PluginManager
program
- The program to select.public void scrollToTime(int time)
scrollToTime
in interface PluginManager
time
- The time to scroll to in minutes after midnight.public void scrollToTime(int time, boolean highlight)
scrollToTime
in interface PluginManager
time
- The time to scroll to in minutes after midnight.highlight
- If programs at scroll time should be highlighted (if scroll highlighting is enabled.)public void scrollToChannel(Channel channel)
scrollToChannel
in interface PluginManager
channel
- The channel to scroll to.public void goToDate(Date date)
goToDate
in interface PluginManager
date
- The date to show the program for.public FilterManager getFilterManager()
getFilterManager
in interface PluginManager
null
if TV-Browser isn't fully loaded.protected void handleTvBrowserStartFinished()
public AbstractPluginProgramFormating[] getAvailableGlobalPuginProgramFormatings()
getAvailableGlobalPuginProgramFormatings
in interface PluginManager
public Date getCurrentDate()
PluginManager
getCurrentDate
in interface PluginManager
public ProgramRatingIf[] getAllProgramRatingIfs()
getAllProgramRatingIfs
in interface PluginManager
public void deleteFileOnNextStart(java.lang.String path)
PluginManager
deleteFileOnNextStart
in interface PluginManager
path
- full file pathpublic boolean isDataAvailable(Date date)
PluginManager
isDataAvailable
in interface PluginManager
true
if at least one channel has data for the datepublic boolean showBalloonTip(java.lang.String caption, java.lang.String message, java.awt.TrayIcon.MessageType messageType)
PluginManager
showBalloonTip
in interface PluginManager
caption
- The caption of the displayed message.message
- The message to display in the balloon tip.messageType
- The java.awt.TrayIcon.MessageType of the displayed balllon tip.
public Version getTVBrowserVersion()
getTVBrowserVersion
in interface PluginManager
public javax.swing.JPopupMenu createRemovedProgramContextMenu(Program program)
PluginManager
createRemovedProgramContextMenu
in interface PluginManager
program
- The removed program to create the context menu for
public boolean isTvBrowserStartFinished()
PluginManager
isTvBrowserStartFinished
in interface PluginManager
true
if TV-Browser start was finished, false
otherwise.
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |