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.
All panes extend the Java™ Component class. As a result, they can be added to any AWT Frame, Window, or Container.
The following AS400Panes are available:
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.
The IBM® Toolbox for Java provides access to the following server resources:
All resources are implementations of the VNode interface.
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:
Any combination of panes and roots is possible.
The following example creates an AS400DetailsPane to present the list of users defined on the system:
// 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);Loading the contents
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.
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:
// 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);Actions and properties panes
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.
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.
The application can control whether actions and properties panes are available by using the setAllowActions() method on the pane.
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.
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.
The following models are available:
Figure 1: Using AS400ListPane with a VUserList object
Figure 2: Using AS400DetailsPane with a VMessageList object
Figure 3: Using AS400TreePane with a VIFSDirectory object
Figure 4: Using AS400ExplorerPane with a VPrinters object