/** * Project  : AMDA-NG * Name : PlotSerieForm.js * @class amdaPlotComp.PlotSerieForm * @extends amdaPlotComp.PlotStandardForm * @brief Form to define specifics serie options * @author Benjamin Renard * @version $Id: PlotSerieForm.js benjamin $ */ Ext.define('amdaPlotComp.PlotSerieForm', { extend: 'amdaPlotComp.PlotStandardForm', setObject : function(object) { this.object = object.get('param-drawing-object'); this.loadRecord(this.object); this.updateOptions(this.crtTree.getSelectedPlotType()); }, updateOptions: function(plotType) { var xParamField = this.getForm().findField('serie-xaxis-param'); var resamplingModeField = this.getForm().findField('serie-resampling-mode'); var isScatter = (plotType == 'xyPlot'); xParamField.setVisible(isScatter); resamplingModeField.setVisible(isScatter); }, getFormItems: function() { var linesItems = [ this.addStandardCombo('serie-lines-style', 'Style', amdaPlotObj.PlotObjectConfig.availableLinesStyles), this.addStandardFloat('serie-lines-width', 'Width', 1, 10), this.addStandardColor('serie-lines-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors) ]; var symbolsItems = [ this.addStandardCombo('serie-symbols-type', 'Type', amdaPlotObj.PlotObjectConfig.availableSymbolsTypes), this.addStandardFloat('serie-symbols-size', 'Size', 1, 10), this.addStandardColor('serie-symbols-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors) ]; return [ this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter'), this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes), this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes), this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'), this.addStandardFieldSet('Lines', 'serie-lines-activated', linesItems), this.addStandardFieldSet('Symbols', 'serie-symbols-activated', symbolsItems) ]; } });