chemaxon.marvin.plugin
Class CalculatorPluginLoader

java.lang.Object
  extended bychemaxon.marvin.plugin.CalculatorPluginLoader

public abstract class CalculatorPluginLoader
extends java.lang.Object

Ancestor of Marvin plugin loaders.

Version:
3.3, 01/06/2004
Author:
Nora Mate

Constructor Summary
CalculatorPluginLoader()
           
 
Method Summary
 java.lang.String getChartLabel()
          Returns the chart checkbox label.
 java.lang.String getChartTitle()
          Returns the chart title.
abstract  java.awt.Component getParameterPanel()
          Returns the parameter panel.
abstract  java.util.Properties getParameters()
          Returns the plugin parameters.
 CalculatorPlugin getPlugin()
          Returns the calculator plugin.
protected  java.lang.String getPluginClassName()
          Returns the class name of the plugin.
protected  java.lang.Thread getThread()
          Returns the thread field.
 java.lang.String getTitle()
          Returns the title field.
 boolean hasChart()
          Returns true if plugin has chart.
protected  void join(java.lang.Thread next)
          Joins the runner thread and sets the next thread.
protected  void postInit(boolean isAwt)
           
protected  void preload()
          Loads the calculator plugin.
abstract  void reloadParameters()
          Reloads parameters to parameter panel.
 void setChartLabel(java.lang.String chartlabel)
          Sets the chart checkbox label field.
 void setChartTitle(java.lang.String charttitle)
          Sets the chart title field.
protected  void setThread(java.lang.Thread thread)
          Sets the thread field.
 void setTitle(java.lang.String title)
          Sets the title field.
abstract  void updateParameters()
          Updates parameters from parameter panel.
 boolean verifyParameters()
          Verifies parameters on the parameter panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculatorPluginLoader

public CalculatorPluginLoader()
Method Detail

setThread

protected final void setThread(java.lang.Thread thread)
Sets the thread field.

Parameters:
thread - is the Thread object

getThread

protected final java.lang.Thread getThread()
Returns the thread field.

Returns:
the thread field

join

protected final void join(java.lang.Thread next)
Joins the runner thread and sets the next thread.

Parameters:
next - is the next thread

postInit

protected void postInit(boolean isAwt)
                 throws PluginException
Throws:
PluginException

setTitle

public final void setTitle(java.lang.String title)
Sets the title field.

Parameters:
title - is the title string

getTitle

public final java.lang.String getTitle()
Returns the title field.

Returns:
the title for display

setChartLabel

public final void setChartLabel(java.lang.String chartlabel)
Sets the chart checkbox label field.

Parameters:
chartlabel - is the chart checkbox label

getChartLabel

public final java.lang.String getChartLabel()
Returns the chart checkbox label.

Returns:
the chart checkbox label

setChartTitle

public final void setChartTitle(java.lang.String charttitle)
Sets the chart title field.

Parameters:
charttitle - is the chart title

getChartTitle

public final java.lang.String getChartTitle()
Returns the chart title.

Returns:
the chart title

hasChart

public final boolean hasChart()
Returns true if plugin has chart.

Returns:
true if chart data

getParameterPanel

public abstract java.awt.Component getParameterPanel()
Returns the parameter panel.

Returns:
the parameter panel

getParameters

public abstract java.util.Properties getParameters()
Returns the plugin parameters.

Returns:
the plugin parameters

verifyParameters

public boolean verifyParameters()
Verifies parameters on the parameter panel.

Returns:
true if parameter setting is accepted, false otherwise

updateParameters

public abstract void updateParameters()
Updates parameters from parameter panel. (OK is pressed: GUI -> HashMap)


reloadParameters

public abstract void reloadParameters()
Reloads parameters to parameter panel. (CANCEL is pressed: HashMap -> GUI)


getPluginClassName

protected java.lang.String getPluginClassName()
Returns the class name of the plugin. The default implementation simply strips off the ending "Loader" string. Overwrite this method only if your plugin and loader classes do not follow this name convention (<loader class name> = <plugin class name>+"Loader").

Returns:
the class name of the plugin

getPlugin

public CalculatorPlugin getPlugin()
                           throws PluginException
Returns the calculator plugin.

Returns:
the calculator plugin
Throws:
PluginException - if the plugin cannot be loaded

preload

protected void preload()
                throws PluginException
Loads the calculator plugin. Not thread safe: called by the PluginManager to preload some plugins.

Throws:
PluginException - if the plugin cannot be loaded