Interface View

All Known Subinterfaces:
PropertyView, SwingSubView
All Known Implementing Classes:
Page, SAction, SButton, SCheckBox, SComboBox, ServletView, SLabel, SList, SMenuItem, SModelAction, SModelButton, SPanel, SPasswordField, SRadioButton, SSlider, STable, STextArea, STextField, SwingView

public interface View

A View implements the presentation of a model object to the user and allows interaction with the model object. Implementations can be bound to a model and change the state of the model as the user interacts with the View. If the View implements ModelChangeListener then it can also update in response to changes in the state of bound models that implement ModelChangeEventSource. A View can also issue Controls to its parent Controller in response to user interaction that influences with application logic.

A View is bound to a single model object, i.e. it presents some or all of the data in the bound model.

If a View needs to show data from multiple models, it will be bound to a parent model that contains those multiple models as accessible properties. Think of this parent container as an implementation view model rather than a business/domain model.

A View is created and displayed by a parent Controller the implements application/presentation logic.

$Revision: 1.5 $ $Date: 2002/09/06 16:11:47 $
Steve Meyfroidt
See Also:
Controller, org.scopemvc.view.swing, org.scopemvc.view.servlet.xml

Method Summary
 java.lang.Object getBoundModel()
          Gets the model object bound to this View.
 Controller getController()
          Gets the Controller for this View
 void issueControl(Control inControl)
          Issue a Control to the View's parent (owner) Controller.
 void setBoundModel(java.lang.Object inModel)
          Sets the model object bound to this View.
 void setController(Controller inController)
          Sets the Controller for this View

Method Detail


public java.lang.Object getBoundModel()
Gets the model object bound to this View.

the model object this View is bound to.


public void setBoundModel(java.lang.Object inModel)
Sets the model object bound to this View.

inModel - a model object that this View will bind to to present to the user.


public Controller getController()
Gets the Controller for this View

the parent (owner) Controller or null if none.


public void setController(Controller inController)
Sets the Controller for this View

inController - assign a parent (owner) Controller that this View will issue Controls to.


public void issueControl(Control inControl)
Issue a Control to the View's parent (owner) Controller.

inControl - The Control to issue

Copyright © 2000-2002 The Scope Team. All Rights Reserved.