com.ibm.as400.vaccess

Class ResourceProperties

  • java.lang.Object
    • com.ibm.as400.vaccess.ResourceProperties
  • All Implemented Interfaces:
    java.io.Serializable

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

    public class ResourceProperties
    extends java.lang.Object
    implements java.io.Serializable
    The ResourceProperties class represents the arrangement of properties on a properties pane for the graphical user interface representation of a Resource or ResourceList object.

    The properties pane is presented as a set of tabs, each of which can present multiple properties. The tabs are identified by their index, starting at 0, in the order they are added. There is always at least one tab, created by default. The first tab always displays the icon and full name of the object being represented.

    Properties

    Properties are specified using either attribute IDs (for Resource objects), or selection or sort IDs (for ResourceList objects). Each implementation of Resource or ResourceList documents its set of valid attribute, selection, and sort IDs.

    This class alone does not present the properties pane. It is intended for use in conjunction with ResourceListDetailsPane or ResourceListPane.

    Here is an example which creates a ResourceProperties object for a list of jobs: // Create the resource list. This example creates // a list of all jobs on the system. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RJobList resourceList = new RJobList(system); // Create and initialize a ResourceProperties object // which defines the arrangement of job attributes // to be presented when the end user views the // properties for a specific job. ResourceProperties properties = new ResourceProperties(); // Add the job number, user name, and job type to the first tab. properties.addProperty(RJob.JOB_NUMBER); properties.addProperty(RJob.USER_NAME); properties.addProperty(RJob.JOB_TYPE); // Add a new "Special" tab which contains the job status and subtype. int specialTab = properties.addTab("Special"); properties.addProperty(specialTab, RJob.JOB_STATUS); properties.addProperty(specialTab, RJob.JOB_SUBTYPE); // Create the ResourceListDetailsPane. In this example, // there are four columns in the table. The first column // contains the icons and names for each job. The remaining // columns contain the status, type, and subtype, respectively, // for each job. In addition, we specify the ResourceProperties // object defined earlier. Object[] columnAttributes = new Object[] { null, RJob.JOB_NUMBER, RJob.USER_NAME, RJob.JOB_STATUS, RJob.JOB_TYPE, RJob.JOB_SUBTYPE }; ResourceListDetailsPane detailsPane = new ResourceListDetailsPane(resourceList, columnAttributes, properties); // 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 jobs is retrieved from the system. detailsPane.load();

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ResourceProperties()
      Deprecated. 
      Constructs the ResourceProperties object.
      ResourceProperties(java.lang.Object[] propertyIDs, java.lang.String firstTabLabel, boolean editable)
      Deprecated. 
      Constructs the ResourceProperties object.
      ResourceProperties(java.lang.String firstTabLabel, boolean editable)
      Deprecated. 
      Constructs the ResourceProperties object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addProperties(int tab, java.lang.Object[] propertyIDs)
      Deprecated. 
      Adds multiple properties to the specified tab.
      void addProperties(java.lang.Object[] propertyIDs)
      Deprecated. 
      Adds multiple properties to the first tab.
      void addProperty(int tab, java.lang.Object propertyID)
      Deprecated. 
      Adds a property to the specified tab.
      void addProperty(java.lang.Object propertyID)
      Deprecated. 
      Adds a property to the first tab.
      int addTab(java.lang.String label)
      Deprecated. 
      Adds a tab.
      int addTab(java.lang.String label, java.lang.Object[] propertyIDs)
      Deprecated. 
      Adds a tab.
      java.lang.String getLabel(int tab)
      Deprecated. 
      Returns the label for the specified tab.
      java.lang.Object[] getProperties(int tab)
      Deprecated. 
      Returns the property IDs that have been added to the specified tab.
      int getTabCount()
      Deprecated. 
      Returns the number of tabs.
      boolean isEditable()
      Deprecated. 
      Indicates if the properties are editable.
      void setEditable(boolean editable)
      Deprecated. 
      Sets whether the properties are editable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceProperties

        public ResourceProperties()
        Deprecated. 
        Constructs the ResourceProperties object.
      • ResourceProperties

        public ResourceProperties(java.lang.String firstTabLabel,
                          boolean editable)
        Deprecated. 
        Constructs the ResourceProperties object.
        Parameters:
        firstTabLabel - The label for the first tab.
        editable - true if the properties should be editable, false otherwise.
      • ResourceProperties

        public ResourceProperties(java.lang.Object[] propertyIDs,
                          java.lang.String firstTabLabel,
                          boolean editable)
        Deprecated. 
        Constructs the ResourceProperties object.
        Parameters:
        propertyIDs - The property IDs to add to the first tab.
        firstTabLabel - The label for the first tab.
        editable - true if the properties should be editable, false otherwise.
    • Method Detail

      • addProperty

        public void addProperty(java.lang.Object propertyID)
        Deprecated. 
        Adds a property to the first tab. The new property is placed after all existing properties on the first tab.
        Parameters:
        propertyID - The property ID to add to the first tab.
      • addProperty

        public void addProperty(int tab,
                       java.lang.Object propertyID)
        Deprecated. 
        Adds a property to the specified tab. The new property is placed after all existing properties on the tab.
        Parameters:
        tab - The tab.
        • 0 - indicates the first tab.
        • A tab value returned by a previous call to addTab().
        propertyID - The property ID to add to the specified tab.
      • addProperties

        public void addProperties(java.lang.Object[] propertyIDs)
        Deprecated. 
        Adds multiple properties to the first tab. The new properties are placed after all existing properties on the first tab.
        Parameters:
        propertyIDs - The property IDs to add to the first tab.
      • addProperties

        public void addProperties(int tab,
                         java.lang.Object[] propertyIDs)
        Deprecated. 
        Adds multiple properties to the specified tab. The new properties are placed after all existing properties on the tab.
        Parameters:
        tab - The tab.
        • 0 - indicates the first tab.
        • A tab value returned by a previous call to addTab().
        propertyIDs - The property IDs to add to the specified tab.
      • addTab

        public int addTab(java.lang.String label)
        Deprecated. 
        Adds a tab. The new tab is placed after all existing tabs.
        Parameters:
        label - The tab label.
        Returns:
        The tab index.
      • addTab

        public int addTab(java.lang.String label,
                 java.lang.Object[] propertyIDs)
        Deprecated. 
        Adds a tab. The new tab is placed after all existing tabs.
        Parameters:
        label - The tab label.
        propertyIDs - The property IDs to add to the tab.
        Returns:
        The tab index.
      • getLabel

        public java.lang.String getLabel(int tab)
        Deprecated. 
        Returns the label for the specified tab.
        Parameters:
        tab - The tab.
        • 0 - indicates the first tab.
        • A tab value returned by a previous call to addTab().
        Returns:
        The label for the specified tab.
      • getProperties

        public java.lang.Object[] getProperties(int tab)
        Deprecated. 
        Returns the property IDs that have been added to the specified tab.
        Parameters:
        tab - The tab.
        • 0 - indicates the first tab.
        • A tab value returned by a previous call to addTab().
        Returns:
        The property IDs that have been added to the specified tab.
      • getTabCount

        public int getTabCount()
        Deprecated. 
        Returns the number of tabs.
        Returns:
        The number of tabs.
      • isEditable

        public boolean isEditable()
        Deprecated. 
        Indicates if the properties are editable.
        Returns:
        true if the properties should be editable, false otherwise.
      • setEditable

        public void setEditable(boolean editable)
        Deprecated. 
        Sets whether the properties are editable. Even when the properties are set to editable, specific properties may remain not editable. This is the case if it does not make sense to change a property.
        Parameters:
        editable - true if the properties should be editable, false otherwise. The default is false.