public class Histogram extends Object implements Swingable
(c) copyright 2002-2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
| Modifier and Type | Field and Description |
|---|---|
protected org.jfree.chart.JFreeChart |
chart
chart refers to the chart
|
protected HistogramDataset |
dataset
dataset refers to the dataset
|
static String |
LABEL_X_AXIS
LABEL_X_AXIS is the label on the X-axis
|
static String |
LABEL_Y_AXIS
LABEL_Y_AXIS is the label on the Y-axis
|
| Constructor and Description |
|---|
Histogram(String title,
double[] domain,
double[] range,
int numberofBins)
constructs a new Histogram.
|
Histogram(String title,
double[] domain,
int numberofBins)
constructs a new Histogram
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Counter counter)
adds a counter to the histogramdataset.
|
void |
add(String description,
nl.tudelft.simulation.event.EventProducerInterface source,
nl.tudelft.simulation.event.EventType eventType)
adds an eventProducer to the histogram dataset.
|
org.jfree.chart.JFreeChart |
getChart()
returns the chart
|
HistogramDataset |
getDataset()
returns the dataset of a histogram.
|
Container |
getSwingPanel()
returns the chartPanel of this histogram.
|
public static final String LABEL_X_AXIS
public static final String LABEL_Y_AXIS
protected org.jfree.chart.JFreeChart chart
protected HistogramDataset dataset
public Histogram(String title, double[] domain, int numberofBins)
title - the titledomain - the domainnumberofBins - the numberofbinspublic Histogram(String title, double[] domain, double[] range, int numberofBins)
title - the title. The title of the histogramdomain - the domain of the x-axis.range - the y-axis range of the histogram.numberofBins - the numberofbins of this histogram.public void add(Counter counter)
Counter.COUNT_EVENT.counter - the counter to add.public void add(String description, nl.tudelft.simulation.event.EventProducerInterface source, nl.tudelft.simulation.event.EventType eventType)
description - the description of the eventProducersource - the eventproducer which functions as source for this
histogram.eventType - the eventType.public org.jfree.chart.JFreeChart getChart()
public Container getSwingPanel()
getSwingPanel in interface Swingablepublic HistogramDataset getDataset()
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.