Table of Contents
  FormBuilder: BASIS IDE's Better Cross-Platform Resource Builder
By Jon Bradley
PDF Format

Jon Bradley
Software Engineer
oday's ResBuilder®, shown in Figure 1, is a very robust resource building application. It is fast, stable, and intuitive, and developers use it to create resource files that work with either Visual PRO/5® or BBj®. However, for those developers who work in environments other than Microsoft Windows, it has one critical limitation: while the resultant resource files can be used in all supported platforms, the tool itself only runs on Windows.

Figure 1. Resbuilder

BBj 5.0 addresses this limitation with the release of FormBuilder, a new GUI design tool integrated into the BASIS IDE. FormBuilder includes all of the ResBuilder functionality with a few new tricks of its own. It is available on all BBj-supported platforms, including Windows, Linux, and Mac OS X.

FormBuilder is the latest of the BASIS tools integrated with the NetBeans IDE to create the BASIS IDE. Developers can now work with BBx® programs, both BBj and Visual PRO/5, and their associated GUI resources in a single, unified environment. To open BBx programs or GUI resource files, simply double-click on the appropriate filename with its icon from the filesystem window. The tabbed editor layout of NetBeans allows the developer to switch easily between GUI forms and BBx code, as shown in Figure 2.

Figure 2. FormBuilder displaying BBx code and GUI forms.

he NetBeans IDE provides many standard property editors. The developer can now configure properties with feature-rich and intuitive editors including a font chooser and a color chooser (see Figure 3).

Figure 3. Color chooser in all its splendor.

FormBuilder provides many new features beyond those that are available in ResBuilder. For example, FormBuilder provides much more sophisticated alignment of controls, as shown in Figure 4.

Figure 4. Alignment icons.

The directory structure in the deployed final product is often different from the directory structure on the developer's machine. An image bucket (Figure 5 A) enables the developer to specify alternate file locations for image files associated with GUI resource files. The image bucket provides a specific reference file for a given image target or configures a list of searchable directories to enable the developer to tell NetBeans where to find the images on the local computer, regardless of where the files are deployed in the final project.

Figure 5. A. The image bucket. B. WYSIWYG child windows. C. Property controls.

FormBuilder provides an intuitive WYSIWYG interface. Because FormBuilder uses the same Java code as the BBj language to render GUI controls, windows and controls look precisely the same during the design phase as they will at runtime (Figure 5 B). FormBuilder also renders child windows inside the form exactly where they will appear at runtime, a valuable improvement over ResBuilder.

In addition, the developer can edit properties for multiple controls all at once, even if they are of different types (Figure 5 C). See Figure 6 for a more detailed view of these controls.

Figure 6. Simultaneous editing of different controls.

Summary
With the integration of FormBuilder into the BASIS IDE, BBj 5.0 enables the developer to design BBx code and associated forms in a unified environment that works the same on all BBj-supported platforms.

Table of Contents