marg.gui.plugin
Interface ModulePlugin

All Known Implementing Classes:
ModulePluginJPanelTemplate, ModulePluginTemplate, SMRPlugin

public interface ModulePlugin


Method Summary
 void doUpdate()
          Called by parent module regularly every second by default.
 javax.swing.JPanel getJPanel()
          Return the visual representation of your plugin here.
 java.lang.String getPluginName()
          Gets the name of your plugin.
 void setXMLClientHandler(XMLClientHandler handler)
          Offers the handler to your plugin.
 void startPlugin()
          Called by the parent module to start a plugin.
 void stopPlugin()
          Called by the parent module during cleanup process when the module or entire applet is closed.
 

Method Detail

setXMLClientHandler

void setXMLClientHandler(XMLClientHandler handler)
Offers the handler to your plugin. The handler is responsible for communicating with the parent module and is also where you should register for propertyChangeEvents and add new XMLParsePlugins. This method will by contract always be called before startPlugin();

Parameters:
handler - the XMLClientHandler object sent from the Module

getPluginName

java.lang.String getPluginName()
Gets the name of your plugin. Used as the header for the tab of your plugin.

Returns:
a String representing the name of your plugin

getJPanel

javax.swing.JPanel getJPanel()
Return the visual representation of your plugin here. Parent module calls this method to retrieve a JPanel and adds it to its tabbed pane.

Returns:
a JPanel object created by your plugin

startPlugin

void startPlugin()
Called by the parent module to start a plugin. Use this method to initialize ressources that are not needed until your plugin is actually started


stopPlugin

void stopPlugin()
Called by the parent module during cleanup process when the module or entire applet is closed. Clean-up of ressources should be placed here.


doUpdate

void doUpdate()
Called by parent module regularly every second by default. Saves you having to make a Thread if you need a simple regular update in your plugin.