AS/400 panes are graphical user interface components that present and allow manipulation of one or more AS/400 resource. The behavior of each AS/400 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 AS/400 panes are available:
AS/400 resources are represented in the graphical user interface with an icon and text. AS/400 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 AS/400 pane. For example, VJobList is the parent to zero or more VJobs, and this hierarchical relationship is represented graphically in an AS/400 pane.
The AS/400 Toolbox for Java provides access to the following AS/400 resources:
All resources are implementations of the VNode interface.
To specify which AS/400 resources are presented in an AS/400 pane, 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 AS/400 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);
When AS/400 pane objects and AS/400 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 AS/400 system 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:
The following example loads the contents of a details pane before adding it to a frame:
// 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);
At run time, the user can select a pop-up menu on any AS/400 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 AS/400 panes are implemented using the model-view-controller paradigm, in which the data and the user interface are separated into different classes. The AS/400 panes integrate AS/400 Toolbox for Java models with Java graphical user interface components. The models manage AS/400 resources and the graphical user interface components display them graphically and handle user interaction.
The AS/400 panes provide enough functionality for most requirements. However, if an application needs more control of the JFC component, then the application can access an AS/400 model directly and provide customized integration with a different graphical user interface component.
The following models are available:
The following image shows the finished product:
The following image shows the finished product:
The following image shows the finished product:
The following image shows the finished product:
[ Information Center Home Page | Feedback ] | [ Legal | AS/400 Glossary ] |