ui
Class UIDefectModel

java.lang.Object
  |
  +--ui.UIDefectModel

public class UIDefectModel
extends java.lang.Object

The UIDefectModel provides the observable model for the observing views of the user interface. This model coordinates updates to and from the model and the views that implement the DefectModelListenerInterface. While this could have been implemented using the Observable class provided in the JDK, this implementation is a bit cleaner and more tailored toward the application.


Constructor Summary
UIDefectModel()
          default constructor
UIDefectModel(DefectIntf defect)
          Creates the model and uses the specified defect as the basis of the model
 
Method Summary
 void addDefectModelListener(DefectModelListener listener)
          Adds a new observer to the model
 DefectIntf getActiveDefect()
          Accessor method
 boolean isDirty()
          Determines if the logic model, including projections on the connected views, has been dirtied.
 void setActiveDefect(DefectIntf defect)
          Establishes the specified defect as the new basis for the model
 void UpdateListeners()
          Causes the views to update themselves based on the contents of the model
 void UpdateModel()
          Causes the model to be updated from the information in the views
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIDefectModel

public UIDefectModel()
default constructor

UIDefectModel

public UIDefectModel(DefectIntf defect)
Creates the model and uses the specified defect as the basis of the model
Parameters:
defect - the defect that provides the model basis
Method Detail

setActiveDefect

public void setActiveDefect(DefectIntf defect)
Establishes the specified defect as the new basis for the model
Parameters:
defect - the defect that provides the model basis

isDirty

public boolean isDirty()
Determines if the logic model, including projections on the connected views, has been dirtied.
Returns:
true if the composite model is dirty, false if not

getActiveDefect

public DefectIntf getActiveDefect()
Accessor method

addDefectModelListener

public void addDefectModelListener(DefectModelListener listener)
Adds a new observer to the model
Parameters:
listener - new view to this model

UpdateListeners

public void UpdateListeners()
Causes the views to update themselves based on the contents of the model

UpdateModel

public void UpdateModel()
Causes the model to be updated from the information in the views