/** * Project  : AMDA-NG * Name : PlotTreeNode.js * @class amdaPlotObj.PlotTreeNode * @extends Ext.data.Model * @brief Plot Tree Node Definition * @author Benjamin Renard * @version $Id: PlotTreeNode.js benjamin $ ****************************************************************************** * FT Id : Date : Name - Description ****************************************************************************** * : :23/07/2015: BRE - file creation */ Ext.define('amdaPlotObj.PlotTreeNode', { extend: 'Ext.data.Model', //Node type type: '', //Node text text: '', //Node icon class iconCls: '', //Node leaf leaf: false, //Node expanded expanded : true, //Node can be removed by user removable : false, //Link to the object associated to this node object: null, //Additional information about a node to show in the tree view getAdditionalText : null, constructor : function(config) { this.callParent(arguments); this.set('text',this.text); this.set('iconCls',this.iconCls); this.set('leaf',this.leaf); this.set('expanded',this.expanded); this.set('type',this.type); this.set('removable',this.removable); if (config && config.object) this.object = config.object; } }, function () { Ext.data.NodeInterface.decorate(this); }); Ext.define('amdaPlotObj.PlotPageTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-page', text: 'Page', type: 'page', getAdditionalText: function() { var addText = ' ('+this.object.get('page-dimension')+', '+this.object.get('page-orientation'); if (this.object.get('page-superpose-mode')) addText += ', superpose'; addText += ')'; return addText; } }); Ext.define('amdaPlotObj.PlotLayoutTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-layout', text: 'Layout', type: 'layout', getAdditionalText: function() { return ' ('+this.object.get('page-layout-type')+')'; } }); Ext.define('amdaPlotObj.PlotPanelsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-panels', text: 'Panels list', type: 'panels' }); Ext.define('amdaPlotObj.PlotPanelTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-panel', text: 'Panel', type: 'panel', removable: true, getAdditionalText: function() { var addText = ' ('+this.object.get('panel-plot-type')+')'; return addText; } }); Ext.define('amdaPlotObj.PlotAxesTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', expanded: false, iconCls: 'icon-plot-axes', text: 'Axes', type: 'axes' }); Ext.define('amdaPlotObj.PlotTimeAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-t', text: 'Time Axis', type: 'time-axis' }); Ext.define('amdaPlotObj.PlotEpochAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-e', text: 'Epoch Axis', type: 'epoch-axis' }); Ext.define('amdaPlotObj.PlotXAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-x', text: 'X Axis', type: 'x-axis' }); Ext.define('amdaPlotObj.PlotYLeftAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-y-left', text: 'Y Left Axis', type: 'y-left-axis' }); Ext.define('amdaPlotObj.PlotYRightAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-y-right', text: 'Y Right Axis', type: 'y-right-axis' }); Ext.define('amdaPlotObj.PlotColorAxisTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-axis-color', text: 'Color Axis', type: 'color-axis' }); Ext.define('amdaPlotObj.PlotParamsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-params', text: 'Params', type: 'params' }); Ext.define('amdaPlotObj.PlotParamTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, //iconCls: 'icon-plot-params', text: '', type: 'param', removable: true, getAdditionalText: function() { return this.object.get('param-id')+' ('+this.object.get('param-drawing-type')+')'; } }); Ext.define('amdaPlotObj.PlotAdditionalObjectsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', expanded: false, iconCls: 'icon-plot-add-objs', text: 'Additional Objects', type: 'objects' }); Ext.define('amdaPlotObj.PlotLegendsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-add-legends', text: 'Legends', type: 'legends' }); Ext.define('amdaPlotObj.PlotSeriesLegendTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-add-legend-series', text: 'Series Legend', type: 'series-legend' }); Ext.define('amdaPlotObj.PlotTextLegendsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-add-legends-text', text: 'Text Legends', type: 'text-legends' }); Ext.define('amdaPlotObj.PlotTextLegendTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-add-legend-text', text: 'Text Legend', type: 'text-legend', removable: true }); Ext.define('amdaPlotObj.PlotDrawingObjectsTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', iconCls: 'icon-plot-add-drawing-objs', text: 'Drawing objects', type: 'drawing-objects' }); Ext.define('amdaPlotObj.PlotConstantTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-add-drawing-constant', text: 'Constant', type: 'constant', removable: true }); Ext.define('amdaPlotObj.PlotTextTreeNode', { extend: 'amdaPlotObj.PlotTreeNode', leaf: true, iconCls: 'icon-plot-add-drawing-text', text: 'Text', type: 'text-obj', removable: true });