The PresentationModel
is used to transform a set of domain models into
a form that is tightly aligned with the view that will be used to display and edit those
domain models. As a consequence, the view becomes free of all logic, and components can
be tested through the presentation model rather than using brittle, click-based testing
via the view.
Presentation models are built as a tree of caplin.presenter.node.PresentationNode
instances, where the root node must extend PresentationModel
, which in turn
extends caplin.presenter.node.PresentationNode.
Attributes | Name and Description |
---|---|
|
caplin.presenter.PresentationModel()
|
Attributes | Name and Description |
---|---|
|
String
getClassName()
Returns the presentation model class name. |
|
caplin.component.frame.ComponentFrame
getComponentFrame()
Presentation models can use this method to receive a reference to the frame containing the caplin.presenter.component.PresenterComponent that this model resides within. |
|
void
setComponentFrame(caplin.component.frame.ComponentFrame oComponentFrame)
Presentation models can use the caplin.presenter.PresentationModel#getComponentFrame to receive a reference to the frame containing the caplin.presenter.component.PresenterComponent that this model resides within. |
►
caplin.presenter.PresentationModel()
PresentationModel
is an abstract base class that all presentation models
must extend, and so is not constructed directly.
►
String
getClassName()
Returns the presentation model class name.
►
caplin.component.frame.ComponentFrame
getComponentFrame()
Presentation models can use this method to receive a reference to the frame containing the caplin.presenter.component.PresenterComponent that this model resides within.
A reference to the presenter component itself can be retrieved by invoking caplin.component.frame.ComponentFrame#getComponent.
►
void
setComponentFrame(caplin.component.frame.ComponentFrame oComponentFrame)
Presentation models can use the caplin.presenter.PresentationModel#getComponentFrame to receive a reference to the frame containing the caplin.presenter.component.PresenterComponent that this model resides within.
A reference to the presenter component itself can be retrieved by invoking caplin.component.frame.ComponentFrame#getComponent.
caplin.component.frame.ComponentFrame | oComponentFrame | The frame within which the presenter component resides. |