Blame view

js/app/views/PlotComponents/PlotLegendSeriesForm.js 2.12 KB
94abdb37   Benjamin Renard   Add params legend...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Project   : AMDA-NG
 * Name      : PlotLegendSeriesForm.js
 * @class   amdaPlotComp.PlotLegendSeriesForm
 * @extends amdaPlotComp.PlotStandardForm
 * @brief   Form to define specifics series legend options
 * @author  Benjamin Renard
 * @version $Id: PlotLegendSeriesForm.js benjamin $
 */

Ext.define('amdaPlotComp.PlotLegendSeriesForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	setObject : function(object) {
		this.object = object.get('panel-legend-series');
94abdb37   Benjamin Renard   Add params legend...
16
17
18
19
20
21
22
23
24
		if (this.object != null)
			this.loadRecord(this.object);
		var legendTypeField = this.getForm().findField('legend-series-type');
		var legendFieldSet = legendTypeField.findParentByType('fieldset');
		legendFieldSet.setVisible(this.object != null);
	},
	
	getFormItems: function() {
		var borderItems = [
f34c9c5a   Benjamin Renard   Finalize color pi...
25
		this.addColorsPicker('legend-series-border-color', 'Border Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
94abdb37   Benjamin Renard   Add params legend...
26
27
28
29
30
31
32
33
34
	    ];
		
		var intervalInfoItems = [
            this.addStandardCombo('legend-series-intervalinfo-type', 'Type', amdaPlotObj.PlotObjectConfig.availableLegendSeriesIntervalInfoTypes)      
	    ];
		
		var legendItems = [
            this.addStandardCombo('legend-series-type', 'Type', amdaPlotObj.PlotObjectConfig.availableLegendSeriesTypes),
            this.addStandardCombo('legend-series-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendSeriesPositions),
f34c9c5a   Benjamin Renard   Finalize color pi...
35
            this.addColorsPicker('legend-series-defaulttextcolor', 'Default Text Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
94abdb37   Benjamin Renard   Add params legend...
36
37
38
39
40
41
            this.addStandardCheck('legend-series-showparaminfo', 'Show Param Info'),
            this.addStandardFieldSet('Show Interval Info', 'legend-series-intervalinfo-activated', intervalInfoItems),
            this.addStandardFieldSet('Border', 'legend-series-border-activated', borderItems),
            this.addStandardFont('legend-series-font')
		];
		
dbb7bcbe   Benjamin Renard   Add curves defint...
42
43
		var me = this;
		
94abdb37   Benjamin Renard   Add params legend...
44
		return [
dbb7bcbe   Benjamin Renard   Add curves defint...
45
            this.addStandardFieldSet('Activate legend', 'legend-series-activated', legendItems, function(name, value, oldValue) {
e84ed2cf   Benjamin Renard   Add Interval Tick...
46
47
            	me.object.set('legend-series-activated', value);
        		me.crtTree.refresh();
dbb7bcbe   Benjamin Renard   Add curves defint...
48
	        })
94abdb37   Benjamin Renard   Add params legend...
49
50
		];
	}
f34c9c5a   Benjamin Renard   Finalize color pi...
51
});