1 | /************************************************************************************ |
---|
2 | * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University |
---|
3 | * All rights reserved. |
---|
4 | * Refer to LICENSE for terms and conditions of use. |
---|
5 | ***********************************************************************************/ |
---|
6 | package vnsim.network.dsrc; |
---|
7 | |
---|
8 | import java.util.ArrayList; |
---|
9 | import org.jfree.chart.*; |
---|
10 | import org.jfree.chart.axis.*; |
---|
11 | import org.jfree.chart.plot.*; |
---|
12 | import org.jfree.chart.renderer.xy.*; |
---|
13 | import org.jfree.data.xy.*; |
---|
14 | import org.jfree.data.time.*; |
---|
15 | import org.jfree.chart.entity.StandardEntityCollection; |
---|
16 | import org.jfree.chart.ChartUtilities; |
---|
17 | import org.jfree.chart.labels.StandardXYToolTipGenerator; |
---|
18 | import org.jfree.chart.imagemap.*; |
---|
19 | import org.jfree.chart.labels.CustomXYToolTipGenerator; |
---|
20 | import org.jfree.chart.urls.XYURLGenerator; |
---|
21 | import javax.swing.JPanel; |
---|
22 | import javax.swing.SpringLayout; |
---|
23 | |
---|
24 | import java.awt.Color; |
---|
25 | |
---|
26 | public class DSRCStatistics |
---|
27 | { |
---|
28 | public static ArrayList<DSRCStatisticComponent> results=new ArrayList<DSRCStatisticComponent>(); |
---|
29 | |
---|
30 | public static DSRCChart chart; |
---|
31 | |
---|
32 | public static void addStatistic(DSRCStatisticComponent add) |
---|
33 | { |
---|
34 | results.add(add); |
---|
35 | } |
---|
36 | |
---|
37 | public static void plotReceivedPackets() |
---|
38 | { |
---|
39 | if(chart!=null) |
---|
40 | chart.dispose(); |
---|
41 | |
---|
42 | chart=new DSRCChart("Simulation results",results); |
---|
43 | chart.setSize(1220,620); |
---|
44 | //chart.pack(); |
---|
45 | chart.setVisible(true); |
---|
46 | |
---|
47 | } |
---|
48 | } |
---|