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

Ext.define('amdaPlotComp.PlotLayoutManualForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	setObject : function(object) {
		this.object = object.get('page-layout-object');
		this.loadRecord(this.object);
	},
	
	getFormItems: function() {
		var timePlotMarginItems = [
		        this.addStandardFloat('layout-timeplot-margin-left', 'Panels left margin', 0, 100, true),
		        this.addStandardFloat('layout-timeplot-margin-right', 'Panels right margin', 0, 100, true)
		];
		            		
		var xyPlotMarginItems = [
		        this.addStandardFloat('layout-xyplot-margin-left', 'Panels left margin', 0, 100, true),
		        this.addStandardFloat('layout-xyplot-margin-right', 'Panels right margin', 0, 100, true)
		];
		           		
		return [
		        this.addStandardFieldSet('Time / Epoch Panels Margins', '', timePlotMarginItems),
		        this.addStandardFieldSet('Scatter / Instant Panels Margins', '', xyPlotMarginItems)
		];
	}
});