IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.common.ui.services.properties.descriptors
Class CompositePropertySource

java.lang.Object
  extended bycom.ibm.xtools.common.ui.services.properties.descriptors.CompositePropertySource
All Implemented Interfaces:
ICompositePropertySource, org.eclipse.ui.views.properties.IPropertySource

public class CompositePropertySource
extends Object
implements ICompositePropertySource

A concrete implementation of the ICompositePropertySource interface. A composite property source - is a IPropertySource object, which allows link ICompositePropertySource object into a linked list structure. The underlaying linked list is transparent to a client - from outside it is a IPropertySource object.


Constructor Summary
CompositePropertySource(Object object)
          Create an instance of the ICompositePropertySource for the given object.
CompositePropertySource(Object object, String category)
          Create an instance of the ICompositePropertySource for the given object.
 
Method Summary
 void addPropertyDescriptor(ICompositeSourcePropertyDescriptor descriptor)
          Adds a new property descriptor to the property source.
 void addPropertySource(ICompositePropertySource source)
          Add another composite property source to the linked list
 String getCategory()
          Returns the category, if one is set for this link.
 Object getEditableValue()
           
protected  ICompositePropertySource getEnclosed()
          Returns the next link on the linked list.
protected  Map getLocalDescriptors()
          Returns the descriptors local to this link.
 Object getObject()
          Returns the target of the properties.
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
           
 Object getPropertyValue(Object id)
           
 boolean isPropertySet(Object id)
           
 void resetPropertyValue(Object id)
           
 void setPropertyValue(Object propertyId, Object value)
          This delegates to IItemPropertyDescriptor.setPropertyValue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositePropertySource

public CompositePropertySource(Object object)
Create an instance of the ICompositePropertySource for the given object. This creates a single link object, ready to be appended to an existing linked list, or become a head of a new one.

Parameters:
object - - the target of the properties

CompositePropertySource

public CompositePropertySource(Object object,
                               String category)
Create an instance of the ICompositePropertySource for the given object. This creates a single link object, ready to be appended to an existing linked list, or become a head of a new one. The descriptors in the scope of this link by default will be assigned the given category

Parameters:
object - - the target of the properties
category - - the property category to be assigned to all descrtiptors in the scope of this link
Method Detail

addPropertySource

public void addPropertySource(ICompositePropertySource source)
Description copied from interface: ICompositePropertySource
Add another composite property source to the linked list

Specified by:
addPropertySource in interface ICompositePropertySource
Parameters:
source - - a composite property source to be added to the linked list

addPropertyDescriptor

public void addPropertyDescriptor(ICompositeSourcePropertyDescriptor descriptor)
Adds a new property descriptor to the property source. If there is a property with that id already, nothing will happen

Parameters:
descriptor - - a new property descriptor to add to the property source

getEditableValue

public Object getEditableValue()
Specified by:
getEditableValue in interface org.eclipse.ui.views.properties.IPropertySource

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource

getPropertyValue

public Object getPropertyValue(Object id)
Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

isPropertySet

public boolean isPropertySet(Object id)
Specified by:
isPropertySet in interface org.eclipse.ui.views.properties.IPropertySource

resetPropertyValue

public void resetPropertyValue(Object id)
Specified by:
resetPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

setPropertyValue

public void setPropertyValue(Object propertyId,
                             Object value)
This delegates to IItemPropertyDescriptor.setPropertyValue.

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource

getCategory

public String getCategory()
Returns the category, if one is set for this link.

Returns:
- the category, if one is set for this link.

getObject

public Object getObject()
Returns the target of the properties.

Returns:
- the target of the properties.

getLocalDescriptors

protected Map getLocalDescriptors()
Returns the descriptors local to this link.

Returns:
- the descriptors local to this link.

getEnclosed

protected ICompositePropertySource getEnclosed()
Returns the next link on the linked list.

Returns:
- the next link on the linked list.

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.