becker.util
Class AbstractModel

java.lang.Object
  extended by becker.util.AbstractModel
All Implemented Interfaces:
IModel

public class AbstractModel
extends Object
implements IModel

An implementation of IModel. Classes needing to implement IModel may extend this class to ease their implementation.

Author:
Byron Weber Becker

Field Summary
protected  List<IView> views
           
 
Constructor Summary
AbstractModel()
          Create a new AbstractModel.
 
Method Summary
 void addView(IView aView)
          Add a view to a list of views.
 void removeView(IView aView)
          Remove a specific view from the list of views.
 void updateAllViews()
          Update all the views that have been added to this model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

views

protected List<IView> views
Constructor Detail

AbstractModel

public AbstractModel()
Create a new AbstractModel.

Method Detail

addView

public void addView(IView aView)
Add a view to a list of views. Each view is notified each time an event occurs that changes the state of the model.

Specified by:
addView in interface IModel
Parameters:
aView - The view to add.

removeView

public void removeView(IView aView)
Remove a specific view from the list of views.

Specified by:
removeView in interface IModel
Parameters:
aView - The view to remove.

updateAllViews

public void updateAllViews()
Update all the views that have been added to this model.

Specified by:
updateAllViews in interface IModel