public class SimpleMarkerPlugin extends Plugin implements ActionListener
Modifier and Type | Field and Description |
---|---|
protected static Localizer |
mLocalizer
The localizer for this class.
|
BIG_ICON, DISABLED_ON_TASK_MENU, parent, SINGLE_CLICK_WAITING_TIME
Constructor and Description |
---|
SimpleMarkerPlugin()
Standard contructor for this class.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
protected void |
addList(MarkList list) |
protected void |
addList(String name) |
boolean |
canReceiveProgramsWithTarget()
Gets whether the ProgramReceiveIf supports receiving programs from other plugins with a special target.
|
boolean |
canUseProgramTree()
Signal whether this plugin participates in the plugin tree view or not.
|
protected ImageIcon |
createIconForTree(int i) |
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 p)
Gets the actions for the context menu of a program.
|
protected Icon |
getIconForFileName(String fileName) |
PluginInfo |
getInfo()
Gets the meta information about the plugin.
|
static SimpleMarkerPlugin |
getInstance() |
Icon[] |
getMarkIconsForProgram(Program p)
This gets the mark icons for a Program.
|
protected MarkList |
getMarkListForId(String id) |
protected MarkList |
getMarkListForName(String name) |
protected String[] |
getMarkListNames() |
protected MarkList[] |
getMarkLists() |
int |
getMarkPriorityForProgram(Program p)
Gets the mark priority for the given program that this Plugin uses.
|
ProgramReceiveTarget[] |
getProgramReceiveTargets()
Returns an array of receive target or
null if there is no target |
PluginTreeNode |
getRootNode()
Gets the root node of the plugin for the plugin tree.
|
protected Properties |
getSettings() |
SettingsTab |
getSettingsTab()
Gets the SettingsTab object, which is added to the settings-window.
|
protected Frame |
getSuperFrame() |
static Version |
getVersion() |
void |
handleAction(PluginTreeNode node,
ActionEvent e)
Remove all programs of the list
|
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.
|
void |
loadSettings(Properties prop)
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.
|
boolean |
receivePrograms(Program[] programs,
ProgramReceiveTarget target)
Receives a list of programs from another plugin with a target.
|
protected void |
refreshManagePanel(boolean scroll) |
protected void |
removeList(MarkList list) |
protected void |
removeListForName(String name) |
protected void |
resetManagePanel() |
protected void |
revalidate(Program[] programs) |
protected void |
save() |
Properties |
storeSettings()
Called by the host-application during shut-down.
|
void |
updateTree()
Updates the plugin tree.
|
void |
writeData(ObjectOutputStream out)
Counterpart to loadData.
|
canReceivePrograms, createImageIcon, createImageIcon, createImageIcon, createImageIconForFileName, execute, execute, execute, getAvailableFilter, getButtonIconName, getButtonText, getContextMenuItemText, getId, getJarFile, getMarkIcon, getMarkIconFromTheme, getMarkIconName, getMarkIcons, getParentFrame, getPluginManager, getProgramFromContextMenuActionEvent, getProgramTableIcons, getProgramTableIconText, getRatingInterfaces, handleTvDataAdded, handleTvDataAdded, handleTvDataChanged, handleTvDataChanged, handleTvDataDeleted, handleTvDataTouched, isAllowedToDeleteProgramFilter, layoutWindow, layoutWindow, onDeactivation, receivePrograms, receiveValues, saveMe, setJarFile, setParent, setPluginManager, storeRootNode, supportMultipleProgramExecution, toString
protected static final Localizer mLocalizer
public SimpleMarkerPlugin()
public void onActivation()
Plugin
onActivation
in class Plugin
public static Version getVersion()
public static SimpleMarkerPlugin getInstance()
public PluginInfo getInfo()
Plugin
Override this method to provide information about your plugin.
public void loadSettings(Properties prop)
Plugin
Override this method to load your plugins settings from the file system.
loadSettings
in class Plugin
prop
- The settings for this plugin (May be empty).public Properties storeSettings()
Plugin
Override 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 Plugin
null
if this plugin
does not need to save any settings.public Icon[] getMarkIconsForProgram(Program p)
Plugin
getMarkIconsForProgram
in class Plugin
p
- The Program to get the icons for.public SettingsTab getSettingsTab()
Plugin
Override this method to provide a settings tab. The settings tab will be shown in the settings dialog in the plugin section.
getSettingsTab
in class Plugin
null
if the plugin does not
provide this feature.public ActionMenu getContextMenuActions(Program p)
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 ContextMenuIf
getContextMenuActions
in class Plugin
p
- The program the context menu will be shown for.Plugin.getProgramFromContextMenuActionEvent(ActionEvent)
public boolean canReceiveProgramsWithTarget()
Plugin
canReceiveProgramsWithTarget
in interface ProgramReceiveIf
canReceiveProgramsWithTarget
in class Plugin
Plugin.receivePrograms(Program[],ProgramReceiveTarget)
public ProgramReceiveTarget[] getProgramReceiveTargets()
Plugin
null
if there is no targetgetProgramReceiveTargets
in interface ProgramReceiveIf
getProgramReceiveTargets
in class Plugin
Plugin.canReceiveProgramsWithTarget()
,
Plugin.receivePrograms(Program[],ProgramReceiveTarget)
public boolean receivePrograms(Program[] programs, ProgramReceiveTarget target)
Plugin
receivePrograms
in interface ProgramReceiveIf
receivePrograms
in class Plugin
programs
- The programs passed from the other plugin.target
- The receive target of the programs.Plugin.canReceiveProgramsWithTarget()
public int getMarkPriorityForProgram(Program p)
Plugin
The mark priority can be Program.NO_MARK_PRIORITY
, Program.MIN_MARK_PRIORITY
, Program.LOWER_MEDIUM_MARK_PRIORITY
,
Program.MEDIUM_MARK_PRIORITY
, Program.HIGHER_MEDIUM_MARK_PRIORITY
or
Program.MAX_MARK_PRIORITY
.
getMarkPriorityForProgram
in interface Marker
getMarkPriorityForProgram
in class Plugin
p
- The program to get the mark prioriy for.public void handleTvDataUpdateFinished()
Plugin
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.
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 handleTvBrowserStartFinished()
Plugin
handleTvBrowserStartFinished
in class Plugin
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void readData(ObjectInputStream in) throws IOException, ClassNotFoundException
Plugin
Override this method to load any objects from the file system.
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.Plugin.writeData(ObjectOutputStream)
public void writeData(ObjectOutputStream out) throws IOException
Plugin
Override this method to store any objects to the file system. ATTENTION: Don't use any logger, thread or access to Frames in this method.
writeData
in class Plugin
out
- The stream to write the objects toIOException
- If writing failed.Plugin.readData(ObjectInputStream)
public boolean canUseProgramTree()
Plugin
canUseProgramTree
in class Plugin
Plugin.getRootNode()
public void handleAction(PluginTreeNode node, ActionEvent e)
node
- The parent node that contains the programse
- The ActionEvent.public void updateTree()
protected ImageIcon createIconForTree(int i)
protected void revalidate(Program[] programs)
protected MarkList[] getMarkLists()
protected String[] getMarkListNames()
protected void removeListForName(String name)
protected void removeList(MarkList list)
protected void addList(String name)
protected void addList(MarkList list)
public PluginTreeNode getRootNode()
Plugin
getRootNode
in class Plugin
Plugin.canUseProgramTree()
protected Frame getSuperFrame()
protected void refreshManagePanel(boolean scroll)
protected void resetManagePanel()
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 Plugin
null
if no plugins filter components are supported.protected Properties getSettings()
protected void save()
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)