About this task
Use
the Java™ Class Importer to create
a type tree in order to manipulate Java objects
from within a map using the Java Class Adapter.
To run the Java Class
Importer:
- Open the Type Designer.
- Select Import a type tree in
the Startup window and click Next.
Or select Import from the Tree menu
at anytime while the Type Designer is
running.
The Importer Wizard dialog
appears.
- Select Java Class and
click Next.
The Java Class Importer Wizard appears.
Follow the steps to automatically generate a type tree for a java
class.
- Type a fully qualified class name of the
class (in this example, java.awt.Scrollbar) that you want to
import and click Next.
Optionally, select the Include inherited members
from the super classes check box if you want to include inherited
members.
- Select a constructor from the dialog. Click Next.
Note: It is possible to proceed to the next step without
selecting a constructor. In that case, only static methods can be
involved, or you may use the class instance obtained in the preceding
cards to invoke the non-static methods through the this item
in the type tree.
- Optionally, select the Check here if
you wish to return the public fields of the object check box,
if you want the adapter to return the public fields of the object.
Click Next.
- Select the methods that you want to be executed
by the adapter. Click Next.
You
must reorder the methods into the order that you want them to be executed.
To execute a method more than once, right-click on it, select Copy,
position your cursor where you want to place the method, right-click
again and select Paste.
- Select the methods for which you want return
values to be returned by the adapter (in a GET call). Click Next.
- Enter the name of (or browse for) the type
tree that you want to create. Click Next.
The type tree is created and displayed in
the Importer Wizard.
- Click Finish. The
following window appears.
- Click Yes if you
want to open the generated type tree(s). Click No to
close the Importer Wizard and return to the Type Designer application.