Start changeGraphical Toolbox

Overview

The Graphical Toolbox contains tools to help you create custom user interface panels in Java.  You can incorporate the panels into your Java applications, applets, or Operations Navigator plugins.  The panels may contain data obtained from the AS/400, or data obtained from another source such as a file in the local file system or a program on the network.

The GUI Builder is a WYSIWYG visual editor for creating Java dialogs, property sheets and wizards.  With the GUI Builder you can add, arrange, or edit user interface controls on a panel, and then preview the panel to verify that the layout behaves the way you expected.  You can use the panel definition in a dialog, insert panels into property sheets and wizards, or arrange the panels in splitter panes, deck panes and tabbed panes.

The Resource Script Converter converts Windows user interface elements into a form usable by Java programs.  With the Resource Script Converter you can process Windows resource scripts (RC files) from your existing Windows applications and produce definitions of dialogs, property sheets and wizards that can be displayed in Java.

Underlying these two tools is a new technology called the Panel Definition Markup Language, or PDML.  PDML is based on the Extensible Markup Language (XML) and defines a platform-independent language for describing the layout of user interface elements.  Once your panels are defined in PDML, you can use the runtime API provided by the Graphical Toolbox to display them.  The API displays your panels by interpreting the PDML and rendering your user interface using the Java Foundation Classes.

Benefits of the Graphical Toolbox

With the Graphical Toolbox you have the ability to create Java-based user interfaces quickly and easily.  The GUI Builder lets you have precise control over the layout of UI elements on your panels.  Because the layout is described in PDML, you are not required to develop any Java code for the user interface, and you do not need to recompile code in order to make changes.  As a result, significantly less time is required to create and maintain your Java applications.  The Resource Script Converter lets you migrate large numbers of Windows panels to Java quickly and easily.

Defining user interfaces in PDML creates some additional benefits.  Because all of a panel's information is consolidated in a formal markup language, the tools can be enhanced to perform additional services on behalf of the developer.  For example, both the GUI Builder and the Resource Script Converter are capable of generating HTML skeletons for the panel's online help.  The tools scan the PDML markup for a panel and automatically determine what help topics are required.  Anchor tags for the help topics are built right into the help skeleton, which frees the help writer to focus on developing appropriate content.  The Graphical Toolbox runtime environment automatically displays the correct help topic in response to a user's request.

In addition, PDML provides tags that associate each control on a panel with a property on a Java bean.  Once you have identified the bean classes that will supply data to the panel and have associated a property name with each of the appropriate controls, you can request that the tools generate Java source code skeletons for the bean objects.  At runtime, the Graphical Toolbox automatically transfers data between the beans and the controls on the panel that you identified.

The Graphical Toolbox runtime environment provides support for event handling, user data validation, and common types of interaction among the elements of a panel.  The correct platform look and feel for your user interface is automatically set based on the underlying operating system, and the GUI Builder lets you toggle the look and feel so that you can evaluate how your panels will look on different platforms.

Graphical Toolbox tools

The Graphical Toolbox provides you with two tools and, therefore, two ways of automating the creation of your user interfaces. You can use the GUI Builder to quickly and easily create new panels from scratch, or you can use the Resource Script Converter to convert existing Windows-based panels to Java.  Both tools support internationalization for different locales.

GUI BuilderThree windows are displayed when you invoke the GUI Builder for the first time, as shown below.
 
Use the main GUI Builder window, shown in Figure 1, to create, edit and manage your PDML files, and to manage the elements of each panel.
 
Figure 1. GUI Builder window.
Use the Properties window, shown in Figure 2, to view or change the properties of the currently selected control.
 
Figure 2. Properties window.
Use the Toolbox window to select the next user interface control to be added to a panel.  The Toolbox window also provides facilities for aligning groups of controls, for previewing the panel, and for requesting online help for a GUI Builder function.  See Explanation of the Toolbox Widgets for a description of what each icon does.
 
Figure 3. Toolbox window.
The panel being edited is typically displayed in the lower right portion of the GUI Builder workspace.

Resource Script Converter. The Resource Script Converter consists of a two-paned tabbed dialog as shown in Figure 4.  On the Convert pane you specify the name of the Microsoft or VisualAge for Windows RC file that is to be converted to PDML.  You can specify the name of the target PDML file and associated Java resource bundle that will contain the translated strings for the panels.  In addition, you can request that online help skeletons be generated for the panels, generate Java source code skeletons for the objects that supply data to the panels, and serialize the panel definitions for improved performance at runtime.  The Converter's online help provides a detailed description of each input field on the Convert pane.
 
Figure 4. Resource Script Converter
 After the conversion has run successfully, you can use the View pane to view the contents of your newly-created PDML file, and preview your new Java panels.  You can use the GUI Builder to make minor adjustments to a panel if needed.  The Converter always checks for an existing PDML file before performing a conversion, and attempts to preserve any changes in case you need to run the conversion again later.

Getting started with the Graphical Toolbox

Use the following topics to to learn more about the Graphical Toolbox: End change


[ Legal | AS/400 Glossary