Common Fields

The following fields are common to any new module:

Field Description
displayName displayed when module is selected and shown in workspace
statusLineDescription description that appears on status line when mouse is over module
javaBaseClass the new module extends this class
javaClassName the class name used in generated code
javaClassDescription description comment placed above generated code
IOstreams see table below for handling of InputStreams and OutputStreams.

Table to Code Translations

The information above is passed to code generation applet. Initially this information is passed by generating the HTML for starting the applet, passing the information in param tags. Starting with NetScape 2.1 this technique can be replaced by the simpler technique of having the JavaScript directly access static public fields in the code generation applet.

New class declarations are generated as follows:

     class javaClassName extends javaBaseClass

and

     class v_javaClassName extends VisualNeatToolsModule

The above information is also used to generate code for creating instances of the new module and its visualization. The code file Creator.java is generated based on the entire list of modules, and is used by the NeatToolsApplication instance to create all modules and their visualization. The NeatToolsApplication methods createWebFlowModule and createVisualWebFlowModule, which override the WebFlowApplication methods, pass their calls on to corresponding static public methods in the Creator class.

The two Creator methods are simply switches which use the display name of the module to determine which specific NeatToolsModule and VisualNeatToolsModule to create. In the examples below, the displayName and javaClassName are both information provided by the user when using the JavaScript code generation form.

Code inserted into Creator.createWebFlowModule

   if ( moduleName.equals( "displayName" )) {
      return( new javaClassName() );
   }

Code inserted into Creator.createVisualWebFlowModule

   if ( moduleName.equals( "displayName" )) {
      return( new v_javaClassName() );
   }