source: proiecte/ptvs/src/vnsim/network/dsrc/DSRCStatistics.java @ 31

Last change on this file since 31 was 31, checked in by (none), 14 years ago
File size: 1.5 KB
Line 
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 ***********************************************************************************/
6package vnsim.network.dsrc;
7
8import java.util.ArrayList;
9import org.jfree.chart.*;
10import org.jfree.chart.axis.*;
11import org.jfree.chart.plot.*;
12import org.jfree.chart.renderer.xy.*;
13import org.jfree.data.xy.*;
14import org.jfree.data.time.*;
15import org.jfree.chart.entity.StandardEntityCollection;
16import org.jfree.chart.ChartUtilities;
17import org.jfree.chart.labels.StandardXYToolTipGenerator;
18import org.jfree.chart.imagemap.*;
19import org.jfree.chart.labels.CustomXYToolTipGenerator;
20import org.jfree.chart.urls.XYURLGenerator; 
21import javax.swing.JPanel;
22import javax.swing.SpringLayout;
23
24import java.awt.Color;
25
26public 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}
Note: See TracBrowser for help on using the repository browser.