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

217 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="AS400Panes" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<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="vpanes" />
<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>AS400Panes</title>
</head>
<body id="vpanes"><a name="vpanes"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">AS400Panes</h1>
<div><p></p>
<div class="section"><p>AS400Panes are components in the vaccess package that present
and allow manipulation of one or more server resources in a GUI. The behavior
of each server resource varies depending on the type of resource.</p>
</div>
<div class="section"><p>All panes extend the Java™ Component class. As a result, they
can be added to any AWT Frame, Window, or Container.</p>
</div>
<div class="section"><p>The following AS400Panes are available:</p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/vaccess/AS400DetailsPane.html#NAVBAR_TOP"> AS400DetailsPane</a> presents a list of server resources
in a table where each row displays various details about a single resource.
The table allows selection of one or more resources.</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400ExplorerPane.html#NAVBAR_TOP"> AS400ExplorerPane</a> combines an AS400TreePane and AS400DetailsPane
so that the resource selected in the tree is presented in the details.</li>
<li><a href="jdbcdatasourcepane.htm#jdbcdatasourcepane">AS400JDBCDataSourcePane</a> presents
the property values of an AS400JDBCDataSource object.</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400ListPane.html#NAVBAR_TOP"> AS400ListPane</a> presents a list of server resources and
allows selection of one or more resources.</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400TreePane.html#NAVBAR_TOP"> AS400TreePane</a> presents a tree hierarchy of server resources
and allows selection of one or more resources.</li>
</ul>
</div>
<div class="section"><p><strong><span class="synph" id="vpanes__serverresources"><a name="vpanes__serverresources"><!-- --></a><span class="kwd"></span></span>Server resources</strong></p>
</div>
<div class="section"><p>Server resources are represented in the graphical user interface
with an icon and text. Server resources are defined with hierarchical relationships
where a resource might have a parent and zero or more children. These are
predefined relationships and are used to specify what resources are displayed
in an AS400Pane. For example, VJobList is the parent to zero or more VJobs,
and this hierarchical relationship is represented graphically in an AS400Pane.</p>
</div>
<div class="section"><p>The IBM<sup>®</sup> Toolbox
for Java provides
access to the following server resources:</p>
</div>
<div class="section"><ul><li><a href="vifs.htm#vifs">VIFSDirectory</a> represents a directory
in the integrated file system</li>
<li><a href="vjob.htm#vjob">VJob and VJobList</a> represent a job or
a list of jobs</li>
<li><a href="vmsg.htm#vmsg">VMessageList and VMessageQueue</a> represent
a list of messages returned from a CommandCall or ProgramCall or a message
queue</li>
<li><a href="vprt.htm#vprt">VPrinter, VPrinters, and VPrinterOutput</a> represent
a printer, a list of printers, or a list of spooled files</li>
<li><a href="vugrp.htm#vugrp">VUserList</a> represents a list of users</li>
</ul>
</div>
<div class="section"><p>All resources are implementations of the <a href="javadoc/com/ibm/as400/vaccess/VNode.html#NAVBAR_TOP">VNode</a> interface.</p>
</div>
<div class="section"><p><strong><span class="synph" id="vpanes__root"><a name="vpanes__root"><!-- --></a><span class="kwd"></span></span>Setting the root</strong></p>
</div>
<div class="section"><p>To specify which server resources are presented in an AS400Pane,
set the root using the constructor or setRoot() method. The root defines
the top level object and is used differently based on the pane:</p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/vaccess/AS400ListPane.html#NAVBAR_TOP">AS400ListPane</a> presents all of the root's children in
its list</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400DetailsPane.html#NAVBAR_TOP">AS400DetailsPane</a> presents all of the root's children
in its table</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400TreePane.html#NAVBAR_TOP">AS400TreePane</a> uses the root as the root of its tree </li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400ExplorerPane.html#NAVBAR_TOP">AS400ExplorerPane</a> uses the root as the root of its tree</li>
</ul>
</div>
<div class="section"><p>Any combination of panes and roots is possible.</p>
</div>
<div class="section"><p><span class="synph" id="vpanes__vpanex1"><a name="vpanes__vpanex1"><!-- --></a><span class="kwd"></span></span>The following example creates
an AS400DetailsPane to present the list of users defined on the system:</p>
</div>
<div class="section"><div class="p"><pre> // Create the server resource
// representing a list of users.
// Assume that "system" is an AS400
// object created and initialized
// elsewhere.
VUserList userList = new VUserList (system);
// Create the AS400DetailsPane object
// and set its root to be the user
// list.
AS400DetailsPane detailsPane = new AS400DetailsPane ();
detailsPane.setRoot (userList);
// Add the details pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (detailsPane);</pre>
<strong><span class="synph" id="vpanes__loadcontents"><a name="vpanes__loadcontents"><!-- --></a><span class="kwd"></span></span>Loading
the contents</strong></div>
</div>
<div class="section"><p>When AS400Pane objects and server resource objects are created,
they are initialized to a default state. The relevant information that makes
up the contents of the pane is not loaded at creation time.</p>
</div>
<div class="section"><p>To load the contents, the application must explicitly call the
load() method. In most cases, this initiates communication to the server to
gather the relevant information. Because it can sometimes take a while to
gather this information, the application can control exactly when it happens.
For example, you can:</p>
</div>
<div class="section"><ul><li>Load the contents before adding the pane to a frame. The frame does not
appear until all information is loaded.</li>
<li>Load the contents after adding the pane to a frame and displaying that
frame. The frame appears, but it does not contain much information. A "wait
cursor" appears and the information is filled in as it is loaded.</li>
</ul>
</div>
<div class="section"><p><span class="synph" id="vpanes__vpanezex2"><a name="vpanes__vpanezex2"><!-- --></a><span class="kwd"></span></span>The following example
loads the contents of a details pane before adding it to a frame:</p>
</div>
<div class="section"><div class="p"><pre> // Load the contents of the details
// pane. Assume that the detailsPane
// was created and initialized
// elsewhere.
detailsPane.load ();
// Add the details pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (detailsPane);</pre>
<strong><span class="synph" id="vpanes__actionsandproperties"><a name="vpanes__actionsandproperties"><!-- --></a><span class="kwd"></span></span>Actions
and properties panes</strong></div>
</div>
<div class="section"><p>At run time, the user can select a pop-up menu on any server resource.
The pop-up menu presents a list of relevant actions that are available for
the resource. When the user selects an action from the pop-up menu, that action
is performed. Each resource has different actions defined.</p>
</div>
<div class="section"><p>In some cases, the pop-up menu also presents an item that allows
the user to view a properties pane. A properties pane shows various details
about the resource and may allow the user to change those details.</p>
</div>
<div class="section"><p>The application can control whether actions and properties panes
are available by using the setAllowActions() method on the pane.</p>
</div>
<div class="section"><p><strong><span class="synph" id="vpanes__models"><a name="vpanes__models"><!-- --></a><span class="kwd"></span></span>Models</strong></p>
</div>
<div class="section"><p>The AS400Panes are implemented using the model-view-controller
paradigm, in which the data and the user interface are separated into different
classes. The AS400Panes integrate IBM Toolbox for Java models with Java GUI components. The models manage server
resources and the vaccess components display them graphically and handle
user interaction.</p>
</div>
<div class="section"><p>The AS400Panes provide enough functionality for most requirements.
However, if an application needs more control of the JFC component, then the
application can access a server model directly and provide customized integration
with a different vaccess component.</p>
</div>
<div class="section"><p>The following models are available:</p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/vaccess/AS400ListModel.html#NAVBAR_TOP"> AS400ListModel</a> implements the JFC ListModel interface
as a list of server resources. This can be used with a JFC JList object.</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400DetailsModel.html#NAVBAR_TOP"> AS400DetailsModel</a> implements the JFC TableModel interface
as a table of server resources where each row contains various details about
a single resource. This can be used with a JFC JTable object.</li>
<li><a href="javadoc/com/ibm/as400/vaccess/AS400TreeModel.html#NAVBAR_TOP"> AS400TreeModel</a> implements the JFC TreeModel interface
as a tree hierarchy of server resources. This can be used with a JFC JTree
object.</li>
</ul>
</div>
<div class="section"><p><strong><span class="synph" id="vpanes__vpaneexamples"><a name="vpanes__vpaneexamples"><!-- --></a><span class="kwd"></span></span>Examples</strong></p>
</div>
<div class="section"><ul><li>Present a list of users on the system using an <a href="vuserlistexample.htm#vuserlistexample">AS400ListPane</a>
with a VUserList object. Figure 1 shows the finished product: <p><strong>Figure
1: Using AS400ListPane with a VUserList object</strong></p>
<p><img src="rzahh092.gif" alt="Using AS400ListPane with a VUserList object" /></p>
</li>
<li>Present the list of messages generated by a command call using an <a href="vmessagelistexample.htm#vmessagelistexample">AS400DetailsPane</a>
with a VMessageList object. Figure 2 shows the finished product: <p><strong>Figure
2: Using AS400DetailsPane with a VMessageList object</strong></p>
<p><img src="rzahh090.gif" alt="Using AS400DetailsPane with a VMessageList object" /></p>
</li>
</ul>
</div>
<div class="section"><ul><li>Present an integrated file system directory hierarchy using an <a href="vifsdirectoryexample.htm#vifsdirectoryexample">AS400TreePane</a> with a VIFSDirectory object. Figure 3 shows the finished product: <p><strong>Figure
3: Using AS400TreePane with a VIFSDirectory object</strong></p>
<p><img src="rzahh088.gif" alt="Using AS400TreePane with a VIFSDirectory object" /></p>
</li>
<li>Present print resources using an <a href="vprinterexample.htm#vprinterexample">AS400ExplorerPane</a>
with a VPrinters object. Figure 4 shows the finished product: <p><strong>Figure
4: Using AS400ExplorerPane with a VPrinters object</strong></p>
<p><img src="rzahh117.gif" alt="Using AS400ExplorerPane with a VPrinters object" /></p>
</li>
</ul>
</div>
</div>
</body>
</html>