Create Java plugins by yourself

The hotswap-dialog provides a comfortable environment for writing Java based plugins. The concept of class-hotswap has been published in 16469097.

Warning: The Java classes in Strap may change in the future which might require that existing plugins need to be adapted. Therefore External Apps (File menu of Strap) should be used instead if possible!

The tree view shows the main Java interfaces of Strap as expandable nodes. The child nodes are classes that implement these Java interfaces.

Quick start: Follow this short guide: Activate the node "StrapExtension" in the tree. Subsequently, press the button StrapHotswap#BUT_LAB_New to create a new plugin of type "StrapExtension". You will be asked for a name of your new plugin. You can accept the suggested name. The of the new plugin is opened with a text editor. The source is a minimal example for "StrapExtension" which can be extended. To start press StrapHotswap#BUT_LAB_Apply. This demo plugin opens a message box with information on loaded proteins. Change the code in the text editor. For example chose a different message text. Save the source code. When the altered source code is saved to hard disk the is automatically started. Run the plugin again and observe, that the message text has changed. If the compilation fails, the or is shown in the log panel. Please insert a syntax error and try again.

JAR-files: All in the directories ~/.StrapAlign/plugins and ~/.StrapAlign/jars are included to the .

Types of plugins: Each plugin implements a certain which determins the purpose of the plugin. The above example uses StrapExtension. StrapExtension has a run() method which is run directly, whereas other plugins are used within a certain dialog.

StrapEvent: Classes implementing StrapListener are notified when the cursor moves, when proteins are added or deleted or when the multiple sequence alignment is altered. These Events can be monitored (Debug-menu).

Customization: IC_CUSTOM The preferred or lopment_environment used for Java source texts can be specified with the customize button at the top bar.

Accessing data of the multiple sequence alignment by plugins: For the communication with the STRAP-model three classes are usually sufficient:

Changing elements in an array: Some methods return arrays. Do not change array elements without subsequently calling the respective set-method. Also be aware, that some arrays are longer than the current information.