com.ibm.as400.vaccess

Class ResourceListDetailsPane

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable

    Deprecated. 
    Use Java Swing instead, along with the classes in package com.ibm.as400.access

    public class ResourceListDetailsPane
    extends JComponent
    implements Serializable
    The ResourceListDetailsPane class represents a graphical user interface that presents the contents of a ResourceList in a table. Every row in the table represents a Resource from the list. You must explicitly call load() to load the information from the resource list.

    The table columns are specified as an array of column attribute IDs. The table will contain a column for each element of the array. The following can be specified as column attribute IDs:

    • null - The name and icon from each Resource's Presentation object are presented in the column.
    • Resource attribute IDs - These are defined by the Resource objects that make up the rows of the table. The corresponding attribute value is presented in the column.

    Pop-up menus are enabled by default. The pop-up menus will contain a single "Properties" menu item which, when selected, presents one of the following Properties dialogs:

    • If a list item is clicked, the dialog presents the corresponding Resource object's attribute values. The layout of this Properties dialog is defined by the resource properties specified for this ResourceListDetailsPane object. By default, it will contain a "General" tab which shows the Resource object's icon and full name.
    • If something other than a list item is clicked, the dialog presents the ResourceList object's selection and sort values.

    Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.

    ResourceListDetailsPane objects generate the following events:

    • ErrorEvent
    • ListSelectionEvent
    • PropertyChangeEvent

    The following example creates a details pane which presents a list of users.

    // Create the resource list.  This example creates
    // a list of all users on the system.
    AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
    RUserList userList = new RUserList(system);
    
    // Create the ResourceListDetailsPane. In this example, // there are two columns in the table. The first column // contains the icons and names for each user. The // second column contains the text description for each // user. Object[] columnAttributeIDs = new Object[] { null, RUser.TEXT_DESCRIPTION }; ResourceListDetailsPane detailsPane = new ResourceListDetailsPane(); detailsPane.setResourceList(userList); detailsPane.setColumnAttributeIDs(columnAttributeIDs);
    // Add the ResourceListDetailsPane to a JFrame and show it. JFrame frame = new JFrame("My Window"); frame.getContentPane().add(detailsPane); frame.pack(); frame.show();
    // The ResourceListDetailsPane will appear empty until // we load it. This gives us control of when the list // of users is retrieved from the system. detailsPane.load();
    See Also:
    ResourceListDetailsModel, Serialized Form
    • Constructor Detail

      • ResourceListDetailsPane

        public ResourceListDetailsPane()
        Deprecated. 
        Constructs a ResourceListDetailsPane object.
      • ResourceListDetailsPane

        public ResourceListDetailsPane(ResourceList resourceList,
                               Object[] columnAttributeIDs,
                               ResourceProperties resourceProperties)
        Deprecated. 
        Constructs a ResourceListDetailsPane object.
        Parameters:
        resourceList - The resource list from which all information for the model is gathered.
        columnAttributeIDs - The column attribute IDs.
        resourceProperties - The resource properties.
    • Method Detail

      • addErrorListener

        public void addErrorListener(ErrorListener listener)
        Deprecated. 
        Adds a listener to be notified when an error occurs.
        Parameters:
        listener - The listener.
      • addListSelectionListener

        public void addListSelectionListener(ListSelectionListener listener)
        Deprecated. 
        Adds a listener to be notified when a list selection occurs.
        Parameters:
        listener - The listener.
      • addPropertyChangeListener

        public void addPropertyChangeListener(PropertyChangeListener listener)
        Deprecated. 
        Adds a listener to be notified when the value of any bound property changes.
        Overrides:
        addPropertyChangeListener in class Container
        Parameters:
        listener - The listener.
      • getAllowActions

        public boolean getAllowActions()
        Deprecated. 
        Indicates if pop-up menus are enabled.
        Returns:
        true if pop-up menus are enabled, false otherwise.
      • getColumnAttributeIDs

        public Object[] getColumnAttributeIDs()
        Deprecated. 
        Returns the column attribute IDs.
        Returns:
        The column attribute IDs.
      • getColumnModel

        public TableColumnModel getColumnModel()
        Deprecated. 
        Returns the column model that is used to maintain the columns. This provides the ability to programmatically add, remove, reorder, and resize columns in the table.
        Returns:
        The column model.
      • getModel

        public TableModel getModel()
        Deprecated. 
        Returns the model that contains data for the table.
        Returns:
        The model that contains data for the table.
      • getResourceAtPoint

        public Resource getResourceAtPoint(Point point)
        Deprecated. 
        Returns the resource that corresponds to the row located at the specified point. This can be useful for present customized pop-up menus.
        Parameters:
        point - The point.
        Returns:
        The resource that corresponds to the row located at the point, or null if no such resource exists.
      • getResourceList

        public ResourceList getResourceList()
        Deprecated. 
        Returns the resource list from which all information for the model is gathered.
        Returns:
        The resource list from which all information for the model is gathered.
      • getResourceProperties

        public ResourceProperties getResourceProperties()
        Deprecated. 
        Returns the resource properties. The resource properties object describes the arrangement of the Properties dialog that is presented when the user right clicks on a list item and selects "Properties".
      • getSelectionModel

        public ListSelectionModel getSelectionModel()
        Deprecated. 
        Returns the selection model that is used to maintain row selection state. This provides the ability to programmatically select and deselect resources.
        Returns:
        The selection model.
      • load

        public void load()
        Deprecated. 
        Loads the information from the resource list.
      • removeErrorListener

        public void removeErrorListener(ErrorListener listener)
        Deprecated. 
        Removes an error listener.
        Parameters:
        listener - The listener.
      • removeListSelectionListener

        public void removeListSelectionListener(ListSelectionListener listener)
        Deprecated. 
        Removes a list selection listener.
        Parameters:
        listener - The listener.
      • setAllowActions

        public void setAllowActions(boolean allowActions)
        Deprecated. 
        Sets whether pop-up menus are enabled.
        Parameters:
        allowActions - true to enable pop-up menus, false otherwise. The default is true.
      • setColumnAttributeIDs

        public void setColumnAttributeIDs(Object[] columnAttributeIDs)
        Deprecated. 
        Sets the column attribute IDs.
        Parameters:
        columnAttributeIDs - The column attribute IDs.
      • setResourceList

        public void setResourceList(ResourceList resourceList)
        Deprecated. 
        Sets the resource list from which all information for the model is gathered.
        Parameters:
        resourceList - The resource list from which all information for the model is gathered.
      • setResourceProperties

        public void setResourceProperties(ResourceProperties resourceProperties)
        Deprecated. 
        Sets the resource properties. The resource properties object describes the arrangement of the Properties dialog that is presented when the user right clicks on a list item and selects "Properties".
        Parameters:
        resourceProperties - The resource properties.
      • setSelectionModel

        public void setSelectionModel(ListSelectionModel selectionModel)
        Deprecated. 
        Sets the selection model that is used to maintain selection state. This provides the ability to programmatically select and deselect resources.
        Parameters:
        selectionModel - The selection model.