I'm not sure what you mean by things getting "ugly", when listening to more than one variable. I'm no expert in MVC, but consider,
- Placing the
notifyObservers(...)
method in the setter methods of all bound properties (all variables that you want to make listenable. - Only change the bound properties through their setter methods.
- You don't even have to pass the bound property inside of the notifyObservers method. If you desire, you could pass through a null, where you notify the observers that a change in state has occurred, and then the observers can call the getter methods that they are interested in to assess the state of the observed object.
- Consider using PropertyChangeSupport and PropertyChangeListeners instead where you give each bound property its own String constant, and pass into the notification parameter, this String, the old value and the new value. This is what I usually end up doing myself.
Edit
You mention this as a possible solution:
notifyObservers(this);
but I would avoid this as your observers already will receive this information.