be.ac.vub.cocompose.eclipse.model.datatypes
Class ModelElementPropertySource

java.lang.Object
  extended bybe.ac.vub.cocompose.eclipse.model.datatypes.ModelElementsPropertySource
      extended bybe.ac.vub.cocompose.eclipse.model.datatypes.ModelElementPropertySource
All Implemented Interfaces:
IPropertySource

public class ModelElementPropertySource
extends ModelElementsPropertySource

Eclipse property source for a ModelElement.

Since:
0.2.4
Version:
0.2.10, 10/05/2004
Author:
Dennis Wagelaar

Constructor Summary
ModelElementPropertySource(ModelElement subject, ModelElement value, Class elementClass, Object id, String name)
          Creates a PartOfPropertySource
ModelElementPropertySource(ModelElement subject, ModelElement value, Namespace namespace, Class elementClass, Object id, String name)
          Creates a PartOfPropertySource
 
Method Summary
protected  List createPropertyDescriptors()
          Creates the property descriptors list
 Object getPropertyValue(Object id)
           
 ModelElement getValue()
          Gets the value for this property.
 void resetPropertyValue(Object id)
           
 void setPropertyValue(Object id, Object value)
           
protected  void setValue(ModelElement value)
          Sets the value for this property.
 String toString()
           
 
Methods inherited from class be.ac.vub.cocompose.eclipse.model.datatypes.ModelElementsPropertySource
addElement, createDescriptorsArray, createStringArray, getEditableValue, getFullName, getLog, getPossibleValues, getPropertyDescriptors, getSettings, getValues, getValueStrings, isPropertySet, removeElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelElementPropertySource

public ModelElementPropertySource(ModelElement subject,
                                  ModelElement value,
                                  Namespace namespace,
                                  Class elementClass,
                                  Object id,
                                  String name)
Creates a PartOfPropertySource

Parameters:
subject - the subject for which to set the property.
value - the current property value.
namespace - the Namespace in which to look for the property.
elementClass - the Class restriction for possible values.
id - the property id.
name - the property name to be displayed.

ModelElementPropertySource

public ModelElementPropertySource(ModelElement subject,
                                  ModelElement value,
                                  Class elementClass,
                                  Object id,
                                  String name)
Creates a PartOfPropertySource

Parameters:
subject - the subject for which to set the property.
value - the current property value.
elementClass - the Class restriction for possible values.
id - the property id.
name - the property name to be displayed.
Method Detail

getPropertyValue

public Object getPropertyValue(Object id)
Specified by:
getPropertyValue in interface IPropertySource
Overrides:
getPropertyValue in class ModelElementsPropertySource
See Also:
IPropertySource.getPropertyValue(java.lang.Object)

resetPropertyValue

public void resetPropertyValue(Object id)
Specified by:
resetPropertyValue in interface IPropertySource
Overrides:
resetPropertyValue in class ModelElementsPropertySource
See Also:
IPropertySource.resetPropertyValue(java.lang.Object)

setPropertyValue

public void setPropertyValue(Object id,
                             Object value)
Specified by:
setPropertyValue in interface IPropertySource
Overrides:
setPropertyValue in class ModelElementsPropertySource
See Also:
IPropertySource.setPropertyValue(java.lang.Object, java.lang.Object)

toString

public String toString()
Overrides:
toString in class ModelElementsPropertySource
See Also:
Object.toString()

getValue

public ModelElement getValue()
Gets the value for this property.

Returns:
the value for this property.

createPropertyDescriptors

protected List createPropertyDescriptors()
Creates the property descriptors list

Overrides:
createPropertyDescriptors in class ModelElementsPropertySource
Returns:
the property descriptors list

setValue

protected void setValue(ModelElement value)
Sets the value for this property.

Parameters:
value - the value for this property.