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

99 lines
5.2 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?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="VPrinters class" />
<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="vprts" />
<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>VPrinters class</title>
</head>
<body id="vprts"><a name="vprts"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">VPrinters class</h1>
<div><p></p>
<div class="section"><p>A <a href="javadoc/com/ibm/as400/vaccess/VPrinters.html#NAVBAR_TOP"> VPrinters</a> object is a resource that represents
a list of printers for use in <a href="vpanes.htm#vpanes">AS400Panes</a>.</p>
</div>
<div class="section"><p>To use a VPrinters object, set the system property. Set this property
by using a constructor or through the <a href="javadoc/com/ibm/as400/vaccess/VPrinters.html#SETSYSTEM(COM.IBM.AS400.ACCESS.AS400)"> setSystem()</a> method. The VPrinters object
is then "plugged" into the AS400Pane as the root, using the pane's constructor
or setRoot() method.</p>
</div>
<div class="section"><p>A VPrinters object has another useful property for defining the
set of printers that is presented in AS400Panes. Use <a href="javadoc/com/ibm/as400/vaccess/VPrinters.html#SETPRINTERFILTER(JAVA.LANG.STRING)"> setPrinterFilter()</a> to specify a filter
that defines which printers should appear.</p>
</div>
<div class="section"><p>When AS400Pane and VPrinters objects are created, they are initialized
to a default state. The list of printers has not been loaded. To load the
contents, the caller must explicitly call the load() method on either object.</p>
</div>
<div class="section"><p>At run-time, a user can perform actions on any printer list or
printer by right-clicking it to display the context menu. The printer list
context menu can include an item called <strong>Properties</strong> that allows the
user to set the printer filter property, which can change the contents of
the list.</p>
</div>
<div class="section"><p>The printer context menu can include the following items:</p>
</div>
<div class="section"><ul><li><strong>Hold</strong> - holds the printer</li>
<li><strong>Release</strong> - releases the printer</li>
<li><strong>Start</strong> - starts the printer</li>
<li><strong>Stop</strong> - stops the printer</li>
<li><strong>Make available</strong> - makes the printer available</li>
<li><strong>Make unavailable</strong> - makes the printer unavailable</li>
<li><strong>Properties</strong> - displays properties of the printer and allows the
user to set filters</li>
</ul>
</div>
<div class="section"><p>Users can only access printers to which they are authorized. In
addition, the caller can prevent the user from performing actions by using
the setAllowActions() method on the pane.</p>
</div>
<div class="section"><p>The following example creates a VPrinters object and presents
it in an AS400TreePane</p>
</div>
<div class="section"><div class="p"><pre> // Create the VPrinters object.
// Assume that "system" is an AS400
// object created and initialized
// elsewhere.
VPrinters root = new VPrinters (system);
// Create and load an AS400TreePane
// object.
AS400TreePane treePane = new AS400TreePane (root);
treePane.load ();
// Add the tree pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (treePane);</pre>
<strong>Example</strong></div>
</div>
<div class="section"><p>Present print resources using an AS400ExplorerPane with a <a href="vprinterexample.htm#vprinterexample">VPrinters</a> object.
Figure 1 shows the VPrinters graphical user interface component:</p>
</div>
<div class="section"><p><strong>Figure 1: VPrinters GUI component</strong></p>
</div>
<div class="section"><p><img src="rzahh117.gif" alt="VPrinters GUI component" /></p>
</div>
</div>
</body>
</html>