Importing Java Beans and Other Objects
There are five original sets of objects: Data, Standard, Extended, Non Visual and Java. JDesignerPro allows you to import any form of JavaBean or even non-bean compliant components and add them to the Object Tree. To import files you may choose Import Package from the pop-up menu on the computer icon or from the pop-up menu of any object group. To bring up the pop-up menu of a group, click on its icon:
Five options appear, Import Class, Import Package, Edit Group, Add New Group and remove Group. A Class is a single Java class file, ".class". A Package is a set of class files.
Import Class, Import Jar File, Import Package
When you choose to Import Class or Import Package, a file picker will appear targeted at class files. It will show only the root drive where JDesignerPro is installed. Select the class file(s) you wish to import and press Accept. These will be added to the selected folder.
The two types of components that can be imported are JavaBeans and ".class" files. Proper JavaBeans, those that are coded to the specification correctly, should import every time with no errors. However, regular class files are subject to failure because there is no standard method for their creation. Each API may be different.
Classes to be imported must be located in the JDesignerPro root directory. For packages, locate the main folder of the package in the JDesignerPro directory.
JavaBeans vendors packages have a certain hierarchy that will vary from product to product. Read the documentation from the vendor to determine the correct path for a package before importing it.
A good example of a Beans package to import is from Protoview Inc., one of BulletProofs Component Partners, at http://www.protoview.com. Download their free trial package of Beans objects, WinJ, and place the PVWINJ directory in the JDesignerPro folder. The PVWINJ directory will not work because it is not the root where the components are actually located. Once the folder is there, bring up the pop up menu in the Objects Tree and choose Import Package.
Select one of the components in the package in the Import dialogue. Then press Accept. JDesignerPro will recognize the group and bring them all in, assuming they are valid objects or JavaBeans. If it cannot instantiate an object you will see a message to that effect in the status bar.
JDesignerPro will attempt to import any class file you choose and to instantiate it. Such a component must have some constructors associated with it for JDesignerPro to handle it properly. Therefore we recommend using only high-quality JavaBean components.
When an imported object is added to an application screen, JDesignerPro will bring up the Instance Manager to create and instance of the object. This is true for class files and true JavaBeans components. See Instance Manager below.
Import Jar File
When you choose to Import Jar File, a file picker will appear targeted at jars files. It will show only the root drive where JDesignerPro is installed. You can point it at a Jar file anywhere on your system and JDP will export the classes in to the JDesignerPro dir. If you would like your apps to use the complete Jar file you should also place it in your JDesignerPro dir and include the file in the archive parameter of your html applet tags.
Edit Group
The Edit Group command allows you to change the name and icon of the folder on which you clicked. Change these and press Accept. Once you are done modifying groups and objects you must save the Objects Tree for your changes to be final. To save the Objects Tree settings, click the computer icon and choose Save. See Modifying the Objects Tree above for information about the Add New Group command.
Remove group
The Remove Group command will delete the selected folder and its contents from the tree and its .jot file. Be careful, this cannot be undone once you have saved it.