ScopeThis document contains information on writing plugins for VisualDCT and their installation. AudienceThe audience of this document are the users of VisualDCT who wish to create or use its plugins. Table of Contents1. Introduction2. Writing plugins2.1. Plugin interface2.2. Example2.3. Special plugins3. Plugin package3.1. Plugin information4. Plugin Manager4.1. Plugin table4.2. Plugin management4.2.1. Installing new plugins4.2.2. Starting and stopping plugins4.2.3. Autostart plugins4.2.4. Uninstalling plugins4.2.5. Handling multiple pluginsReferencesDocument HistoryHow to Read This DocumentThis document's meta-information (authors, revision history, table of contents, ...) can be found above. What follows below is the body of the document. The body is composed of several sections, which may be further composed of subsections. Typographical styles are used to denote entities of different kinds. For a full list of entities and their respective typographic conventions, please refer to the Styles section of the XML Documentation document. When viewing the document in a non-printed form, it is possible to submit comments regarding a given section to the document's owner. This is achieved by clicking the mail icon next to the section title. For this to work, your mail must be configured to properly handle the mailto URLs. 1. IntroductionThis document is divided into three sections. The first describes how to create a VisualDCT plugin. The second explains how to include the parameters of the plugin and the information that is required by VisualDCT. The last section is about Plugin Manager, which can be used to install and manipulate the plugins within VisualDCT. 2. Writing pluginsFor the resource to be used as a VisualDCT plugin, it must contain a class that implements the Plugin interface. Descriptions of specific methods are given below, followed by an example. 2.1. Plugin interfacePlugin interface contains the following methods:
2.2. ExampleThis is an example of a plugin. When it is initiated, it checks the version of VisualDCT using the parameter context, and manipulates with its parameters using properties.
2.3. Special pluginsThere are currently three special types of plugins in VisualDCT:
3. Plugin packageVisualDCT plugins are distributed as Java Archive (jar) files. The jar file must include the following two files:
3.1. Plugin informationThe .vdctplugins.xml file includes the name of the plugin class, its autostart switch and optionally the parameters. It may contain information on multiple plugins. This in an example of xml file for the class named SimplePlugin. It will be started automatically by default, and has one parameter, interval, set to 1000.
4. Plugin ManagerPlugin Manager is used for VisualDCT plugin management. It can be accessed by - .4.1. Plugin tablePlugin table contains a list of currently installed plugins. The information of a plugin is divided into several columns:
Figure 1: Plugin Manager 4.2. Plugin management4.2.1. Installing new pluginsA new plugin can be installed by clicking on a Install... button, and then selecting the plugin's jar file. The jar must contain a .vdctplugins.xml file with the required information about the new plugin.
4.2.2. Starting and stopping pluginsTo start or stop a specific plugin it must first be selected. To select a plugin in the table, move with the mouse cursor over it and press the left mouse button. When the plugin is selected, click on the Start button to start it, or the Stop button to stop it. 4.2.3. Autostart pluginsEach plugin has an autostart switch. When VisualDCT is started, all installed plugins are initiated. Then, all plugins that have autostart switch enabled are automatically started. To change the autostart switch of a plugin, move the mouse cursor over its checkbox in the Autostart column, and press the left mouse button. The checkbox indicates the current status. 4.2.4. Uninstalling pluginsTo uninstall a plugin, select it in the table and press the Uninstall button. This will permanently uninstall the plugin. If you wish to restore the previous state, you have to re-install the plugin with the install command. 4.2.5. Handling multiple pluginsTo perform an action on several plugins at once, these plugins must all be selected. To select a series of plugins, move the mouse cursor over the first one in the table, press and hold the left mouse button, drag the mouse to the last plugin, and release the button. To select specific plugins, hold down the Ctrl key, and click on them one after another. Document History
References
|
||||||||||||||||||||||||||||||||||||||||||