Blame view

js/app/models/PlotObjects/PlotPanelObject.js 20.8 KB
abe09878   Benjamin Renard   Add panels and ax...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * Project      : AMDA-NG
 * Name         : PlotPanelObject.js
 * @class   amdaPlotObj.PlotPanelObject
 * @extends Ext.data.Model
 * @brief   Plot Panel Business Object Definition 
 * @author  Benjamin Renard
 * @version $Id: PlotPanelObject.js benjamin $
 ******************************************************************************
 *    FT Id     :   Date   : Name - Description
 ******************************************************************************
 *	:           :13/08/2015: BRE  - file creation
 */
 
 		
Ext.define('amdaPlotObj.PlotPanelObject', {
	extend: 'Ext.data.Model',
dbb7bcbe   Benjamin Renard   Add curves defint...
18
	idProperty: 'id',
17433635   Benjamin Renard   Add series and sp...
19
	
abe09878   Benjamin Renard   Add panels and ax...
20
21
	requires: [
	           'amdaPlotObj.PlotObjectConfig',
17433635   Benjamin Renard   Add series and sp...
22
	           'amdaPlotObj.PlotAxisObject',
94abdb37   Benjamin Renard   Add params legend...
23
	           'amdaPlotObj.PlotParamObject',
339866c4   Benjamin Renard   Add text legend d...
24
	           'amdaPlotObj.PlotLegendSeriesObject',
829160b3   Benjamin Renard   Add constants def...
25
	           'amdaPlotObj.PlotLegendTextObject',
a8c54fb9   Benjamin Renard   Add text object p...
26
	           'amdaPlotObj.PlotConstantObject',
dbb7bcbe   Benjamin Renard   Add curves defint...
27
	           'amdaPlotObj.PlotTextObject',
486cc3c7   Benjamin Renard   Add fill elements...
28
29
	           'amdaPlotObj.PlotCurveObject',
	           'amdaPlotObj.PlotFillObject'
abe09878   Benjamin Renard   Add panels and ax...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	],
	
	fields : [
	          {name: 'id', type: 'string'},
	          {name: 'panel-background-color', type: 'string'},
              {name: 'panel-title-text', type: 'string'},
              {name: 'panel-title-color', type: 'string'},
              {name: 'panel-title-position', type: 'string'},
              {name: 'panel-title-alignment', type: 'string'},
              {name: 'panel-title-font-activated', type: 'boolean'},
              {name: 'panel-title-font-name', type: 'string'},
              {name: 'panel-title-font-size', type: 'int'},
              {name: 'panel-title-font-bold', type: 'boolean'},
              {name: 'panel-title-font-italic', type: 'boolean'},
abe09878   Benjamin Renard   Add panels and ax...
44
45
46
47
48
              {name: 'panel-plot-type', type: 'string'},
              {name: 'panel-font-activated', type: 'boolean'},
              {name: 'panel-font-name', type: 'string'},
              {name: 'panel-font-size', type: 'int'},
              {name: 'panel-font-bold', type: 'boolean'},
a0bf9157   Benjamin Renard   Add tick plot and...
49
              {name: 'panel-font-italic', type: 'boolean'},
003ba315   Benjamin Renard   Add Epoch Plot an...
50
51
52
53
54
55
56
57
58
59
60
61
              //Only used with layout Manual
              {name: 'panel-bounds-x', type: 'float'},
              {name: 'panel-bounds-y', type: 'float'},
              {name: 'panel-bounds-width', type: 'float'},
              {name: 'panel-bounds-height', type: 'float'},
              {name: 'panel-margin-left', type: 'float', useNull:true},
              {name: 'panel-margin-right', type: 'float', useNull:true},
              //Only used with layout Vertical
              {name: 'panel-prefered-width', type: 'float', useNull:true},
              {name: 'panel-prefered-height', type: 'float', useNull:true},
              //Only used for xyPlot
              {name: 'panel-scatter-isotropic', type: 'boolean'},
a0bf9157   Benjamin Renard   Add tick plot and...
62
63
64
65
              //Only used for statusPlot and timePlot
              {name: 'panel-status-position', type: 'string'},
              {name: 'panel-status-colormap', type: 'int'},
              //Only used for tickPlot and timePlot
003ba315   Benjamin Renard   Add Epoch Plot an...
66
67
              {name: 'panel-tick-format', type: 'int'},
              //Only used for epochPlot
6a801541   Benjamin Renard   Add possibility t...
68
69
70
71
72
73
74
75
76
77
78
79
              {name: 'panel-epoch-centertimeid', type: 'string'},
              //Only used for instantPlot
              {name: 'panel-instant-time', type: 'date',
            	  defaultValue:Ext.Date.add(Ext.Date.clearTime(new Date()),Ext.Date.DAY,-1),
            	  convert: function(value,rec) {
            		  if (!Ext.isDate(value)) {
            		    var valueString = new String(value);
            		    var date = new Date(valueString.replace(/\-/g,'\/').replace(/[T|Z]/g,' '));
            		      return date;
            		  }
            		  return value;
            	  }
94abdb37   Benjamin Renard   Add params legend...
80
81
              },
              //Only used for timePlot, xyPlot, epochPlot and instantPlot
dbb7bcbe   Benjamin Renard   Add curves defint...
82
83
84
85
86
87
              {name: 'panel-legend-series', type: 'auto', defaultValue: null},
              
              {name: 'last-param-id', type: 'int', defaultValue:0},
              {name: 'last-textlegend-id', type: 'int', defaultValue:0},
              {name: 'last-constant-id', type: 'int', defaultValue:0},
              {name: 'last-textobj-id', type: 'int', defaultValue:0},
486cc3c7   Benjamin Renard   Add fill elements...
88
89
              {name: 'last-curve-id', type: 'int', defaultValue:0},
              {name: 'last-fill-id', type: 'int', defaultValue:0}
abe09878   Benjamin Renard   Add panels and ax...
90
91
92
93
94
95
96
97
98
    ],
    
    associations : [
              {
            	  type : 'hasMany', 
            	  model : 'amdaPlotObj.PlotAxisObject',
            	  name  : 'axes'
              },
              {
17433635   Benjamin Renard   Add series and sp...
99
100
101
102
103
            	  type : 'hasMany', 
            	  model : 'amdaPlotObj.PlotParamObject',
            	  name  : 'params'
              },
              {
339866c4   Benjamin Renard   Add text legend d...
104
105
106
107
108
            	  type : 'hasMany', 
            	  model : 'amdaPlotObj.PlotLegendTextObject',
            	  name  : 'textLegends'
              },
              {
829160b3   Benjamin Renard   Add constants def...
109
110
111
112
113
            	  type : 'hasMany', 
            	  model : 'amdaPlotObj.PlotConstantObject',
            	  name  : 'constants'
              },
              {
a8c54fb9   Benjamin Renard   Add text object p...
114
115
116
117
118
            	  type : 'hasMany',
            	  model : 'amdaPlotObj.PlotTextObject',
            	  name : 'textObjs'
              },
              {
dbb7bcbe   Benjamin Renard   Add curves defint...
119
120
121
122
123
            	  type : 'hasMany',
            	  model : 'amdaPlotObj.PlotCurveObject',
            	  name : 'curves'
              },
              {
486cc3c7   Benjamin Renard   Add fill elements...
124
125
126
127
128
            	  type : 'hasMany',
            	  model : 'amdaPlotObj.PlotFillObject',
            	  name : 'fills'
              },
              {
abe09878   Benjamin Renard   Add panels and ax...
129
            	  type  : 'belongsTo',
17433635   Benjamin Renard   Add series and sp...
130
                  model : 'amdaPlotObj.PlotTabObject'
abe09878   Benjamin Renard   Add panels and ax...
131
132
133
              }
    ],
    
18d4a11e   Benjamin Renard   Save and load plo...
134
135
136
137
138
139
140
141
142
    constructor: function(){
        var me = this;
        me.callParent(arguments);
        if ((arguments.length > 0) && arguments[0])
        {
        	if (arguments[0].axes)
        		me.loadAxes(arguments[0].axes);
        	if (arguments[0].params)
        		me.loadParams(arguments[0].params);
339866c4   Benjamin Renard   Add text legend d...
143
144
        	if (arguments[0].textLegends)
        		me.loadTextLegends(arguments[0].textLegends);
829160b3   Benjamin Renard   Add constants def...
145
146
        	if (arguments[0].constants)
        		me.loadConstants(arguments[0].constants);
a8c54fb9   Benjamin Renard   Add text object p...
147
148
        	if (arguments[0].textObjs)
        		me.loadTextObjs(arguments[0].textObjs);
dbb7bcbe   Benjamin Renard   Add curves defint...
149
150
        	if (arguments[0].curves)
        		me.loadCurves(arguments[0].curves);
486cc3c7   Benjamin Renard   Add fill elements...
151
152
        	if (arguments[0].fills)
        		me.loadFills(arguments[0].fills);
18d4a11e   Benjamin Renard   Save and load plo...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
        }
        else
        {
        	//new object, set default fields values
        	me.setDefaultValues();
        }
    },
    
    loadAxes: function(axes)
    {
       this.axes().loadData(axes);
    },
    
    loadParams: function(params)
    {
       this.params().loadData(params);
    },
    
339866c4   Benjamin Renard   Add text legend d...
171
172
173
174
175
    loadTextLegends: function(textLegends)
    {
       this.textLegends().loadData(textLegends);
    },
    
829160b3   Benjamin Renard   Add constants def...
176
177
178
179
180
    loadConstants: function(constants)
    {
       this.constants().loadData(constants);
    },
    
a8c54fb9   Benjamin Renard   Add text object p...
181
182
183
184
185
    loadTextObjs: function(textObjs)
    {
    	this.textObjs().loadData(textObjs);
    },
    
dbb7bcbe   Benjamin Renard   Add curves defint...
186
187
188
189
190
    loadCurves: function(curves)
    {
    	this.curves().loadData(curves);
    },
    
486cc3c7   Benjamin Renard   Add fill elements...
191
192
193
194
195
    loadFills: function(fills)
    {
    	this.fills().loadData(fills);
    },
    
abe09878   Benjamin Renard   Add panels and ax...
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
    initAxes : function()
    {
    	this.axes().removeAll();
    	switch (this.get('panel-plot-type'))
    	{
    	case 'timePlot' :
    		//Time axis
    		var recs = this.axes().add({id : 'time'});
        	recs[0].setDefaultValues('time');
        	//Y Left Axis
        	recs = this.axes().add({id : 'y-left'});
        	recs[0].setDefaultValues('y-left');
        	//Y Right Axis
        	recs = this.axes().add({id : 'y-right'});
        	recs[0].setDefaultValues('y-right');
        	//Color Axis
        	recs = this.axes().add({id : 'color'});
        	recs[0].setDefaultValues('color');
    		break;
    	case 'xyPlot' :
abe09878   Benjamin Renard   Add panels and ax...
216
217
218
219
220
221
222
223
224
225
226
227
228
    		//X Axis
    		var recs = this.axes().add({id : 'x'});
        	recs[0].setDefaultValues('x');
        	//Y Left Axis
        	recs = this.axes().add({id : 'y-left'});
        	recs[0].setDefaultValues('y-left');
        	//Y Right Axis
        	recs = this.axes().add({id : 'y-right'});
        	recs[0].setDefaultValues('y-right');
        	//Color Axis
        	recs = this.axes().add({id : 'color'});
        	recs[0].setDefaultValues('color');
    		break;
6a801541   Benjamin Renard   Add possibility t...
229
230
231
232
233
234
235
236
237
238
239
    	case 'instantPlot' :
    		//X Axis
    		var recs = this.axes().add({id : 'x'});
        	recs[0].setDefaultValues('x');
        	//Y Left Axis
        	recs = this.axes().add({id : 'y-left'});
        	recs[0].setDefaultValues('y-left');
        	//Color Axis
        	recs = this.axes().add({id : 'color'});
        	recs[0].setDefaultValues('color');
    		break;
abe09878   Benjamin Renard   Add panels and ax...
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    	case 'epochPlot' :
    		//Epoch Axis
    		var recs = this.axes().add({id : 'epoch'});
        	recs[0].setDefaultValues('epoch');
        	//Y Left Axis
        	recs = this.axes().add({id : 'y-left'});
        	recs[0].setDefaultValues('y-left');
        	//Y Right Axis
        	recs = this.axes().add({id : 'y-right'});
        	recs[0].setDefaultValues('y-right');
        	//Color Axis
        	recs = this.axes().add({id : 'color'});
        	recs[0].setDefaultValues('color');
    		break;
    	case 'statusPlot' :
    	case 'tickPlot' :
    		//Time axis
    		var recs = this.axes().add({id : 'time'});
        	recs[0].setDefaultValues('time');
    		break;
    	}
    },
    
17433635   Benjamin Renard   Add series and sp...
263
    createNewParam: function() {
dbb7bcbe   Benjamin Renard   Add curves defint...
264
    	this.set('last-param-id', this.get('last-param-id') + 1);
fd5552a4   Benjamin Renard   Info for plot ele...
265
    	var recs = this.params().add({id : this.get('last-param-id')});
a0bf9157   Benjamin Renard   Add tick plot and...
266
267
    	var availableDrawingObjects = recs[0].getAvailableDrawingObjectByPlotType(this.get('panel-plot-type'));
    	recs[0].updateDrawingType(availableDrawingObjects[0].key, true);
17433635   Benjamin Renard   Add series and sp...
268
269
270
271
272
273
274
275
276
277
278
279
		return recs[0];
    },
    
    removeParamById: function(paramId) {
    	//Retrieve param record
    	var paramRecord = this.params().getById(paramId);
    	if (paramRecord == null)
    		return false;
    	this.params().remove(paramRecord);
    	return true;
    },
    
339866c4   Benjamin Renard   Add text legend d...
280
    createNewTextLegend: function() {
dbb7bcbe   Benjamin Renard   Add curves defint...
281
    	this.set('last-textlegend-id', this.get('last-textlegend-id') + 1);
fd5552a4   Benjamin Renard   Info for plot ele...
282
    	var recs = this.textLegends().add({id : this.get('last-textlegend-id')});
339866c4   Benjamin Renard   Add text legend d...
283
284
285
286
287
288
289
290
291
292
293
294
295
    	recs[0].setDefaultValues();
    	return recs[0];
    },
    
    removeTextLegendById: function(legendId) {
    	//Retrieve text legend record
    	var textLegendRecord = this.textLegends().getById(legendId);
    	if (textLegendRecord == null)
    		return false;
    	this.textLegends().remove(textLegendRecord);
    	return true;
    },
    
829160b3   Benjamin Renard   Add constants def...
296
    createNewConstant: function() {
dbb7bcbe   Benjamin Renard   Add curves defint...
297
    	this.set('last-constant-id', this.get('last-constant-id') + 1);
fd5552a4   Benjamin Renard   Info for plot ele...
298
    	var recs = this.constants().add({id : this.get('last-constant-id')});
829160b3   Benjamin Renard   Add constants def...
299
300
301
302
303
304
305
306
307
308
309
310
311
    	recs[0].setDefaultValues();
    	return recs[0];
    },
    
    removeConstantById: function(constantId) {
    	//Retrieve constant record
    	var constantRecord = this.constants().getById(constantId);
    	if (constantRecord == null)
    		return false;
    	this.constants().remove(constantRecord);
    	return true;
    },
    
a8c54fb9   Benjamin Renard   Add text object p...
312
    createNewTextObject: function() {
dbb7bcbe   Benjamin Renard   Add curves defint...
313
    	this.set('last-textobj-id', this.get('last-textobj-id') + 1);
fd5552a4   Benjamin Renard   Info for plot ele...
314
    	var recs = this.textObjs().add({id : this.get('last-textobj-id')});
a8c54fb9   Benjamin Renard   Add text object p...
315
316
317
318
319
320
321
322
323
324
325
326
327
    	recs[0].setDefaultValues();
    	return recs[0];
    },
    
    removeTextObjectById: function(textObjId) {
    	//Retrieve text object record
    	var textObjRecord = this.textObjs().getById(textObjId);
    	if (textObjRecord == null)
    		return false;
    	this.textObjs().remove(textObjRecord);
    	return true;
    },
    
dbb7bcbe   Benjamin Renard   Add curves defint...
328
329
    createNewCurve: function() {
    	this.set('last-curve-id', this.get('last-curve-id') + 1);
fd5552a4   Benjamin Renard   Info for plot ele...
330
    	var recs = this.curves().add({id : this.get('last-curve-id')});
dbb7bcbe   Benjamin Renard   Add curves defint...
331
332
333
334
335
336
337
338
339
340
341
342
343
    	recs[0].setDefaultValues();
    	return recs[0];
    },
    
    removeCurveById: function(curveId) {
    	//Retrieve curve record
    	var curveRecord = this.curves().getById(curveId);
    	if (curveRecord == null)
    		return false;
    	this.curves().remove(curveRecord);
    	return true;
    },
    
486cc3c7   Benjamin Renard   Add fill elements...
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
    createNewFill: function() {
    	this.set('last-fill-id', this.get('last-fill-id') + 1);
    	var recs = this.fills().add({id : this.get('last-fill-id')});
    	recs[0].setDefaultValues();
    	return recs[0];
    },
    
    removeFillById: function(fillId) {
    	//Retrieve fill record
    	var fillRecord = this.fills().getById(fillId);
    	if (fillRecord == null)
    		return false;
    	this.fills().remove(fillRecord);
    	return true;
    },
    
003ba315   Benjamin Renard   Add Epoch Plot an...
360
361
362
    updatePlotType: function(plotType, forceUpdate) {
    	forceUpdate = (typeof forceUpdate !== 'undefined') ? forceUpdate : false;
    	
a0bf9157   Benjamin Renard   Add tick plot and...
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
    	if (!forceUpdate && (plotType == this.get('panel-plot-type')))
    		return;
    	
    	this.set('panel-plot-type', plotType);
    	this.params().each(function (param, index) {
    		var availableDrawingObjects = param.getAvailableDrawingObjectByPlotType(plotType);
    		var compatibleDrawingType = false;
    		Ext.each(availableDrawingObjects, function (item, index) {
    			if (param.get('param-drawing-type') == item.key)
    			{
    				compatibleDrawingType = true;
    			}
    		});
    		if (!compatibleDrawingType)
    		{
    			param.updateDrawingType(availableDrawingObjects[0].key, forceUpdate);
    		}
    	});
    	this.initAxes();
94abdb37   Benjamin Renard   Add params legend...
382
383
384
385
386
387
388
389
390
391
    	
    	if ((plotType == 'timePlot') || (plotType == 'xyPlot') || (plotType == 'epochPlot') || (plotType == 'instantPlot'))
    	{
    		if (this.get('panel-legend-series') == null)
    		{
    			this.set('panel-legend-series', new amdaPlotObj.PlotLegendSeriesObject());
    			this.get('panel-legend-series').setDefaultValues();
    		}
    	}
    	else
339866c4   Benjamin Renard   Add text legend d...
392
    	{
94abdb37   Benjamin Renard   Add params legend...
393
    		this.set('panel-legend-series', null);
339866c4   Benjamin Renard   Add text legend d...
394
395
    		this.textLegends().removeAll();
    	}
fd5552a4   Benjamin Renard   Info for plot ele...
396
397
398
399
400
401
    	
    	if ((plotType == 'tickPlot') || (plotType == 'statusPlot'))
    	{
    		this.textObjs().removeAll();
    		this.constants().removeAll();
    		this.curves().removeAll();
486cc3c7   Benjamin Renard   Add fill elements...
402
    		this.fills().removeAll();
fd5552a4   Benjamin Renard   Info for plot ele...
403
404
405
    	}
    	else if (plotType != 'xyPlot')
    		this.curves().removeAll();
a0bf9157   Benjamin Renard   Add tick plot and...
406
407
    },
    
abe09878   Benjamin Renard   Add panels and ax...
408
409
410
411
412
413
414
415
416
417
418
419
420
421
    setDefaultValues: function()
    {
    	this.set('panel-background-color', amdaPlotObj.PlotObjectConfig.defaultValues.panel.backgroundColor);
    	this.set('panel-title-text', '');
    	this.set('panel-title-color', amdaPlotObj.PlotObjectConfig.defaultValues.panel.title.color);
    	this.set('panel-title-position', amdaPlotObj.PlotObjectConfig.defaultValues.panel.title.position);
    	this.set('panel-title-alignment', amdaPlotObj.PlotObjectConfig.defaultValues.panel.title.alignment);
    	
    	this.set('panel-title-font-activated', false);
    	this.set('panel-title-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.name);
    	this.set('panel-title-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.size);
    	this.set('panel-title-font-bold', false);
    	this.set('panel-title-font-italic', false);
    	
abe09878   Benjamin Renard   Add panels and ax...
422
423
424
425
426
427
    	this.set('panel-font-activated', false);
    	this.set('panel-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.name);
    	this.set('panel-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.size);
    	this.set('panel-font-bold', false);
    	this.set('panel-font-italic', false);
    	
003ba315   Benjamin Renard   Add Epoch Plot an...
428
429
430
431
432
433
434
435
436
437
438
439
440
    	this.set('panel-bounds-x', 0);
    	this.set('panel-bounds-y', 0);
    	this.set('panel-bounds-width', 1);
    	this.set('panel-bounds-height', 1);
    	
    	this.set('panel-margin-left', null);
    	this.set('panel-margin-right', null);
    	
    	this.set('panel-prefered-width', null);
    	this.set('panel-prefered-height', null);
    	
    	this.set('panel-scatter-isotropic', false);
    	
a0bf9157   Benjamin Renard   Add tick plot and...
441
442
443
444
445
    	this.set('panel-status-position', amdaPlotObj.PlotObjectConfig.defaultValues.panel.status.position);
    	this.set('panel-status-colormap', amdaPlotObj.PlotObjectConfig.defaultValues.panel.status.colorMap);
    	
    	this.set('panel-tick-format', "");
    	
003ba315   Benjamin Renard   Add Epoch Plot an...
446
447
    	this.set('panel-epoch-centertimeid', "");
    	
a0bf9157   Benjamin Renard   Add tick plot and...
448
    	this.updatePlotType(amdaPlotObj.PlotObjectConfig.defaultValues.panel.plotType);
abe09878   Benjamin Renard   Add panels and ax...
449
450
    },
    
fd5552a4   Benjamin Renard   Info for plot ele...
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
    getPanelShortInfo : function()
    {
    	var type = amdaPlotObj.PlotObjectConfig.getValueByKey(amdaPlotObj.PlotObjectConfig.availablePlotTypes, this.get('panel-plot-type'));
		var info = 'Id = '+this.get('id')+', '+type;
		switch (this.get('panel-plot-type'))
		{
		case 'instantPlot' :
			info += (', '+Ext.Date.format(this.get('panel-instant-time'), "Y/m/d H:i:s"));
			break;
		case 'epochPlot' :
			info += (', '+this.get('panel-epoch-centertimeid'));
			break;
		case 'xyPlot' :
			if (this.get('panel-scatter-isotropic'))
				info += ', Isotropic';
			break;
		}
		return info;
    },
    
17433635   Benjamin Renard   Add series and sp...
471
    getJsonValues : function() 
abe09878   Benjamin Renard   Add panels and ax...
472
473
474
    {
    	var panelValues  = new Object();
    	
dbb7bcbe   Benjamin Renard   Add curves defint...
475
476
    	panelValues['id'] = this.get('id');
    	
abe09878   Benjamin Renard   Add panels and ax...
477
478
479
480
481
482
483
484
485
486
    	panelValues['panel-background-color'] = this.get('panel-background-color');
    	panelValues['panel-title-text'] = this.get('panel-title-text');
    	panelValues['panel-title-color'] = this.get('panel-title-color');
    	panelValues['panel-title-position'] = this.get('panel-title-position');
    	panelValues['panel-title-alignment'] = this.get('panel-title-alignment');
    	panelValues['panel-title-font-activated'] = this.get('panel-title-font-activated');
    	panelValues['panel-title-font-name'] = this.get('panel-title-font-name');
    	panelValues['panel-title-font-size'] = this.get('panel-title-font-size');
    	panelValues['panel-title-font-bold'] = this.get('panel-title-font-bold');
    	panelValues['panel-title-font-italic'] = this.get('panel-title-font-italic');
abe09878   Benjamin Renard   Add panels and ax...
487
488
489
490
491
492
493
    	panelValues['panel-plot-type'] = this.get('panel-plot-type');
    	panelValues['panel-font-activated'] = this.get('panel-font-activated');
    	panelValues['panel-font-name'] = this.get('panel-font-name');
    	panelValues['panel-font-size'] = this.get('panel-font-size');
    	panelValues['panel-font-bold'] = this.get('panel-font-bold');
    	panelValues['panel-font-italic'] = this.get('panel-font-italic');
    	
003ba315   Benjamin Renard   Add Epoch Plot an...
494
495
496
497
498
499
500
501
502
503
504
505
506
507
    	panelValues['panel-bounds-x']      = this.get('panel-bounds-x');
    	panelValues['panel-bounds-y']      = this.get('panel-bounds-y');
    	panelValues['panel-bounds-width']  = this.get('panel-bounds-width');
    	panelValues['panel-bounds-height'] = this.get('panel-bounds-height');
    	
    	panelValues['panel-margin-left'] = this.get('panel-margin-left') ? this.get('panel-margin-left') : -1;
    	panelValues['panel-margin-right'] = this.get('panel-margin-right') ? this.get('panel-margin-right') : -1;
    	
    	panelValues['panel-prefered-width'] = this.get('panel-prefered-width') ? this.get('panel-prefered-width') : -1;
    	panelValues['panel-prefered-height'] = this.get('panel-prefered-height') ? this.get('panel-prefered-height') : -1;
    	
    	if (this.get('panel-plot-type') == 'xyPlot')
    		panelValues['panel-scatter-isotropic'] = this.get('panel-scatter-isotropic');
    	
a0bf9157   Benjamin Renard   Add tick plot and...
508
509
510
511
512
513
514
515
516
517
518
    	if ((this.get('panel-plot-type') == 'statusPlot') || (this.get('panel-plot-type') == 'timePlot'))
    	{
    		panelValues['panel-status-position'] = this.get('panel-status-position');
    		panelValues['panel-status-colormap'] = this.get('panel-status-colormap');
    	}
    	
    	if ((this.get('panel-plot-type') == 'tickPlot') || (this.get('panel-plot-type') == 'timePlot'))
    	{
    		panelValues['panel-tick-format'] = this.get('panel-tick-format');
    	}
    	
003ba315   Benjamin Renard   Add Epoch Plot an...
519
520
521
    	if (this.get('panel-plot-type') == 'epochPlot')
    		panelValues['panel-epoch-centertimeid'] = this.get('panel-epoch-centertimeid');
    	
6a801541   Benjamin Renard   Add possibility t...
522
523
524
    	if (this.get('panel-plot-type') == 'instantPlot')
    		panelValues['panel-instant-time'] = this.get('panel-instant-time');
    	
94abdb37   Benjamin Renard   Add params legend...
525
526
527
    	if ((this.get('panel-legend-series') != null) && this.get('panel-legend-series').get('legend-series-activated'))
    		panelValues['panel-series-legend'] = this.get('panel-legend-series').getJsonValues();
    	
339866c4   Benjamin Renard   Add text legend d...
528
529
530
531
532
533
    	panelValues['text-legends'] = [];
    	
    	this.textLegends().each(function (legend, index) {
    		panelValues['text-legends'][index] = legend.getJsonValues();
    	});
    	
829160b3   Benjamin Renard   Add constants def...
534
535
536
537
538
539
    	panelValues['constants'] = [];
    	
    	this.constants().each(function (constant, index) {
    		panelValues['constants'][index] = constant.getJsonValues();
    	});
    	
a8c54fb9   Benjamin Renard   Add text object p...
540
541
542
543
544
545
    	panelValues['textObjs'] = [];
    	
    	this.textObjs().each(function (textObj, index) {
    		panelValues['textObjs'][index] = textObj.getJsonValues();
    	});
    	
dbb7bcbe   Benjamin Renard   Add curves defint...
546
547
548
549
550
551
    	panelValues['curves'] = [];
    	
    	this.curves().each(function (curve, index) {
    		panelValues['curves'][index] = curve.getJsonValues();
    	});
    	
486cc3c7   Benjamin Renard   Add fill elements...
552
553
554
555
556
557
    	panelValues['fills'] = [];
    	
    	this.fills().each(function (fill, index) {
    		panelValues['fills'][index] = fill.getJsonValues();
    	});
    	
abe09878   Benjamin Renard   Add panels and ax...
558
559
560
561
562
563
    	panelValues['axes'] = [];
    	
    	this.axes().each(function (axe, index) {
    		panelValues['axes'][index] = axe.getJsonValues();
    	});
    	
17433635   Benjamin Renard   Add series and sp...
564
565
566
567
568
569
    	panelValues['params'] = [];
    	
    	this.params().each(function (param, index) {
    		panelValues['params'][index] = param.getJsonValues();
    	});
    	
dbb7bcbe   Benjamin Renard   Add curves defint...
570
571
572
573
574
    	panelValues['last-param-id'] = this.get('last-param-id');
    	panelValues['last-textlegend-id'] = this.get('last-textlegend-id');
    	panelValues['last-constant-id'] = this.get('last-constant-id');
    	panelValues['last-textobj-id'] = this.get('last-textobj-id');
    	panelValues['last-curve-id'] = this.get('last-curve-id');
486cc3c7   Benjamin Renard   Add fill elements...
575
    	panelValues['last-fill-id'] = this.get('last-fill-id');
dbb7bcbe   Benjamin Renard   Add curves defint...
576
    	
abe09878   Benjamin Renard   Add panels and ax...
577
578
579
    	return panelValues;
    }
});