| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecticy.plugin.abstract_.Plugin
icy.plugin.abstract_.PluginActionable
plugins.adufour.ezplug.EzPlug
public abstract class EzPlug
Main component of the EzPlug framework. EzPlug provides numerous additional features to the
 Plugin class to simplify the development of plug-ins for ICY. In a nut shell, it allows
 to: a) design intuitive and homogeneous graphical interfaces; b) save/load parameters to/from
 disk in a standardized way (e.g. XML).
 
 To create an EzPlug and benefit from these features, simply create a class that extends EzPlug
 instead of Plugin. EzPlug is abstract and requires to implement the following methods:
 
initialize() method should be used to declare the parameters, buttons, groups
 etc.. This is done via the addEzComponent method. EzPlug
 here uses the Vars library to provide create tailored graphical components for all major data
 types (e.g. check box for a boolean, spinner for a numerical parameter, combo box for list of
 values etc.). See the EzVar class hierarchy for an overview.execute() method holds the main execution code of the plug-in, and is called
 when the "Run" button is clicked on the interface.
 clean() method should be used to clean "sensitive" resources (if any) created by
 the plug-in (e.g. sequence painters, I/O streams, etc.), in order to free memory properly and/or
 avoid polluting the display. This method is called when the interface (or Icy) is closed.
 stop the execution process, load and save
 parameters from/to disk via XML files.
EzInternalFrame| Field Summary | |
|---|---|
| static java.lang.String | EZPLUG_MAINTAINERS | 
| Constructor Summary | |
|---|---|
| protected  | EzPlug() | 
| Method Summary | |
|---|---|
| protected  void | addComponent(java.awt.Component component) | 
| protected  void | addEzComponent(EzComponent component)Adds a graphical component to the interface. | 
| abstract  void | clean()Cleans user-defined structures when the plug-in window is closed. | 
|  void | compute()Entry point of this EzPlug, which creates the user interface and displays it on the main desktop pane. | 
|  void | createUI()Generates the user interface of this EzPlug. | 
| protected abstract  void | execute()Main method containing the core execution code of this EzPlug. | 
| static java.lang.String | generateEzPlugCodeFragment(java.lang.String className)Generates an EzPlug code fragment that is ready to use and compile | 
|  java.lang.String | getName()Gets the name of this EzPlug (defaults to the class name). | 
| static int | getNbInstances() | 
|  long | getStartTime()Gets the starting execution time of this EzPlug (in nanoseconds). | 
|  EzGUI | getUI()Gets the graphical interface attached to this EzPlug. | 
|  void | hideUI()Hides the user interface (without destroying it) | 
| protected abstract  void | initialize()This method lets the developer initialize the user interface of this EzPlug by adding variables and other EzComponent objects via the addEzComponent(EzComponent)method | 
|  boolean | isHeadLess() | 
|  void | loadParameters(java.io.File file)Saves the EzPlug user parameters into the specified XML file | 
|  void | run() | 
|  void | saveParameters(java.io.File file)Saves the EzPlug user parameters into the specified XML file | 
|  void | setTimeDisplay(boolean displayRunningTime)Sets whether the execution time of this EzPlug should be displayed on the console | 
|  void | showUI()Displays the user interface on screen. | 
| Methods inherited from class icy.plugin.abstract_.Plugin | 
|---|
| addIcyFrame, addSequence, extractResource, finalize, getActiveImage, getActiveSequence, getActiveViewer, getDescriptor, getFocusedImage, getFocusedSequence, getFocusedViewer, getIconResource, getImageResource, getPlugin, getPreferences, getPreferencesRoot, getResource, getResourceAsStream, getResourceLibraryPath, getResources, getSequences, loadLibrary, removeSequence, report | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String EZPLUG_MAINTAINERS
| Constructor Detail | 
|---|
protected EzPlug()
| Method Detail | 
|---|
protected void addComponent(java.awt.Component component)
protected void addEzComponent(EzComponent component)
component - the component to addEzVar, 
EzButton, 
EzGrouppublic abstract void clean()
public final void compute()
compute in interface icy.plugin.interface_.PluginImageAnalysiscompute in class icy.plugin.abstract_.PluginActionablepublic void createUI()
showUI() method.
protected abstract void execute()
public static java.lang.String generateEzPlugCodeFragment(java.lang.String className)
className - the name of the new classpublic java.lang.String getName()
public static int getNbInstances()
public long getStartTime()
System.nanoTime() method to measure elapsed time during the
 execution process
System.nanoTime() method)public EzGUI getUI()
public void hideUI()
public boolean isHeadLess()
getUI() will return nullprotected abstract void initialize()
addEzComponent(EzComponent) method
EzVar, 
EzComponentpublic void loadParameters(java.io.File file)
file - EzVarIOpublic void run()
run in interface java.lang.Runnablepublic void saveParameters(java.io.File file)
file - EzVarIOpublic void showUI()
public void setTimeDisplay(boolean displayRunningTime)
displayRunningTime - | 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||