EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.sensorframework.visualisation.jfreechartvisualisation.editor]

COVERAGE SUMMARY FOR SOURCE FILE [JFreeChartPieReport.java]

nameclass, %method, %block, %line, %
JFreeChartPieReport.java0%   (0/1)0%   (0/8)0%   (0/62)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JFreeChartPieReport0%   (0/1)0%   (0/8)0%   (0/62)0%   (0/17)
<static initializer> 0%   (0/1)0%   (0/3)0%   (0/2)
JFreeChartPieReport (): void 0%   (0/1)0%   (0/3)0%   (0/1)
addInput (Collection): void 0%   (0/1)0%   (0/1)0%   (0/1)
createReportControls (Composite): void 0%   (0/1)0%   (0/8)0%   (0/2)
deleteInput (Collection): void 0%   (0/1)0%   (0/1)0%   (0/1)
generateVisualization (List): void 0%   (0/1)0%   (0/25)0%   (0/5)
setFocus (): void 0%   (0/1)0%   (0/5)0%   (0/2)
setInput (Collection): void 0%   (0/1)0%   (0/16)0%   (0/4)

1package de.uka.ipd.sdq.sensorframework.visualisation.jfreechartvisualisation.editor;
2 
3 
4import java.util.ArrayList;
5import java.util.Collection;
6import java.util.List;
7 
8import org.eclipse.swt.widgets.Composite;
9 
10import de.uka.ipd.sdq.codegen.simudatavisualisation.datatypes.AbstractPie;
11import de.uka.ipd.sdq.codegen.simudatavisualisation.datatypes.TimeDeltaPie;
12import de.uka.ipd.sdq.sensorframework.adapter.DataAdapter;
13import de.uka.ipd.sdq.sensorframework.visualisation.IVisualisation;
14import de.uka.ipd.sdq.sensorframework.visualisation.editor.AbstractReportView;
15import de.uka.ipd.sdq.sensorframework.visualisation.jfreechartvisualisation.JFreeChartPieViewer;
16 
17public class JFreeChartPieReport extends AbstractReportView implements
18                IVisualisation<AbstractPie> {
19 
20        public static String JFREECHART_PIE_EDITOR_ID = "de.uka.ipd.sdq.simucomframework.visualisation.JFreeChartPieReport";
21        
22        private JFreeChartPieViewer viewer;
23        
24        /* (non-Javadoc)
25         * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
26         */
27        @Override
28        public void setFocus() {
29                viewer.setFocus();
30        }
31        
32        /* (non-Javadoc)
33         * @see de.uka.ipd.sdq.sensorframework.visualisation.editor.AbstractReportView#createReportControls(org.eclipse.swt.widgets.Composite)
34         */
35        @Override
36        protected void createReportControls(Composite parent) {
37                viewer = new JFreeChartPieViewer(parent,0);
38        }
39 
40        /* (non-Javadoc)
41         * @see de.uka.ipd.sdq.sensorframework.visualisation.IVisualisation#setInput(java.util.Collection)
42         */
43        public void setInput(Collection<AbstractPie> c) {
44                if (!c.isEmpty()) {
45                        viewer.setData(c);
46                } else
47                        viewer.setData(new TimeDeltaPie("Empty Datasource"));
48        }
49        
50        /* (non-Javadoc)
51         * @see de.uka.ipd.sdq.sensorframework.visualisation.editor.AbstractReportView#setInput(java.util.List)
52         */
53        @Override
54        protected void generateVisualization(List<DataAdapter> list) {
55                ArrayList<AbstractPie> viewerInput = new ArrayList<AbstractPie>();
56                for (DataAdapter a : list)
57                        viewerInput.add((AbstractPie) a.getAdaptedObject());
58                this.setInput(viewerInput);
59        }        
60        
61        /* (non-Javadoc)
62         * @see de.uka.ipd.sdq.sensorframework.visualisation.IVisualisation#addInput(java.util.Collection)
63         */
64        public void addInput(Collection<AbstractPie> c) {
65                // The implementation is not necessary.
66                
67        }
68        
69        /* (non-Javadoc)
70         * @see de.uka.ipd.sdq.sensorframework.visualisation.IVisualisation#deleteInput(java.util.Collection)
71         */
72        public void deleteInput(Collection<AbstractPie> c) {
73                // The implementation is not necessary.
74        }
75}

[all classes][de.uka.ipd.sdq.sensorframework.visualisation.jfreechartvisualisation.editor]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov