PlotSpectroForm.js 1.11 KB
/**
 * Project   : AMDA-NG
 * Name      : PlotSpectroForm.js
 * @class   amdaPlotComp.PlotSpectroForm
 * @extends amdaPlotComp.PlotStandardForm
 * @brief   Form to define specifics spectro options
 * @author  Benjamin Renard
 * @version $Id: PlotSpectroForm.js benjamin $
 */

Ext.define('amdaPlotComp.PlotSpectroForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	setObject : function(object) {
		this.object = object.get('param-drawing-object');
		this.loadRecord(this.object);
	},
	
	getValuesRangeItems: function() {
		return [
		        this.addStandardFloat('spectro-value-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
		        this.addStandardFloat('spectro-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
		];
	},
	
	getFormItems: function() {
		var me = this;
		return [
		    this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
		    	me.object.set('spectro-yaxis', value);
        		me.crtTree.refresh();
		    }),
		    this.addStandardFieldSet('Values range', '', this.getValuesRangeItems())
		];
	}
});