/** * Project  : AMDA-NG * Name : PlotDrawingObjectForm.js * @class amdaPlotComp.PlotDrawingObjectForm * @extends amdaPlotComp.PlotStandardForm * @brief Form to define a list of text legends * @author Benjamin Renard * @version $Id: PlotDrawingObjectForm.js benjamin $ */ Ext.define('amdaPlotComp.PlotDrawingObjectForm', { extend: 'amdaPlotComp.PlotStandardForm', setObject : function(object) { this.object = object; if (this.object != null) this.loadRecord(this.object); }, getFormItems: function() { var me = this; return [ { xtype: 'button', text: 'Add new constant', iconCls: 'icon-add', handler : function() { var constantObject = me.object.createNewConstant(); me.crtTree.buildPanelAdditionalObjectsNode(me.object, constantObject.get('id')); } }, { xtype: 'button', text: 'Add new text', iconCls: 'icon-add', handler : function() { var textObject = me.object.createNewTextObject(); me.crtTree.buildPanelAdditionalObjectsNode(me.object, textObject.get('id')); } }, { xtype: 'button', text: 'Add new curve', iconCls: 'icon-add', handler : function() { var curveObject = me.object.createNewCurve(); me.crtTree.buildPanelAdditionalObjectsNode(me.object, curveObject.get('id')); } } ]; } });