* true: Change to read only.<br>
* false: Change to modifyable
*/
private void changeReadOnlyModeOfPropertyDescriptor(ObjectNode rootNode, String propertyName, boolean readOnly)
{
PropertyNode propertyNode = (PropertyNode) rootNode.findNodeForProperty(propertyName);
if (propertyNode != null)
{
// The clone method of the ObjectNode doesn't clone
// the property descriptor, so we have to do this manually.
PropertyDescriptor pd = propertyNode.getPropertyDescriptor();
try
{
pd = (PropertyDescriptor) pd.clone();
pd.setReadOnly(readOnly);
propertyNode.setPropertyDescriptor(pd);
}
catch (CloneNotSupportedException e)
{
ExceptionUtil.printTrace(e);
}