Sets the property with the given id if possible. Does nothing if the
property's value cannot be changed or if this source does not have the
specified property.
In general, a property source should not directly reference the value
parameter unless it is an atomic object that can be shared, such as a
string.
An important reason for this is that several property sources with
compatible descriptors could be appearing in the property sheet at the
same time. An editor produces a single edited value which is passed as
the value parameter of this message to all the property sources. Thus to
avoid a situation where all of the property sources reference the same
value they should use the value parameter to create a new instance of the
real value for the given property.
There is another reason why a level of indirection is useful. The real
value of property may be a type that cannot be edited with a standard
cell editor. However instead of returning the real value in
getPropertyValue
, the value could be converted to a
String
which could be edited with a standard cell editor.
The edited value will be passed to this method which can then turn it
back into the real property value.
Another variation on returning a value other than the real property value
in getPropertyValue
is to return a value which is an
IPropertySource
(or for which the property sheet can
obtain an IPropertySource
). In this case the value to
edit is obtained from the child property source using
getEditableValue
. It is this editable value that will be
passed back via this method when it has been editted