MAEPlugin.popup
Class PluginLoader

java.lang.Object
  |
  +--MAEPlugin.MAEPlugin
        |
        +--MAEPlugin.MenuPlugin
              |
              +--MAEPlugin.popup.PopupPlugin
                    |
                    +--MAEPlugin.popup.PluginLoader
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.io.FilenameFilter, PluginStub

public final class PluginLoader
extends PopupPlugin
implements java.io.FilenameFilter

This class contains the dynamic MAEplugin loader. It will load either .jar or .class files (the latter is useful for debugging since no jar packaging is required).

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/03/03 16:21:35 $ / $Revision: 1.4 $
Author:
Jai Evans (DECA/CIT), C. Santos (DECA/CIT), P. Lemkin (NCI-FCRDC)
See Also:
MAExplorer Home

Fields inherited from class MAEPlugin.MAEPlugin
DBUG_MAEP, jarResources, registryMaxSize
 
Fields inherited from interface MAEPlugin.PluginStub
PLUGIN_VERSION
 
Constructor Summary
PluginLoader(MAEStub stub)
          PluginLoader() - Creates new LoadPlugins.
PluginLoader(MAEStub stub, java.lang.String pluginJarPath)
          PluginLoader() - Creates new LoadPlugin but do it siliently.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          accept() - implentation of FilenameFilter.
 java.lang.String getPluginDescription()
          getPluginDescription() - This returns a human readable description of the Plugin
 boolean loadPluginSilently(java.lang.String path)
          loadPluginSilently() - silently tests and loads good MAPlugin from the path.
 void pluginMain()
          pluginMain() - Is the method end-users implement to use the API.
 void updateCurGene(int mid)
          updateCurGene() - update any data since current gene has changed.
 void updateFilter()
          updateFilter() - update any dependent data since Filter has changed.
 void updateLabels()
          updateLabels() - update any dependent data since global labels have changed.
 void updateSlider()
          updateSlider() - update any dependent data sincea threshold slider has changed.
 
Methods inherited from class MAEPlugin.MenuPlugin
actionPerformed
 
Methods inherited from class MAEPlugin.MAEPlugin
getFlag, getInstance, getMAEStub, getMenuHook, getMenuInsertionPointName, getMenuItem, getNumberPlugins, getPluginFileName, getPluginName, getPlugins, menuActivated, pluginHalt, pluginInit, removePlugin, setFlag, setJarResources, setMAEStub, setMenuHook, setMenuInsertionPointName, setMenuItem, setMenuLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginLoader

public PluginLoader(MAEStub stub)
             throws PluginException
PluginLoader() - Creates new LoadPlugins.
Parameters:
stub - is the plugin stub
Throws:
PluginException -  

PluginLoader

public PluginLoader(MAEStub stub,
                    java.lang.String pluginJarPath)
             throws PluginException
PluginLoader() - Creates new LoadPlugin but do it siliently.
Parameters:
stub - is the plugin stub
Throws:
PluginException -  
Method Detail

loadPluginSilently

public final boolean loadPluginSilently(java.lang.String path)
loadPluginSilently() - silently tests and loads good MAPlugin from the path.
Parameters:
path - to search for plugin
Returns:
true if successfuly loaded the plugin

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
accept() - implentation of FilenameFilter. Does not work and is never called in 1.1.2 and as as far as I can tell in 1.3 [see "Class Libraries" p. 603]
Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - is the diredtory to browse
name - is the file to test for extensions
Returns:
true if accept the file.

pluginMain

public void pluginMain()
pluginMain() - Is the method end-users implement to use the API.
Overrides:
pluginMain in class MenuPlugin

getPluginDescription

public java.lang.String getPluginDescription()
getPluginDescription() - This returns a human readable description of the Plugin
Overrides:
getPluginDescription in class MAEPlugin
Returns:
plugin description if any.

updateCurGene

public void updateCurGene(int mid)
updateCurGene() - update any data since current gene has changed. This is invoked from the PopupRegistry
Overrides:
updateCurGene in class PopupPlugin
Parameters:
ml - is the gene list to update now that filter has changed.

updateFilter

public void updateFilter()
updateFilter() - update any dependent data since Filter has changed. This is invoked from the PopupRegistry
Overrides:
updateFilter in class PopupPlugin

updateSlider

public void updateSlider()
updateSlider() - update any dependent data sincea threshold slider has changed. This is invoked from the PopupRegistry.
Overrides:
updateSlider in class PopupPlugin

updateLabels

public void updateLabels()
updateLabels() - update any dependent data since global labels have changed. This is invoked from the PopupRegistry.
Overrides:
updateLabels in class PopupPlugin