PlotIntervalsForm.js
1.43 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
/**
* Project : AMDA-NG
* Name : PlotIntervalsForm.js
* @class amdaPlotComp.PlotIntervalsForm
* @extends amdaPlotComp.PlotStandardForm
* @brief Form to define specifics intervals options
* @author Benjamin Renard
* @version $Id: PlotIntervalsForm.js benjamin $
*/
Ext.define('amdaPlotComp.PlotIntervalsForm', {
extend: 'amdaPlotComp.PlotStandardForm',
setObject : function(object) {
this.object = object.get('param-drawing-object');
this.loadRecord(this.object);
this.updateColumnInfoCombo(object.get('paramid'));
},
updateColumnInfoCombo: function(catId){
if (catId.substring(0, 3) === 'cat'){
AmdaAction.getAllColumnNames(catId, function(result){
var combobox = this.getForm().findField('intervals-param-show');
combobox.store.loadData(result['result']);
combobox.reset();
}, this);
}
},
getFormItems: function() {
var legendItems = [
this.addStandardText('legend-text-value', 'Text'),
this.addStandardCombo('legend-text-position', 'Position', amdaDefaultConfigs.availableLegendTextPositions),
this.addStandardFont('legend-text-font')]
return [
this.addColorsPicker('intervals-color', 'Color', amdaDefaultConfigs.availableColorsNew, 'none'),
this.addStandardFieldSet('Show column info','intervals-column-show', [
this.addStandardCombo('intervals-param-show', 'Parameter to show' ),
]),
this.addStandardFieldSet('Legend', 'legend-text-activated', legendItems)
];
}
});