public interface PluginManager
Modifier and Type | Field and Description |
---|---|
static int |
SEARCHER_TYPE_BOOLEAN
Specifies, that the search term is a boolean expression.
|
static int |
SEARCHER_TYPE_EXACTLY
Specifies, that the search term has to match exactly.
|
static int |
SEARCHER_TYPE_KEYWORD
Specifies, that the search term is a keyword (= substring).
|
static int |
SEARCHER_TYPE_REGULAR_EXPRESSION
Specifies, that the search term is a regular expression.
|
Modifier and Type | Method and Description |
---|---|
JPopupMenu |
createPluginContextMenu(Program program,
ContextMenuIf caller)
Creates a context menu for the given program containing all plugins.
|
ProgramSearcher |
createProgramSearcher(int type,
String searchTerm,
boolean caseSensitive)
Creates a ProgramSearcher.
|
PluginAccess |
getActivatedPluginForId(String pluginId)
Gets the activated plugin with the given ID.
|
PluginAccess[] |
getActivatedPlugins()
Returns all activated Plugins.
|
ProgramRatingIf[] |
getAllProgramRatingIfs()
Gets all ProgramRatingIfs of all plugins.
|
ProgramFilter[] |
getAvailableFilters()
Deprecated.
Since 2.5 Use
FilterManager.getAvailableFilters() instead. |
AbstractPluginProgramFormating[] |
getAvailableGlobalPuginProgramFormatings()
Gets the available global program configurations.
|
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.
|
TvDataService |
getDataService(String dataServiceClassName)
Deprecated.
|
TvDataServiceProxy |
getDataServiceProxy(String id) |
Program |
getExampleProgram()
Returns an example program.
|
FilterManager |
getFilterManager()
Returns the filter manager of TV-Browser.
|
ImageIcon |
getIconFromTheme(Plugin plugin,
String category,
String icon,
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.
|
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.
|
Plugin[] |
getInstalledPlugins()
Deprecated.
Since 1.1. Use
getActivatedPlugins() instead. |
String |
getJavaPluginId(Plugin javaPlugin)
Gets the ID of the given Java plugin.
|
Program[] |
getMarkedPrograms()
Return all marked programs.
|
Program |
getProgram(Date date,
String progID)
Gets a program.
|
ProgramReceiveIf |
getReceiceIfForId(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.
|
void |
goToDate(Date date)
Let TVB change the date to the given date.
|
void |
handleProgramDoubleClick(Program program)
Handles a double click on a program.
|
void |
handleProgramDoubleClick(Program program,
ContextMenuIf caller)
Handles a double click on a program.
|
void |
handleProgramMiddleClick(Program program)
Handles a middle click on a program.
|
void |
handleProgramMiddleClick(Program program,
ContextMenuIf caller)
Handles a middle click on a program.
|
void |
handleProgramSingleClick(Program program)
Handles a single left click on a program.
|
void |
handleProgramSingleClick(Program program,
ContextMenuIf caller)
Handles a single left click on a program.
|
void |
scrollToChannel(Channel channel)
Let TVB scroll to the given channel.
|
void |
scrollToProgram(Program program)
Let TVB scroll to the given program.
|
void |
scrollToTime(int time)
Let TVB scroll to the given time.
|
Program[] |
search(String regex,
boolean inTitle,
boolean inText,
boolean caseSensitive,
Channel[] channels,
Date startDate,
int nrDays)
Deprecated.
Use
createProgramSearcher(int, String, boolean)
instead. |
Program[] |
search(String regex,
boolean caseSensitive,
ProgramFieldType[] fieldArr,
Date startDate,
int nrDays,
Channel[] channels,
boolean sortByStartTime)
Deprecated.
Since 1.1. Use
createProgramSearcher(int, String, boolean)
instead. |
void |
showSettings(Plugin plugin)
Show the Settings-Dialog for a Plugin
|
void |
showSettings(String settingsItem)
Show the Settings-Dialog with a Specific SettingsItem
|
static final int SEARCHER_TYPE_EXACTLY
static final int SEARCHER_TYPE_KEYWORD
static final int SEARCHER_TYPE_REGULAR_EXPRESSION
static final int SEARCHER_TYPE_BOOLEAN
Program getProgram(Date date, String progID)
date
- The date when the program is shown.progID
- The ID of the program.null
if there is no such program.Channel[] getSubscribedChannels()
Iterator<Program> getChannelDayProgram(Date date, Channel channel)
date
- The date of the programs.channel
- The channel of the programs.null
if the requested data is not available.Program[] search(String regex, boolean inTitle, boolean inText, boolean caseSensitive, Channel[] channels, Date startDate, int nrDays) throws TvBrowserException
createProgramSearcher(int, String, boolean)
instead.regex
- The regular expression programs must match to.inTitle
- Should be searched in the title?inText
- Should be searched in the description?caseSensitive
- Should the search be case sensitive?channels
- The channels to search in.startDate
- The date to start the search.nrDays
- The number of days to include after the start date. If
negative the days before the start date are used.TvBrowserException
- If there is a syntax error in the regular expression.Program[] search(String regex, boolean caseSensitive, ProgramFieldType[] fieldArr, Date startDate, int nrDays, Channel[] channels, boolean sortByStartTime) throws TvBrowserException
createProgramSearcher(int, String, boolean)
instead.regex
- The regular expression programs must match to.caseSensitive
- Should the search be case sensitive?fieldArr
- The fields to search instartDate
- The date to start the search.nrDays
- The number of days to include after the start date. If
negative the days before the start date are used.channels
- The channels to search in.sortByStartTime
- Should the results be sorted by the start time?
If not, the results will be grouped by date and channel and the
search will be faster.TvBrowserException
- Error while searchingProgramSearcher createProgramSearcher(int type, String searchTerm, boolean caseSensitive) throws TvBrowserException
type
- The searcher type to create. Must be one of
SEARCHER_TYPE_EXACTLY
, SEARCHER_TYPE_KEYWORD
,
SEARCHER_TYPE_REGULAR_EXPRESSION
or
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.PluginAccess[] getActivatedPlugins()
String getJavaPluginId(Plugin javaPlugin)
javaPlugin
- The Java plugin to get the ID for.PluginAccess getActivatedPluginForId(String pluginId)
pluginId
- The ID of the wanted plugin.null
if no such plugin
exists or if the plugin is not activated.Plugin[] getInstalledPlugins()
getActivatedPlugins()
instead.
This method always returns an empty array! Use
getActivatedPlugins()
instead!
TvDataService getDataService(String dataServiceClassName)
dataServiceClassName
- the class name of the wanted TvDataService.null
if there is no such
TvDataService.TvDataServiceProxy getDataServiceProxy(String id)
JPopupMenu createPluginContextMenu(Program program, ContextMenuIf caller)
program
- The program to create the context menu forcaller
- The calling plugin.ProgramFilter[] getAvailableFilters()
FilterManager.getAvailableFilters()
instead.Program getExampleProgram()
void handleProgramSingleClick(Program program)
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.
program
- The program to pass to the single left click context menu function.void handleProgramSingleClick(Program program, ContextMenuIf caller)
Executes the default context menu plugin.
program
- The program to pass to the default context menu function.caller
- The ContextMenuIf that calls this. Prevents the ContextMenuIf
to be activated twicevoid handleProgramDoubleClick(Program program)
Executes the default context menu plugin. Plugins should use handleProgramDoubleClick(Program program, Plugin caller). It prevents the Plugin to be activated a second time.
program
- The program to pass to the default context menu plugin.void handleProgramDoubleClick(Program program, ContextMenuIf caller)
Executes the default context menu plugin.
program
- The program to pass to the default context menu plugin.caller
- The ContextMenuIf that calls this. Prevents the ContextMenuIf
to be activated twicevoid handleProgramMiddleClick(Program program)
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.
program
- The program to pass to the middle click context menu plugin.void handleProgramMiddleClick(Program program, ContextMenuIf caller)
Executes the middle click context menu plugin.
program
- The program to pass to the middle click context menu plugin.caller
- The ContextMenuIf that calls this. Prevents the ContextMenuIf
to be activated twice.TvBrowserSettings getTvBrowserSettings()
ImageIcon getIconFromTheme(Plugin plugin, String category, String icon, int size)
plugin
- Plugin that wants to load an Iconcategory
- Category of the Icon (Action, etc...)icon
- Icon-Name without File-Extensionsize
- Size of the IconImageIcon getIconFromTheme(Plugin plugin, ThemeIcon icon)
plugin
- Plugin that wants to load an Iconicon
- Icon in the Icon-Themevoid showSettings(Plugin plugin)
plugin
- Use this Pluginvoid showSettings(String settingsItem)
settingsItem
- SettingsItem to show (e.g. SettingsItem.CHANNELS)Program[] getMarkedPrograms()
ProgramReceiveIf[] getReceiveIfs()
ProgramReceiveIf[] getReceiveIfs(ProgramReceiveIf caller, ProgramReceiveTarget callerTarget)
caller
- The caller ProgramReceiveIf.callerTarget
- The target that calls the receive if array.ProgramReceiveIf getReceiceIfForId(String id)
null
if there is
no ReceiveIf for the given id.id
- The id of the ReceiveIf.null
void scrollToProgram(Program program)
program
- The program to scroll to.void scrollToTime(int time)
time
- The time to scroll to in minutes.void scrollToChannel(Channel channel)
channel
- The channel to scroll to.void goToDate(Date date)
date
- The date to show the program for.FilterManager getFilterManager()
Don't use this method until TV-Browser is fully loaded.
null
if TV-Browser isn't fully loaded.AbstractPluginProgramFormating[] getAvailableGlobalPuginProgramFormatings()
Date getCurrentDate()
ProgramRatingIf[] getAllProgramRatingIfs()
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)