To set up Bridge2Java:

        1) You must have Java 1.2.2 or higher installed to use Bridge2Java.  
           
        2) Unzip Bridge2Java.zip onto the root directory of any disk 
	   using WinZip.  

The Bridge2Java directory you created in step 2 has the following subdirectories:

com - This is the Java support code for Bridge2Java

ProxyGen - This directory contains Bridge2Java.EXE, the proxy generating program

runtime - This is the C++ support code for Bridge2Java

Phidgets - We have generated stubs against a particular library version already.  
This is what ProxyGen generates.  The only reason to go through the ProxyGen runaround is
if you are getting errors; for example, using a new library with old stubs.

Java Proxies are generated by the proxy generator, Bridge2Java.exe.  Simply run
Bridge2Java.exe and follow the directions in the help.

There are several helper batch files to help generate and compile the samples.  They are:

proxy.bat - This deletes all the phidget library stubs; calls proxygen to build
new stubs, compiles the stubs with javac, compiles Test.java example, and then runs 
the Test example.  proxy.bat assumes that the PHIDGET.dll is in c:\program files\phidgets\

 
Usage Notes:

The java files created for use with the Bridge2Java tool are based on the typelibs 
provided with various COM enabled applications.  How the java files look and
are used is heavily dependent on how the typelibs are written.  Below are some
examples and tips which will help the user work with the generated java files.

--------------------------------------------------------------------------------------

There currently are no user guides or programming references to use with the Bridge2Java 
tools.  However, there are several testcases which will illustrate how to write java code 
using the generated java files.  The testcases are grouped as follows:

--------------------------------------------------------------------------------------

All properties in the generated java files are preceeded with either get_ or set_ 
depending on the operation.  For example, the Visible property for Microsoft Excel looks 
like this in java:
        
        boolean isVisible = app.get_Visible();  // This gets the property        
        app.set_Visible(true);                  // This sets the property
        
Methods are not preceded by get_ or set_.

--------------------------------------------------------------------------------------


If a method or property call returns an Object, then the user must explicitly
create a new object of the correct type.  For example, in the Application.java file 
for Lotus 123, the NewDocument method returns an Object, therefore, the user must
use the NewDocument() method as follows:

        doc = new Document(app.NewDocument());

On the other hand, if the method or property returns an explicit object, then
the user only has to set a variable of the correct type equal to the returned
value.  The Application.java file for Microsoft Excel shows that the 
get_WorkBooks() property returns a WorkBooks object, therefore a user would
use that property like this:

        WorkBooks wbs = app.get_Workbooks();
        
The user will have to check the generated java files to see how they were written
to help resolve casting problems.  Simply casting an Object to a variable of the 
proper type will not work with Bridge2Java.

--------------------------------------------------------------------------------------

If the java file shows that a method returns an explicit type, then the returned value
can be used in a compound statement.  For example, with Microsoft Excel the following
lines

        Range rangeA1 = sheet.get_Range("A1");
        rangeA1.set.Value("This is a test");
        
can be written as:

        sheet.get_Range("A1").set_Value("This is a new test");
        
Compound statements will not work with methods or properties which return Objects.
        
--------------------------------------------------------------------------------------

If a method or property takes an Object as a parameter, then the user must create a new
object of the proper type to pass into the call.  For example, in Lotus 123 the 
DocWindows class has method called Item(Object index).  Since it takes an object as a
parameter, the user would have to use this method like this to pass in an integer:

        docwins.Item(new Integer(0));
        
If the method or property takes an explicit object or primitive variable as a parameter, then
the user simply has to pass the parameter in.  In Microsoft Excel, the AutoFill method is 
written like this: AutoFill(Range Destination,int Type).  To use it, the user would write 
the following in Java:

        rangeA1 = sheet.get_Range("A1");
        AutoFill(rangeA1, 3); 
        
--------------------------------------------------------------------------------------

Operations which force rapid changes in the application being controlled can sometimes
get "lost" if the application cannot keep up.  To fix this problem, the user can add

        Thread.sleep(500);
        
calls to the java code to force the controlling program to halt while the application
catches up.  Also, making the application visible seems to be the biggest cause of this
problem, if the application doesn't need to becomes visible, not forcing it to can allow
the application to run much faster.

--------------------------------------------------------------------------------------

If a typelib doesn't provide event information then corresponding Java files cannot
be created by the proxy generating tool.  The files generated for Lotus 123 do not
contain any event classes because those classes aren't in the Lotus 123 typelib.
