ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/pdmlpg1.htm

205 lines
13 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Graphical Toolbox and PDML" />
<meta name="abstract" content="The Graphical Toolbox, a set of UI tools, makes it easy to create custom user interface panels in Java." />
<meta name="description" content="The Graphical Toolbox, a set of UI tools, makes it easy to create custom user interface panels in Java." />
<meta name="DC.Relation" scheme="URI" content="page1.htm" />
<meta name="DC.Relation" scheme="URI" content="pdmlbeg.htm" />
<meta name="DC.Relation" scheme="URI" content="pdmltool.htm" />
<meta name="DC.Relation" scheme="URI" content="pdmlasui.htm" />
<meta name="DC.Relation" scheme="URI" content="helpinfo.htm" />
<meta name="DC.Relation" scheme="URI" content="pdmlexs.htm" />
<meta name="DC.Relation" scheme="URI" content="pdmlbrws.htm" />
<meta name="DC.Relation" scheme="URI" content="wdgexpl.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahhxmlmain.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="pdmlpg1" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Graphical Toolbox and PDML</title>
</head>
<body id="pdmlpg1"><a name="pdmlpg1"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Graphical Toolbox and PDML</h1>
<div><p>The Graphical Toolbox, a set of UI tools, makes it easy to create
custom user interface panels in Java™. </p>
<div class="section"><p>You can incorporate the panels into your Java applications, <a href="pdmlbrws.htm#pdmlbrws"> applets</a>, or <a href="../rzakx/rzakxkickoff.htm">iSeries™ Navigator
plug-ins</a>. The panels may contain data obtained from the iSeries, or
data obtained from another source such as a file in the local file system
or a program on the network.</p>
<p>The <strong>GUI Builder</strong> 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 the layout behaves the way
you expected. The panel definitions you create can be used in dialogs, inserted
within property sheets and wizards, or arranged into splitter, deck, and
tabbed panes. The GUI Builder also allows you to build menu bars, toolbars,
and context menu definitions. You can also incorporate JavaHelp in your panels,
including context sensitive help.</p>
<p>The <strong>Resource Script Converter</strong> converts Windows<sup>®</sup> resource
scripts into an XML representation that is usable by Java programs.
With the Resource Script Converter you can process Windows resource scripts (RC files)
from your existing Windows dialogs and menus. These converted files
can then be edited with the GUI Builder. Property sheets and wizards can be
made from RC files using the resource script converter along with the GUI
Builder.</p>
<p>Underlying these two tools is a new technology called the <strong>Panel
Definition Markup Language</strong>, or <strong>PDML</strong>. 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.</p>
<div class="note"><span class="notetitle">Note:</span> Using
PDML requires that you run version 1.4 or later of the Java Runtime
Environment.</div>
</div>
<div class="section"><h4 class="sectiontitle">Benefits of the Graphical Toolbox</h4><dl><dt class="dlterm"><strong>Write Less Code and Save Time</strong></dt>
<dd>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 to define 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.</dd>
</dl>
<dl><dt class="dlterm"><strong>Custom Help</strong></dt>
<dd>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. You
decide which help topics are required and the help topics are automatically
built based on your requirements. 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.</dd>
</dl>
<dl><dt class="dlterm"><strong>Automatic Panel to Code Integration</strong></dt>
<dd>In addition, PDML provides tags that associate each control on a panel
with an attribute on a JavaBean. Once you have identified the bean classes
that will supply data to the panel and have associated a attribute 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.</dd>
</dl>
<dl><dt class="dlterm"><strong>Platform Independent</strong></dt>
<dd>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.</dd>
</dl>
<p>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.
The converted files can then be edited with GUI Builder. Both tools support
internationalization.</p>
</div>
<div class="section" id="pdmlpg1__guibldr"><a name="pdmlpg1__guibldr"><!-- --></a><h4 class="sectiontitle">GUI Builder</h4><p>Two windows are displayed
when you invoke the GUI Builder for the first time, as shown in Figure 1:</p>
<p><strong>Figure
1: GUI Builder windows</strong></p>
<p><img src="rzahh095.gif" alt="GUI Builder windows" /></p>
<p>Use the File Builder window to create and
edit your PDML files.</p>
<p><strong>Figure 2: File Builder window</strong></p>
<p><img src="rzahh096.gif" alt="File Builder window" /></p>
<p>Use
the Properties window to view or change the properties of the currently selected
control.</p>
<p><strong>Figure 3: Properties window</strong></p>
<p><img src="rzahh097.gif" alt="GUI Builder Properties window" /></p>
<p>Use the Panel Builder
window to create and edit your graphical user interface components. Select
the desired component from the toolbar and click on the panel to place it
where ever you want. The toolbar also facilities for aligning groups of controls,
for previewing the panel, and for requesting online help for a GUI Builder
function. See <a href="wdgexpl.htm#wdgexpl">GUI Builder Panel Builder
toolbar</a> for a description of what each icon does.</p>
<p><strong>Figure
4: Panel Builder window</strong></p>
<p><img src="rzahh098.gif" alt="Panel Builder window" /></p>
<p>The panel being edited is displayed in the
Panel Builder window. Figure 5 shows how the windows work together:</p>
<p><strong>Figure
5: Example of how GUI Builder windows work together</strong></p>
<p><img src="rzahh099.gif" alt="Example of how GUI Builder windows work together" /></p>
</div>
<div class="section" id="pdmlpg1__rc2xml"><a name="pdmlpg1__rc2xml"><!-- --></a><h4 class="sectiontitle">Resource Script Converter</h4><p>The Resource
Script Converter consists of a two-paned tabbed dialog. On the <strong>Convert</strong> pane
you specify the name of the Microsoft<sup>®</sup> or VisualAge<sup>®</sup> 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.</p>
<p><strong>Figure 6: Resource Script Converter Convert pane</strong></p>
<p><img src="rzahh094.gif" alt="Resource Script Converter window: Convert pane" /></p>
<p>After the conversion has run successfully, you can use the <strong>View</strong> 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. </p>
<p><strong>Figure 7: Resource Script Converter
View pane</strong></p>
<p><img src="rzahh114.gif" alt="Resource Script Converter window: View pane" /></p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="pdmlbeg.htm">Setting up the Graphical Toolbox</a></strong><br />
The Graphical Toolbox is delivered as a set of JAR files. To set up the Graphical Toolbox you must install the JAR files on your workstation and set your CLASSPATH environment variable.</li>
<li class="ulchildlink"><strong><a href="pdmltool.htm">Creating your user interface</a></strong><br />
You can create your user interface using the GUI Builder tool.</li>
<li class="ulchildlink"><strong><a href="pdmlasui.htm">Displaying your panels at runtime</a></strong><br />
The Graphical Toolbox provides a redistributable API that your Java programs
can use to display user interface panels defined using PDML. The API displays
your panels by interpreting the PDML and rendering your user interface using
the Java Foundation
Classes.</li>
<li class="ulchildlink"><strong><a href="helpinfo.htm">Editing help documents generated by GUI Builder</a></strong><br />
For each PDML project file, the GUI Builder generates a help skeleton and puts it into a single HTML document. Before use, this HTML file is broken up into single topic HTML files for each dialog of the PDML project. This provides the user with granular help for each topic and allows you to manage only a few large help files.</li>
<li class="ulchildlink"><strong><a href="pdmlexs.htm">Graphical Toolbox examples</a></strong><br />
Use these examples to show you how to implement the tools within Graphical Toolbox for your own UI programs.</li>
<li class="ulchildlink"><strong><a href="pdmlbrws.htm">Using the Graphical Toolbox in a browser</a></strong><br />
You can use the Graphical Toolbox to build panels for Java applets
that run in a Web browser. </li>
<li class="ulchildlink"><strong><a href="wdgexpl.htm">GUI Builder Panel Builder toolbar</a></strong><br />
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="page1.htm" title="IBM Toolbox for Java is a set of Java classes that allow you to use Java programs to access data on your iSeries servers. You can use these classes to write client/server applications, applets, and servlets that work with data on your iSeries. You can also run Java applications that use the IBM Toolbox for Java classes on the iSeries Java virtual machine (JVM).">IBM Toolbox for Java</a></div>
</div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahhxmlmain.htm" title="IBM Toolbox for Java includes several Extensible Markup Language (XML) components, including an XML parser.">Extensible Markup Language components</a></div>
</div>
</div>
</body>
</html>