marg
Class ModulePluginTemplate

java.lang.Object
  extended by marg.ModulePluginTemplate
All Implemented Interfaces:
ModulePlugin

public class ModulePluginTemplate
extends java.lang.Object
implements ModulePlugin

Insert description of this plugin


Constructor Summary
ModulePluginTemplate()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModulePluginTemplate

public ModulePluginTemplate()
Method Detail

setXMLClientHandler

public void setXMLClientHandler(XMLClientHandler handler)
Description copied from interface: ModulePlugin
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();

Specified by:
setXMLClientHandler in interface ModulePlugin
Parameters:
handler - the XMLClientHandler object sent from the Module

getPluginName

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

Specified by:
getPluginName in interface ModulePlugin
Returns:
a String representing the name of your plugin

getJPanel

public 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.

Specified by:
getJPanel in interface ModulePlugin
Returns:
a JPanel object created by your plugin

startPlugin

public 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

Specified by:
startPlugin in interface ModulePlugin

stopPlugin

public 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.

Specified by:
stopPlugin in interface ModulePlugin

doUpdate

public 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.

Specified by:
doUpdate in interface ModulePlugin