VPrinterOutput class

A VPrinterOutput object is a resource that represents a list of spooled files on a server for use in AS400Panes.

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 AS400Pane as the root, using the constructor or setRoot() method of the AS400Pane.

A VPrinterOutput object has other useful properties for defining the set of spooled files that is presented in AS400Panes. 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 AS400Pane 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 server to gather the contents of the list.

At run-time, a user can perform actions on any spooled file or spooled file list by right-clicking it to display the context menu. The spooled file list context menu can include an item called Properties that allows the user to set the filter properties, which can change the contents of the list.

The spooled file context menu can include the following items:

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);
Example

Present a list of spooled files by using the print resource, VPrinterOutput object. Figure 1 shows the VPrinterOutput graphical user interface component:

Figure 1: VPrinterOutput GUI component

VPrinterOutput GUI component