PlotLegendsTextForm.js
921 Bytes
/**
* Project : AMDA-NG
* Name : PlotLegendsTextForm.js
* @class amdaPlotComp.PlotLegendsTextForm
* @extends amdaPlotComp.PlotStandardForm
* @brief Form to define a list of text legends
* @author Benjamin Renard
* @version $Id: PlotLegendsTextForm.js benjamin $
*/
Ext.define('amdaPlotComp.PlotLegendsTextForm', {
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 text legend',
iconCls: 'icon-add',
handler : function() {
var textLegendObject = me.object.createNewTextLegend();
me.crtTree.buildPanelAdditionalObjectsNode(me.object, textLegendObject.get('id'));
}
}
];
}
});