if (attribute instanceof Settable) {
// Use a MoMLChangeRequest so that visual rendition (if
// any) is updated and listeners are notified.
String moml = "<property name=\"" + name + "\" value=\""
+ value + "\"/>";
MoMLChangeRequest request = new MoMLChangeRequest(this, model,
moml);
model.requestChange(request);
} else {
attribute = getAttribute(name);
if (attribute instanceof Settable) {
// Use a MoMLChangeRequest so that visual rendition (if
// any) is updated and listeners are notified.
String moml = "<property name=\"" + name + "\" value=\""
+ value + "\"/>";
MoMLChangeRequest request = new MoMLChangeRequest(this,
this, moml);
model.requestChange(request);
}
attribute = getAttribute(name);
}
if (model instanceof CompositeActor) {
ptolemy.actor.Director director = ((CompositeActor) model)
.getDirector();
if (director != null) {
attribute = director.getAttribute(name);
if (attribute instanceof Settable) {
// Use a MoMLChangeRequest so that
// visual rendition (if any) is
// updated and listeners are notified.
String moml = "<property name=\"" + name
+ "\" value=\"" + value + "\"/>";
MoMLChangeRequest request = new MoMLChangeRequest(this,
director, moml);
director.requestChange(request);
}
}
}