public interface IPlugin extends Serializable
Each class implementing this interface must be accompanied with an XML-file
named iqm-plugin.xml containing an XML representation of a
Properties instance. This file is read at the init() call
and split into atomic strings.
| 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.
|
IPlugin |
init()
Initialize this plugin.
|
IPlugin init() throws Exception
IPluginRegistry.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.
ExceptionString getUID()
String getName()
String getActionCommand()
The UID will furthermore be used for adding ActionListener
interfaces to the plugin.
String getVersion()
String getType()
Properties getProperties()
iqm-plugin.xml file as Properties.ImageIcon getEnabledMenuIcon()
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.
ImageIcon getDisabledMenuIcon()
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.
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.