Blame view

js/app/views/PlotComponents/PlotZoomPlug.js 19.8 KB
9f08f4eb   Benjamin Renard   Zoom in interacti...
1
/**
b2481b88   Nathanael Jourdane   fix indent
2
3
4
5
6
7
8
9
10
11
12
13
14
 * Project      :  AMDA-NG
 * Name         : PlotZoomPlug.js
 * @plugin    amdaPlotComp.PlotZoomPlug
 * @extends    Ext.util.Observable
 * @ptype      plotZoomPlugin
 * @brief     Plot Zoom UI (View)
 * @author Benjamin
 * @version $Id: PlotZoomPlug.js
 ********************************************************************************
 *    FT Id     :   Date   : Name - Description
 *******************************************************************************
 *  :
 */
9f08f4eb   Benjamin Renard   Zoom in interacti...
15
16
17


Ext.define('amdaPlotComp.PlotZoomPlug', {
b2481b88   Nathanael Jourdane   fix indent
18
19
  extend: 'Ext.util.Observable',
  alias: 'plugin.plotZoomPlugin',
9f08f4eb   Benjamin Renard   Zoom in interacti...
20

b2481b88   Nathanael Jourdane   fix indent
21
  id: 'plot-zoom-plug',
9f08f4eb   Benjamin Renard   Zoom in interacti...
22

b2481b88   Nathanael Jourdane   fix indent
23
  ttModuleId: 'timetab-win',
8b11b1af   Benjamin Renard   Insert intervals ...
24
  catModuleId: 'catalog-win',
b2481b88   Nathanael Jourdane   fix indent
25
26
27
28

  win: null,
  form: null,
  zoomType: '',
b39c9d1d   Benjamin Renard   Fix interactive n...
29
  interactiveId: '',
b2481b88   Nathanael Jourdane   fix indent
30
31
  panelId: -1,

8b11b1af   Benjamin Renard   Insert intervals ...
32
  linkedTTCatNode: null,
b2481b88   Nathanael Jourdane   fix indent
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

  constructor: function (config) {
    Ext.apply(this, config);
    this.callParent(arguments);
  },

  onDestroy: function () {
    this.win = null;
  },

  init: function (cmp) {
    this.hostCmp = cmp;
  },

  setMinValue: function (min) {
    if (!this.form)
      return;

    if (this.zoomType == 'timeAxis')
      this.form.getForm().findField('zoom-min-time').setValue(min);
    else
      this.form.getForm().findField('zoom-min-float').setValue(min);
  },

  setMaxValue: function (max) {
    if (!this.form)
      return;

    if (this.zoomType == 'timeAxis') {
      var minValue = this.form.getForm().findField('zoom-min-time').getValue();
      if (minValue <= max)
        this.form.getForm().findField('zoom-max-time').setValue(max);
      else {
        this.form.getForm().findField('zoom-min-time').setValue(max);
        this.form.getForm().findField('zoom-max-time').setValue(minValue);
      }
    }
    else {
      var minValue = this.form.getForm().findField('zoom-min-float').getValue();
      if (minValue <= max)
        this.form.getForm().findField('zoom-max-float').setValue(max);
      else {
        this.form.getForm().findField('zoom-min-float').setValue(max);
        this.form.getForm().findField('zoom-max-float').setValue(minValue);
      }
    }
  },

  /**
   *  add Interval to Time table
   **/
  insertInterval: function () {
    if (this.zoomType != 'timeAxis')
      return;

    var start = this.form.getForm().findField('zoom-min-time').getValue();
    var stop = this.form.getForm().findField('zoom-max-time').getValue();

8b11b1af   Benjamin Renard   Insert intervals ...
91
92
93
94
    var TTCatType = this.form.getForm().findField('ttcat-type').getValue();
    var isCatalog = (TTCatType == 'catalog');

    myDesktopApp.getLoadedModule(isCatalog ? this.catModuleId : this.ttModuleId, true, function (module) {
b2481b88   Nathanael Jourdane   fix indent
95
96
97
98
99
100
101
102
103
      var targetModuleUI = module.getUiContent();
      if (targetModuleUI)
        targetModuleUI.addInterval(start, stop);
    });
  },

  /**
   *  creation of the window
   */
85721867   Menouard AZIB   I have added plot...
104
105
  show: function (interactiveId, zoomType, panelId, isPlotFunction_ = false) {
    this.isPlotFunction = isPlotFunction_;
b2481b88   Nathanael Jourdane   fix indent
106
107
108
    if (!this.win) {
      this.win = new Ext.Window({
        id: 'plot-zoom-win-' + this.hostCmp.ownerCt.getId(), // Plot window ID
47de182c   Nathanael Jourdane   fix zoom panel width
109
        width: 250,
b2481b88   Nathanael Jourdane   fix indent
110
111
112
        x: 0, y: 0,
        baseCls: 'x-panel',
        title: 'Zoom',
b2481b88   Nathanael Jourdane   fix indent
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
        constrain: true,
        collapsible: true,
        resizable: false,
        ghost: false,
        renderTo: this.hostCmp.ownerCt.body,
        items: this.getFormConfig(),
        listeners: {
          scope: this,
          beforeclose: function () {
            this.hostCmp.panelImage.stopZoom();
            Ext.PluginManager.unregister(this);
          }
        },
        getConstrainVector: function (constrainTo) {
          var me = this;
          if (me.constrain || me.constrainHeader) {
            constrainTo = constrainTo || (me.floatParent && me.floatParent.getTargetEl()) || me.container || me.el.getScopeParent();
            return (me.constrainHeader ? me.header.el : me.el).getConstrainVector(constrainTo);
          }
        }
      });

      this.win.on('destroy', this.onDestroy, this);

      Ext.PluginManager.register(this);
    }

b39c9d1d   Benjamin Renard   Fix interactive n...
140
    this.interactiveId = interactiveId;
b2481b88   Nathanael Jourdane   fix indent
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    this.updateWinByType(zoomType, panelId);
    this.win.show();
    this.win.setPosition(0, 0);
  },

  close: function () {
    if (this.win == null)
      return;
    this.win.close();
  },

  updateWinByType: function (zoomType, panelId) {
    if (this.win == null)
      return;

    this.zoomType = zoomType;
    this.panelId = panelId;

    switch (zoomType) {
      case 'timeAxis':
d4d660bc   Benjamin Renard   Minor fix (#9881)
161
        this.win.setTitle('Zoom on time axis');
b2481b88   Nathanael Jourdane   fix indent
162
        break;
85721867   Menouard AZIB   I have added plot...
163
      case 'y-left':
b2481b88   Nathanael Jourdane   fix indent
164
165
        this.win.setTitle('Zoom on Y Left axis - Panel Id : ' + panelId);
        break;
85721867   Menouard AZIB   I have added plot...
166
      case 'y-right':
b2481b88   Nathanael Jourdane   fix indent
167
168
        this.win.setTitle('Zoom on Y Right axis - Panel Id : ' + panelId);
        break;
85721867   Menouard AZIB   I have added plot...
169
      case 'xaxis_id':
b2481b88   Nathanael Jourdane   fix indent
170
171
172
173
174
175
176
177
178
179
        this.win.setTitle('Zoom on X axis - Panel Id : ' + panelId);
        break;
    }

    this.form.getForm().findField('zoom-min-time').setVisible(this.zoomType == 'timeAxis');
    this.form.getForm().findField('zoom-max-time').setVisible(this.zoomType == 'timeAxis');

    this.form.getForm().findField('zoom-min-float').setVisible(this.zoomType != 'timeAxis');
    this.form.getForm().findField('zoom-max-float').setVisible(this.zoomType != 'timeAxis');

8b11b1af   Benjamin Renard   Insert intervals ...
180
181
182
    var ttCatNameField = this.form.getForm().findField('ttcat-name');
    if (ttCatNameField)
      ttCatNameField.findParentByType('fieldset').setVisible(this.zoomType == 'timeAxis');
b2481b88   Nathanael Jourdane   fix indent
183
184
185
186
187
188
189
190
191
192
193
194
195
196
  },

  resetMinMaxValue: function () {
    if (this.zoomType == 'timeAxis') {
      this.form.getForm().findField('zoom-min-time').setValue('');
      this.form.getForm().findField('zoom-max-time').setValue('');
    }
    else {
      this.form.getForm().findField('zoom-min-float').setValue(null);
      this.form.getForm().findField('zoom-max-float').setValue(null);
    }

    this.hostCmp.panelImage.resetZoom();
  },
85721867   Menouard AZIB   I have added plot...
197
  setTimePlot: function () {
67210d01   Hacene SI HADJ MOHAND   #9800
198
199
200
201
202
    var timeObj = new Object();
    timeObj.start = this.form.getForm().findField('zoom-min-time').getValue();
    timeObj.stop = this.form.getForm().findField('zoom-max-time').getValue();
    var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
    plotModule.setTimeInterval(timeObj);
85721867   Menouard AZIB   I have added plot...
203
  },
b2481b88   Nathanael Jourdane   fix indent
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
  /**
   *        Main form
   */
  getFormConfig: function () {

    var intervalFieldSet = {
      xtype: 'fieldset',
      title: 'Interval Selection',
      name: 'interval-selection-fieldset',
      collapsible: false,
      layout: {
        type: 'vbox',
        pack: 'start',
        align: 'stretch'
      },
      items: [
        {
          xtype: 'datefield', name: 'zoom-min-time', fieldLabel: 'Start Time',
85721867   Menouard AZIB   I have added plot...
222
          format: 'Y/m/d H:i:s.u',
b2481b88   Nathanael Jourdane   fix indent
223
224
225
        },
        {
          xtype: 'datefield', name: 'zoom-max-time', fieldLabel: 'Stop Time',
c3cfed52   Hacene SI HADJ MOHAND   us oki
226
          format: 'Y/m/d H:i:s.u'
b2481b88   Nathanael Jourdane   fix indent
227
228
229
230
231
232
233
234
235
236
        },
        {
          xtype: 'numberfield', name: 'zoom-min-float', fieldLabel: 'Min Value'
        },
        {
          xtype: 'numberfield', name: 'zoom-max-float', fieldLabel: 'Max Value'
        },
        {
          xtype: 'button',
          width: 100,
76447670   Benjamin Renard   Minor fixes
237
          text: 'Reset',
b2481b88   Nathanael Jourdane   fix indent
238
239
240
241
          scope: this,
          handler: function () {
            this.resetMinMaxValue();
          }
85721867   Menouard AZIB   I have added plot...
242
243
        },
        {
67210d01   Hacene SI HADJ MOHAND   #9800
244
245
          xtype: 'button',
          width: 100,
76447670   Benjamin Renard   Minor fixes
246
          text: 'Use in Time Selection',
67210d01   Hacene SI HADJ MOHAND   #9800
247
248
249
250
          scope: this,
          handler: function () {
            this.setTimePlot();
          }
b2481b88   Nathanael Jourdane   fix indent
251
252
253
254
        }
      ]
    };

8b11b1af   Benjamin Renard   Insert intervals ...
255
    var insertTypeStore = Ext.create('Ext.data.Store', {
85721867   Menouard AZIB   I have added plot...
256
257
258
259
260
      fields: ['key', 'name'],
      data: [
        { "key": "timeTable", "name": "TimeTable" },
        { "key": "catalog", "name": "Catalog" }
      ]
8b11b1af   Benjamin Renard   Insert intervals ...
261
262
263
    });

    var me = this;
b2481b88   Nathanael Jourdane   fix indent
264
265
    var insertTTFieldSet = {
      xtype: 'fieldset',
d4d660bc   Benjamin Renard   Minor fix (#9881)
266
      title: 'Add in Time Table or Catalog',
b2481b88   Nathanael Jourdane   fix indent
267
268
269
270
271
272
273
274
275
      name: 'tt-insertion-fieldset',
      collapsible: false,
      layout: {
        type: 'vbox',
        pack: 'start',
        align: 'stretch'
      },
      items: [
        {
8b11b1af   Benjamin Renard   Insert intervals ...
276
277
278
279
280
281
282
283
284
285
286
          xtype: 'combo',
          fieldLabel: 'Insert In',
          store: insertTypeStore,
          queryMode: 'local',
          displayField: 'name',
          valueField: 'key',
          editable: false,
          value: 'timeTable',
          name: 'ttcat-type'
        },
        {
b2481b88   Nathanael Jourdane   fix indent
287
          xtype: 'textfield',
8b11b1af   Benjamin Renard   Insert intervals ...
288
289
          fieldLabel: 'Name',
          name: 'ttcat-name',
b2481b88   Nathanael Jourdane   fix indent
290
          listeners:
85721867   Menouard AZIB   I have added plot...
291
292
293
294
295
296
297
298
299
300
301
          {
            render: function (o, op) {
              var field = this;
              var el = this.el;
              var dropTarget = Ext.create('Ext.dd.DropTarget', el, {
                ddGroup: 'explorerTree',
                notifyOver: function (ddSource, e, data) {
                  var TTCatType = me.form.getForm().findField('ttcat-type').getValue();
                  if (data.records[0].data.leaf && (data.records[0].data.nodeType == TTCatType)) {
                    this.valid = true;
                    return this.dropAllowed;
b2481b88   Nathanael Jourdane   fix indent
302
                  }
85721867   Menouard AZIB   I have added plot...
303
304
305
306
307
308
309
310
311
312
                  this.valid = false;
                  return this.dropNotAllowed;
                },
                notifyDrop: function (ddSource, e, data) {
                  if (!this.valid)
                    return false;
                  field.setValue(data.records[0].get('text'));
                  return true;
                }
              });
b2481b88   Nathanael Jourdane   fix indent
313
            }
85721867   Menouard AZIB   I have added plot...
314
          }
b2481b88   Nathanael Jourdane   fix indent
315
316
317
318
319
320
321
322
323
        },
        {
          xtype: 'button',
          width: 100,
          text: 'Insert Interval',
          scope: this,
          handler: function () {
            var me = this;

8b11b1af   Benjamin Renard   Insert intervals ...
324
325
            var TTCatType = this.form.getForm().findField('ttcat-type').getValue();
            var TTCatName = this.form.getForm().findField('ttcat-name').getValue();
b2481b88   Nathanael Jourdane   fix indent
326

8b11b1af   Benjamin Renard   Insert intervals ...
327
328
            var isCatalog = (TTCatType == 'catalog');
            myDesktopApp.getLoadedModule(isCatalog ? this.catModuleId : this.ttModuleId, true, function (module) {
b2481b88   Nathanael Jourdane   fix indent
329
              var targetModuleUI = module.getUiContent();
8b11b1af   Benjamin Renard   Insert intervals ...
330
              if (me.linkedTTCatNode && (me.linkedTTCatNode.get('text') == TTCatName) && (me.linkedTTCatNode.get('nodeType') == TTCatType)) {
b2481b88   Nathanael Jourdane   fix indent
331
332
333
                if (targetModuleUI)
                  me.insertInterval();
                else {
8b11b1af   Benjamin Renard   Insert intervals ...
334
                  me.linkedTTCatNode.editLeaf(function () {
b2481b88   Nathanael Jourdane   fix indent
335
336
337
338
339
                    me.insertInterval();
                  });
                }
              }
              else {
b2481b88   Nathanael Jourdane   fix indent
340
                var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID);
8b11b1af   Benjamin Renard   Insert intervals ...
341
342
                var ttCatRootNode = explorerTree.getRootNode().findChild('id', isCatalog ? 'catalog-treeRootNode' : 'timeTable-treeRootNode', true);
                amdaModel.InteractiveNode.preloadNodes(ttCatRootNode, function () {
b2481b88   Nathanael Jourdane   fix indent
343
344
                  var nodeWithSameName = null;

8b11b1af   Benjamin Renard   Insert intervals ...
345
346
                  if (TTCatName != '')
                    nodeWithSameName = ttCatRootNode.findChild('text', TTCatName, true);
b2481b88   Nathanael Jourdane   fix indent
347
348

                  if (nodeWithSameName !== null)
8b11b1af   Benjamin Renard   Insert intervals ...
349
                    me.linkedTTCatNode = nodeWithSameName;
b2481b88   Nathanael Jourdane   fix indent
350
                  else {
85721867   Menouard AZIB   I have added plot...
351
352
353
354
355
356
                    module.createLinkedNode();
                    module.getLinkedNode().set('text', TTCatName);
                    me.linkedTTCatNode = module.getLinkedNode();
                    var obj = {
                      name: TTCatName,
                      fromPlugin: true
8b11b1af   Benjamin Renard   Insert intervals ...
357
                    };
85721867   Menouard AZIB   I have added plot...
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
                    if (isCatalog) {
                      Ext.Msg.prompt('Define Parameters', 'Please enter parameters number for the new catalog:', function (btn, text) {
                        if (btn == 'ok') {
                          obj.nbParameters = parseInt(text, 10);
                          if (isNaN(obj.nbParameters)) {
                            obj.nbParameters = 1;
                          }
                          module.createObject(obj);
                          me.linkedTTCatNode.editLeaf(function () {
                            me.insertInterval();
                          });
                        }
                      });
                      return;
                    }
                    else {
                      module.createObject(obj);
                    }
b2481b88   Nathanael Jourdane   fix indent
376
377
                  }

8b11b1af   Benjamin Renard   Insert intervals ...
378
                  me.linkedTTCatNode.editLeaf(function () {
b2481b88   Nathanael Jourdane   fix indent
379
380
381
382
383
384
385
386
387
388
                    me.insertInterval();
                  });
                });
              }
            });
          }
        }
      ]
    };

85721867   Menouard AZIB   I have added plot...
389
390
391
    //Ici on rajoute les composants associés à la fonctionnalité 'PlotFunction'
    const plotFunctionComponents = this.createPlotFunctionComponents();

b2481b88   Nathanael Jourdane   fix indent
392
393
    this.form = new Ext.form.FormPanel({
      frame: true,
8b1a8c67   Hacene SI HADJ MOHAND   patch bug ouvertu...
394
      width: 255,
b2481b88   Nathanael Jourdane   fix indent
395
396
397
398
399
400
401
402
403
404
      layout: {
        type: 'vbox',
        pack: 'start',
        align: 'stretch'
      },
      fieldDefaults: {
        labelWidth: 60
      },
      items: [
        intervalFieldSet,
85721867   Menouard AZIB   I have added plot...
405
        me.isPlotFunction ? plotFunctionComponents : insertTTFieldSet,
b2481b88   Nathanael Jourdane   fix indent
406
407
408
409
410
411
412
413
      ],
      fbar: [
        {
          text: 'Apply Zoom',
          width: 100,
          scope: this,
          handler: function () {
            if (this.zoomType == 'timeAxis') {
91d74c16   Hacene SI HADJ MOHAND   ihm zoom ms ok
414
              var minZoom = Ext.Date.format(this.form.getForm().findField('zoom-min-time').getValue(), 'Y-m-d H:i:s.u');
85721867   Menouard AZIB   I have added plot...
415
              var maxZoom = Ext.Date.format(this.form.getForm().findField('zoom-max-time').getValue(), 'Y-m-d H:i:s.u');
b2481b88   Nathanael Jourdane   fix indent
416
417
418
419
420
421
422
423
424
425
426
427
428
            }
            else {
              var minZoom = this.form.getForm().findField('zoom-min-float').getValue();
              var maxZoom = this.form.getForm().findField('zoom-max-float').getValue();
            }

            if (!maxZoom || !minZoom || !this.form.getForm().isValid()) {
              myDesktopApp.warningMsg('Error in values definition');
              return;
            }

            this.hostCmp.callInteractivePlot({
              'action': 'zoom',
b39c9d1d   Benjamin Renard   Fix interactive n...
429
              'interactiveId': this.interactiveId,
b2481b88   Nathanael Jourdane   fix indent
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
              'panelId': this.panelId,
              'axeId': this.zoomType,
              'min': minZoom,
              'max': maxZoom
            });
            this.hostCmp.panelImage.resetZoom();
          }
        },
        {
          text: 'Undo Zoom',
          width: 100,
          scope: this,
          handler: function () {
            this.hostCmp.callInteractivePlot({
              'action': 'undozoom',
b39c9d1d   Benjamin Renard   Fix interactive n...
445
              'interactiveId': this.interactiveId,
b2481b88   Nathanael Jourdane   fix indent
446
447
448
449
450
451
452
453
454
              'panelId': this.panelId,
              'axeId': this.zoomType
            });
            this.hostCmp.panelImage.resetZoom();
          }
        }
      ]
    });
    return this.form;
85721867   Menouard AZIB   I have added plot...
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
  },

  createPlotFunctionComponents: function () {
    const key_ = "key";
    const name_ = "name";
    //Combo to choose a type of fucntion to be applied
    const data_function_type = [];
    let item_type = {};
    item_type[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.fft;
    item_type[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.fft;
    data_function_type.push(item_type);
    item_type = {};
    item_type[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.sum;
    item_type[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.sum;
    data_function_type.push(item_type);

    const function_type = Ext.create('Ext.data.Store', {
      fields: [key_, name_],
      data: data_function_type
    });

    //Combo to choose type of scaling
    const data_ = [];
    const item_log = {};
    item_log[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.log;
    item_log[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.log;
    data_.push(item_log);

    const item_linear = {};
    item_linear[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.linear;
    item_linear[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.linear;
    data_.push(item_linear);

    const scale = Ext.create('Ext.data.Store', {
      fields: [key_, name_],
      data: data_
    });

    //Combo to choose x type data of FFT 
    const data__ = [];
    const item_frequency = {};
    item_frequency[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.values.frequency;
    item_frequency[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.values.frequency;
    data__.push(item_frequency);

    const item_period = {};
    item_period[key_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.values.period;
    item_period[name_] = amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.values.period;
    data__.push(item_period);

    const abscisse = Ext.create('Ext.data.Store', {
      fields: [key_, name_],
      data: data__
    });

    var me = this;

    const parameterFieldSet = {
      xtype: 'fieldset',

      title: 'Parameter Selection',
      name: 'parameter-selection-fieldset',
      collapsible: false,

      layout: {
        type: 'vbox',
        pack: 'start',
        align: 'stretch',
      },
      items: [
        {
          xtype: 'combo',
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.field,
          store: function_type,
          queryMode: 'local',
          displayField: name_,
          valueField: key_,
          editable: false,
          value: amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.sum,
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.name,
          listeners: {
            change: function (combo, value) {
              if (value === amdaPlotObj.PlotObjectConfig.plotFunctionItems.type.values.sum) {
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.name).setVisible(false);
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.nbEchantillons.name).setVisible(false);
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.fe.name).setVisible(false);
              }
              else {
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.name).setVisible(true);
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.nbEchantillons.name).setVisible(true);
                me.form.getForm().findField(amdaPlotObj.PlotObjectConfig.plotFunctionItems.fe.name).setVisible(true);
              }
            }
          }
        },
        {
          xtype: 'combo',
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.field,
          store: scale,
          queryMode: 'local',
          displayField: name_,
          valueField: key_,
          editable: false,
          value: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.linear,
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.name
        },
        {
          xtype: 'combo',
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.field,
          store: abscisse,
          queryMode: 'local',
          displayField: name_,
          valueField: key_,
          editable: false,
          hidden: true,
          value: amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.values.frequency,
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.abscisse.name
        },
        {
          xtype: 'combo',
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale_ordonnee.field,
          store: scale,
          queryMode: 'local',
          displayField: name_,
          valueField: key_,
          editable: false,
          value: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale.values.linear,
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.scale_ordonnee.name
        },
        {
          xtype: 'numberfield',
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.nbEchantillons.name,
          labelWidth: 140,
          width: 50,
          minValue: 1,
          hidden: true,
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.nbEchantillons.field
        },
        {
          xtype: 'numberfield',
          name: amdaPlotObj.PlotObjectConfig.plotFunctionItems.fe.name,
          labelWidth: 160,
          width: 30,
          minValue: 0,
          disabled: true,
          hidden: true,
          fieldLabel: amdaPlotObj.PlotObjectConfig.plotFunctionItems.fe.field
        }
      ]
    };

    return parameterFieldSet;
b2481b88   Nathanael Jourdane   fix indent
607
  }
8b11b1af   Benjamin Renard   Insert intervals ...
608
});