public abstract class AbstractPlugin extends Object implements IPlugin
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
props
The properties from the XML file.
|
private static long |
serialVersionUID
The UID for serialization.
|
| Constructor and Description |
|---|
AbstractPlugin() |
| Modifier and Type | Method and Description |
|---|---|
String |
getActionCommand()
This is a wrapper method and returns the UID of the plugin.
|
ImageIcon |
getDisabledMenuIcon()
Gets the menu icon for the disabled menu item of this plugin.
|
ImageIcon |
getEnabledMenuIcon()
Gets the menu icon for the enabled menu item of this plugin.
|
String |
getName()
The name of the plugin, which will be used for menu entry creation.
|
Properties |
getProperties()
Get the whole
iqm-plugin.xml file as Properties. |
String |
getType()
Get the type of the plugin.
|
String |
getUID()
The unique identifier of the plugin.
|
String |
getVersion()
Get the version of the plugin.
|
abstract IPlugin |
init()
Initialize this plugin.
|
private static final long serialVersionUID
protected Properties props
public abstract IPlugin init()
IPluginIPluginRegistry.register(IPlugin, String) using a self-reference as
parameter.
If the plugin furthermore contains an IOperator, the second call
will the registration of the operator descriptor.
init in interface IPluginIPlugin.init()public String getUID()
IPluginpublic String getName()
IPluginpublic String getActionCommand()
IPlugin
The UID will furthermore be used for adding ActionListener
interfaces to the plugin.
getActionCommand in interface IPluginpublic String getVersion()
IPlugingetVersion in interface IPluginpublic String getType()
IPluginpublic Properties getProperties()
IPluginiqm-plugin.xml file as Properties.getProperties in interface IPluginpublic ImageIcon getEnabledMenuIcon()
IPlugin
The class loader searches for a file named
menu-item-enabled.png in the resource sub package
icons of the IPlugin instance. For instance, if
the implementing class of IPlugin is located in the package
my.plugins, the loader looks up
resources/my/plugins/icons/menu-item-enabled.png and
constructs a new ImageIcon.
If menu-item-enabled.png is not contained in this package,
the default icon from the public API is used.
One may specify a custom file name to be searched for in the mentioned resource directory. If these files are not found, the default icon is loaded.
getEnabledMenuIcon in interface IPluginpublic ImageIcon getDisabledMenuIcon()
IPlugin
The class loader searches for a file named
menu-item-disabled.png in the resource sub package
icons of the IPlugin instance. For instance, if
the implementing class of IPlugin is located in the package
my.plugins, the loader looks up
resources/my/plugins/icons/menu-item-disabled.png and
constructs a new ImageIcon.
If menu-item-disabled.png is not contained in this package,
the default icon from the public API is used.
One may specify a custom file name to be searched for in the mentioned resource directory. If these files are not found, the default icon is loaded.
getDisabledMenuIcon in interface IPluginCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.