1
|
/*
|
2
|
Author: Mike Adair mike.adairATccrs.nrcan.gc.ca
|
3
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
4
|
|
5
|
$Id: ModelStatus.js 1671 2005-09-20 02:37:54Z madair1 $
|
6
|
*/
|
7
|
|
8
|
// Ensure this object's dependancies are loaded.
|
9
|
mapbuilder.loadScript(baseDir+"/widget/WidgetBaseXSL.js");
|
10
|
|
11
|
/**
|
12
|
* Widget to display the status of a model, repainted whenever the model status
|
13
|
* param is set.
|
14
|
* TBD: not yet completed
|
15
|
*
|
16
|
* @constructor
|
17
|
* @base WidgetBaseXSL
|
18
|
* @param widgetNode This widget's object node from the configuration document.
|
19
|
* @param model The model that this widget is a view of.
|
20
|
*/
|
21
|
|
22
|
function ModelStatus(widgetNode, model) {
|
23
|
WidgetBaseXSL.apply(this,new Array(widgetNode, model));
|
24
|
|
25
|
/**
|
26
|
* initializes stylesheet parameters for the widget
|
27
|
* @param objRef Pointer to this widget object.
|
28
|
*/
|
29
|
this.prePaint = function(objRef) {
|
30
|
objRef.stylesheet.setParameter("statusMessage", objRef.targetModel.getParam("modelStatus"));
|
31
|
}
|
32
|
this.model.addListener("modelStatus",this.paint,this);
|
33
|
}
|
34
|
|