/************************************************************************************ * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University * All rights reserved. * Refer to LICENSE for terms and conditions of use. ***********************************************************************************/ package vnsim.network.dsrc; import java.util.ArrayList; import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.xy.*; import org.jfree.data.xy.*; import org.jfree.data.time.*; import org.jfree.chart.entity.StandardEntityCollection; import org.jfree.chart.ChartUtilities; import org.jfree.chart.labels.StandardXYToolTipGenerator; import org.jfree.chart.imagemap.*; import org.jfree.chart.labels.CustomXYToolTipGenerator; import org.jfree.chart.urls.XYURLGenerator; import javax.swing.JPanel; import javax.swing.SpringLayout; import java.awt.Color; public class DSRCStatistics { public static ArrayList results=new ArrayList(); public static DSRCChart chart; public static void addStatistic(DSRCStatisticComponent add) { results.add(add); } public static void plotReceivedPackets() { if(chart!=null) chart.dispose(); chart=new DSRCChart("Simulation results",results); chart.setSize(1220,620); //chart.pack(); chart.setVisible(true); } }