Interface IView

All Known Implementing Classes:
GallowsView, SampleNameSurferView

public interface IView

The IView interface provides a standard protocol for a model to notify a view of changes. A model provides an abstraction of the problem being solved; a view provides a representation of the model, often as a graphical user interface.

Views add themselves to models that implement the IModel interface. The model, in turn, calls the updateView method whenever it changes.

The combination of IModel and IView represent a simplification of the classic Observer pattern. It is not appropriate when a view is observing two or more different models or when model changes are complex and require extra information to be provided to the view. In those instances, use IObserver in place of IView and IObservable in place of IModel.

Byron Weber Becker

Method Summary
 void updateView()
          Update the view.

Method Detail


void updateView()
Update the view. This method is generally called by the model whenever it has changed state.