net.sourceforge.mflow.api
Interface Plugin


public interface Plugin

Author:
carrd

Method Summary
 void dispose()
          Dispose of the plugin.
 java.lang.String getClassName()
          Get the class name for this plugin.
 javax.swing.JDialog getConfigurationDialog()
          Gets an instance of the configuration dialog for the plugin, if any.
 java.lang.String getDescription()
          Get the description of this plugin.
 javax.swing.Icon getIcon()
          Get the icon for this plugin.
 java.lang.String getName()
          Get the name of this plugin.
 java.lang.Object getPluginObject()
          Get a reference to the instance of the plugin entry-point class.
 java.lang.String getType()
          Get the type of this plugin.
 java.lang.String getVersion()
          Get the version number for this plugin.
 boolean isLoaded()
           
 void load()
          Load the plugin.
 

Method Detail

getVersion

java.lang.String getVersion()
Get the version number for this plugin.

Returns:
The version number.

getClassName

java.lang.String getClassName()
Get the class name for this plugin.

Returns:
The class name.

getName

java.lang.String getName()
Get the name of this plugin.

Returns:
The name.

getType

java.lang.String getType()
Get the type of this plugin.

Returns:
The type.

getDescription

java.lang.String getDescription()
Get the description of this plugin.

Returns:
The description, or null if no description is available.

getIcon

javax.swing.Icon getIcon()
Get the icon for this plugin.

Returns:
The icon, or null if no icon is available.

isLoaded

boolean isLoaded()
Returns:
true if the plugin is currently loaded.

load

void load()
          throws java.lang.reflect.InvocationTargetException
Load the plugin. This method attempts to load the plugin entry-point class and create an instance of it. The entry-point class must have a public constructor that accepts a Plugin object as an argument; it will be invoked with a reference to this plugin.

Throws:
java.lang.reflect.InvocationTargetException - If the plugin could not be loaded.

dispose

void dispose()
Dispose of the plugin. This method calls the dispose() method on the plugin entry-point class, if there is one, and then destroys its reference to the class. The class can be re-loaded via another call to load().


getPluginObject

java.lang.Object getPluginObject()
Get a reference to the instance of the plugin entry-point class.

Returns:
The instance, or null if the class has not yet been loaded.

getConfigurationDialog

javax.swing.JDialog getConfigurationDialog()
Gets an instance of the configuration dialog for the plugin, if any.

Returns:
The instance, or null if the plugin has not yet been loaded or has no configuration dialog.


Copyright © 2002-2004 MFlow Group. All Rights Reserved.