com.ibm.as400.vaccess
Class ResourceProperties

java.lang.Object
  extended bycom.ibm.as400.vaccess.ResourceProperties
All Implemented Interfaces:
Serializable

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

public class ResourceProperties
extends Object
implements 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 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
ResourceProperties()
          Deprecated. Constructs the ResourceProperties object.
ResourceProperties(Object[] propertyIDs, String firstTabLabel, boolean editable)
          Deprecated. Constructs the ResourceProperties object.
ResourceProperties(String firstTabLabel, boolean editable)
          Deprecated. Constructs the ResourceProperties object.
 
Method Summary
 void addProperties(int tab, Object[] propertyIDs)
          Deprecated. Adds multiple properties to the specified tab.
 void addProperties(Object[] propertyIDs)
          Deprecated. Adds multiple properties to the first tab.
 void addProperty(int tab, Object propertyID)
          Deprecated. Adds a property to the specified tab.
 void addProperty(Object propertyID)
          Deprecated. Adds a property to the first tab.
 int addTab(String label)
          Deprecated. Adds a tab.
 int addTab(String label, Object[] propertyIDs)
          Deprecated. Adds a tab.
 String getLabel(int tab)
          Deprecated. Returns the label for the specified tab.
 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(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(Object[] propertyIDs,
                          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(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,
                        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(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,
                          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(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(String label,
                  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 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 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.