public class JustMark extends Plugin implements ActionListener
Modifier and Type | Field and Description |
---|---|
static Localizer |
mLocalizer
The localizer for this class.
|
Constructor and Description |
---|
JustMark()
Standard contructor for this class.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
boolean |
canReceivePrograms()
Gets whether the plugin supports receiving programs from other plugins.
|
boolean |
canUseProgramTree() |
ActionMenu |
getContextMenuActions(Program p)
Gets the actions for the context menu of a program.
|
PluginInfo |
getInfo()
Gets the meta information about the plugin.
|
static JustMark |
getInstance() |
protected String |
getMarkIconName()
Gets the name of the file, containing your mark icon (in the jar-File).
|
void |
handleAction(PluginTreeNode node,
ActionEvent e)
Remove all programs of the list
|
void |
readData(ObjectInputStream in)
Called by the host-application during start-up.
|
void |
receivePrograms(Program[] p)
Receives a list of programs from another plugin.
|
void |
updateTree()
Updates the plugin tree.
|
void |
writeData(ObjectOutputStream out)
Counterpart to loadData.
|
createImageIcon, createImageIcon, createImageIcon, execute, execute, execute, getButtonAction, getButtonIconName, getButtonText, getContextMenuItemText, getId, getJarFile, getMarkIcon, getMarkIconFromTheme, getParentFrame, getPluginManager, getProgramFromContextMenuActionEvent, getProgramTableIcons, getProgramTableIconText, getRootNode, getSettingsTab, getVersion, handleTvBrowserStartFinished, handleTvDataAdded, handleTvDataChanged, handleTvDataChanged, handleTvDataDeleted, handleTvDataUpdateFinished, loadSettings, onActivation, onDeactivation, setJarFile, setParent, setPluginManager, storeRootNode, storeSettings, supportMultipleProgramExecution, toString
public static Localizer mLocalizer
public static JustMark getInstance()
public PluginInfo getInfo()
Plugin
Override this method to provide information about your plugin.
protected String getMarkIconName()
Plugin
This 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 Plugin
Plugin.getMarkIcon()
,
Program.mark(Plugin)
,
Program.unmark(Plugin)
public ActionMenu getContextMenuActions(Program p)
Plugin
Override this method to provide context menu items for programs (e.g. in the program table).
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 canReceivePrograms()
Plugin
Override this method and return true
, if your plugin is able
to receive programs from other plugins.
canReceivePrograms
in class Plugin
Plugin.receivePrograms(Program[])
public void receivePrograms(Program[] p)
Plugin
Override this method to receive programs from other plugins.
receivePrograms
in class Plugin
p
- The programs passed from the other plugin.Plugin.canReceivePrograms()
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()
canUseProgramTree
in class Plugin
public void handleAction(PluginTreeNode node, ActionEvent e)
node
- The parent node that contains the programse
- The ActionEvent.public void updateTree()
TV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)