Project: com.ibm.rational.teamapi.scout

com.ibm.rational.teamapi.scout
Class ResourceSource.ArraySource

java.lang.Object
  extended by com.ibm.rational.teamapi.scout.DefaultPropertySource
      extended by com.ibm.rational.teamapi.scout.ResourceSource.ArraySource
All Implemented Interfaces:
org.eclipse.ui.views.properties.IPropertySource
Enclosing class:
ResourceSource

static class ResourceSource.ArraySource
extends DefaultPropertySource

A PropertySource for displaying properties whose value is an array.


Field Summary
(package private)  java.lang.Object m_array
          The array of values represented by this PropertySource
 
Constructor Summary
ResourceSource.ArraySource(java.lang.Object array)
          Constructs an ArraySource for an array value
 
Method Summary
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
          Computes and returns an array of PropertyDescriptors, one descriptor per element of the array.
 java.lang.Object getPropertyValue(java.lang.Object id)
          Retrieves the array element identified by a given property identifier.
 
Methods inherited from class com.ibm.rational.teamapi.scout.DefaultPropertySource
getEditableValue, isPropertySet, resetPropertyValue, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_array

java.lang.Object m_array
The array of values represented by this PropertySource

Constructor Detail

ResourceSource.ArraySource

ResourceSource.ArraySource(java.lang.Object array)
Constructs an ArraySource for an array value

Parameters:
array - The array to be displayed by the ArraySource.
Method Detail

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Computes and returns an array of PropertyDescriptors, one descriptor per element of the array. An Integer object representing the ordinal position of the element in the array is used as the property id.

Returns:
An array of PropertyDescriptors for the elements of this array-valued property.

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object id)
Retrieves the array element identified by a given property identifier.

Parameters:
id - An Integer representing the index of the item in the array
Returns:
The value at the given index, wrapped in a PropertySource if the item is a composite object such as a Resource, List, or Array.

Generated Tue 3-Mar-2009 02:02 AM

Copyright © IBM 2009. All rights reserved.