PlotParam.js
2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* Project : AMDA-NG
* Name : PlotParam.js
* @class amdaModel.PlotParam
* @extends amdaModel.PlotObject
* @brief PlotParam Business Object Definition
* @author Caroline DARMON
* @version $Id: PlotParam.js 2490 2014-08-27 16:08:06Z elena $
******************************************************************************
* FT Id : Date : Name - Description
******************************************************************************
* : :08/09/2011: CDA - file creation
*/
Ext.define('amdaModel.PlotParam', {
extend: 'amdaModel.PlotObject',
statics: {
rowClass : 'plotParamBgColor',
ADD_PARAM_MODE : ['simple','function']
},
fields : [ { name: 'paramArgs', type: 'string', defaultValue: 'select...' },
{ name: 'isScatter', type: 'boolean', defaultValue: true },
{ name: 'downloadParamArgs', defaultValue: null },
{ name: 'needsArgs', type: 'boolean', defaultValue: false },
{ name: 'plotOnly', type: 'boolean', defaultValue: false },
{ name: 'isSpectra', type: 'boolean', defaultValue: false },
{ name: 'yaxe', type: 'boolean', defaultValue: false },
{ name: 'checked', defaultValue: null }
],
belongsTo: 'amdaModel.PlotPanel',
constructor: function(configParam){
this.callParent(arguments);
this.set('id',Ext.id());
this.set('leaf',true);
this.set('rowCls', this.getRowClass());
// set this instance as unmodified
this.commit();
},
getJsonValues: function(){
var myValues = new Object();
myValues.name = this.get('name');
myValues.leaf = true;
myValues.text = this.get('text');
myValues.paramArgs = this.get('paramArgs');
myValues.isScatter = this.get('isScatter');
myValues.needsArgs = this.get('needsArgs');
myValues.plotOnly = this.get('plotOnly');
if (this.get('downloadParamArgs')) {
myValues.downloadParamArgs = this.get('downloadParamArgs');
}
myValues.yaxe = this.get('yaxe');
return myValues;
},
getRowClass: function(){
return amdaModel.PlotParam.rowClass;
}
});