Notifying changes in Object (structures) when using multiple Models
Hello,
I am at the moment working on a editor for a configuration class. The class has several lists, some trees and objects some lists share references to object other lists and/or trees. The editor shows the structer in different views, be it either lists, trees and/or comboboxes (depending on the context), mostly the entire structure, sometimes only partial. I use one Model for each view
Now, if I do something as simple as changing the attribute "name" of one object in one view, all the other views needs to be notified. One approach is to make one Model the "master" (this model is allowed to modify the object) and it can notify the "slave" Models when changes occur. The top gui class must then add the respective listeners.
Another approach is to let the editable object add propertychangelisteners. Whenever an attribute is changed with a set-Method, all propertychangelisteners are notified (in this case the models).
I want to use the most elegant approach, but I seem to lack the experience here. Any suggestions?

