A VPrinterOutput object is a resource that represents a list of spooled files on an AS/400 for use in AS/400 panes.
To use a VPrinterOutput object, set the system property. This property can be set using a constructor or through the setSystem() method. The VPrinterOutput object is then "plugged" into the AS/400 pane as the root, using the pane's constructor or setRoot() method.
A VPrinterOutput object has other useful properties for defining the set of spooled files that is presented in AS/400 panes. Use setFormTypeFilter() to specify which types of forms should appear. Use setUserDataFilter() to specify which user data should appear. Finally, use setUserFilter() to specify which users spooled files should appear.
When AS/400 pane and VPrinterOutput objects are created, they are initialized to a default state. The list of spooled files is not loaded at creation time. To load the contents, the caller must explicitly call the load() method on either object. This will initiate communication to the AS/400 system to gather the contents of the list.
At run-time, a user can perform actions on any spooled file or the spooled file list through the pop-up menu. The following action is available for spooled file lists:
Of course, users can only access 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.
The following example creates a VPrinterOutput and presents it in an AS400ListPane:
// Create the VPrinterOutput object. // Assume that "system" is an AS400 // object created and initialized // elsewhere. VPrinterOutput root = new VPrinterOutput (system); // Create and load an AS400ListPane // object. AS400ListPane listPane = new AS400ListPane (root); listPane.load (); // Add the list pane to a frame. // Assume that "frame" is a JFrame // created elsewhere. frame.getContentPane ().add (listPane);
Present a list of spooled files by using the print resource, VPrinterOutput object.
The following image shows the VPrinterOutput graphical user interface component: