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

109 lines
5.6 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="VPrinter 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="vprtobj" />
<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>VPrinter class</title>
</head>
<body id="vprtobj"><a name="vprtobj"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">VPrinter class</h1>
<div><p></p>
<div class="section"><p>A <a href="javadoc/com/ibm/as400/vaccess/VPrinter.html#NAVBAR_TOP"> VPrinter</a> object is a resource that represents
a server printer and its spooled files for use in <a href="vpanes.htm#vpanes">AS400Panes</a>.</p>
</div>
<div class="section"><p>To use a VPrinter, set the printer property. Set this property
by using a constructor or through the <a href="javadoc/com/ibm/as400/vaccess/VPrinter.html#SETPRINTER(COM.IBM.AS400.ACCESS.PRINTER)"> setPrinter()</a> method. The VPrinter object
is then "plugged" into the AS400Pane as the root, using the pane's constructor
or setRoot() method.</p>
</div>
<div class="section"><p>When AS400Pane and VPrinter objects are created, they are initialized
to a default state. The printer's attributes and list of spooled files are
not loaded at creation time.</p>
</div>
<div class="section"><p>To load the contents, the caller must explicitly call the load()
method on either object. This will initiate communication to the server to
gather the contents of the list.</p>
</div>
<div class="section"><p>At run-time, a user can perform actions on any printer or spooled
file by right-clicking it to display the context menu. The context menu for
message queues 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>The context menu for spooled files listed for a printer can include
the following items:</p>
</div>
<div class="section"><ul><li><strong>Reply</strong> - replies to the spooled file</li>
<li><strong>Hold</strong> - holds the spooled file</li>
<li><strong>Release</strong> - releases the spooled file</li>
<li><strong>Print next</strong> - prints the next spooled file</li>
<li><strong>Send</strong> - sends the spooled file</li>
<li><strong>Move</strong> - moves the spooled file</li>
<li><strong>Delete</strong> - deletes the spooled file</li>
<li><strong>Properties</strong> - displays many properties of the spooled file and
allows the user to change some of them</li>
</ul>
</div>
<div class="section"><p>Users can only access printers and spooled files 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 VPrinter and presents it in an
AS400ExplorerPane:</p>
</div>
<div class="section"><div class="p"><pre> // Create the VPrinter object.
// Assume that "system" is an AS400
// object created and initialized
// elsewhere.
VPrinter root = new VPrinter (new Printer (system, "MYPRINTER"));
// Create and load an
// AS400ExplorerPane object.
AS400ExplorerPane explorerPane = new AS400ExplorerPane (root);
explorerPane.load ();
// Add the explorer pane to a frame.
// Assume that "frame" is a JFrame
// created elsewhere.
frame.getContentPane ().add (explorerPane);</pre>
<strong>Example</strong></div>
</div>
<div class="section"><p>Present print resources using an AS400ExplorerPane with a <a href="vprinterexample.htm#vprinterexample">VPrinter</a> object. Figure
1 shows the VPrinter graphical user interface component:</p>
</div>
<div class="section"><p><strong>Figure 1: VPrinter GUI component</strong></p>
</div>
<div class="section"><p><img src="rzahh115.gif" alt="VPrinter GUI component" /></p>
</div>
</div>
</body>
</html>