mvc
Class UpdateManager<T,TM extends NamedModel<? extends T>>

java.lang.Object
  extended by mvc.UpdateManager<T,TM>

public class UpdateManager<T,TM extends NamedModel<? extends T>>
extends java.lang.Object

An UpdateManager manages update communication between a controller and its current model.


Constructor Summary
UpdateManager(TM m, Callback umc, Callback rmc, Callback uvc)
          new UpdateManager(m, umc, rmc, uvc) returns a new update manager for a controller that interacts with m.
 
Method Summary
 TM getModel()
          um.getModel() returns um's current model.
 void setModel(TM m)
          um.setModel(m) replaces um's current model with m.
 void setModelValue()
          um.setModelValue() updates um's current model if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateManager

public UpdateManager(TM m,
                     Callback umc,
                     Callback rmc,
                     Callback uvc)
new UpdateManager(m, umc, rmc, uvc) returns a new update manager for a controller that interacts with m. An update manager will normally be constructed by a controller that provides the callbacks umc, rmc, and uvc.

Parameters:
m - the model whose updates are to be controlled
umc - the callback for updating the model value
rmc - the callback for replacing the model with another model
uvc - the callback for updating the controller's view
Method Detail

setModel

public void setModel(TM m)
um.setModel(m) replaces um's current model with m.

Parameters:
m - the new model

getModel

public TM getModel()
um.getModel() returns um's current model.

Returns:
the current model

setModelValue

public void setModelValue()
um.setModelValue() updates um's current model if necessary.