nl.tudelft.simulation.jstats.charts.xy
Class XYChart

java.lang.Object
  extended bynl.tudelft.simulation.jstats.charts.xy.XYChart
All Implemented Interfaces:
Swingable

public class XYChart
extends java.lang.Object
implements Swingable

The xyChart specifies the xyChart in DSOL.

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
1.4
Version:
1.2 Apr 26, 2004
Author:
Peter Jacobs

Field Summary
protected  short axisType
          the axis type of the chart
protected  org.jfree.chart.JFreeChart chart
          chart refers to the chart
protected  XYDataset dataset
          dataset refers to the dataset
static java.lang.String LABEL_X_AXIS
          LABEL_X_AXIS is the label on the X-axis
static java.lang.String LABEL_Y_AXIS
          LABEL_Y_AXIS is the label on the Y-axis
static short XLINEAR_YLINEAR
          x-axis is linear y-axis is linear
static short XLINEAR_YLOGARITHMIC
          x-axis is linear y-axis is logarithmic
static short XLOGARITHMIC_YLINEAR
          x-axis is logarithmic y-axis is linear
static short XLOGARITHMIC_YLOGARITHMIC
          x-axis is logarithmic y-axis is logarithmic
 
Constructor Summary
XYChart(java.lang.String title)
          constructs a new XYChart
XYChart(java.lang.String title, double[] domain)
          constructs a new XYChart
XYChart(java.lang.String title, double[] domain, double[] range)
          constructs a new XYChart
XYChart(java.lang.String title, double[] domain, double[] range, short axisType)
          constructs a new XYChart
XYChart(java.lang.String title, double[] domain, short axisType)
          constructs a new XYChart
XYChart(java.lang.String title, short axisType)
          constructs a new XYChart
 
Method Summary
 void add(Persistent persistent)
          adds a tally to the xyChart
 void add(java.lang.String description, nl.tudelft.simulation.event.EventProducerInterface source, nl.tudelft.simulation.event.EventType eventType)
          adds an eventProducer to the xyChart
 org.jfree.chart.JFreeChart getChart()
          returns the chart
 XYDataset getDataset()
          returns the dataset of a xyChart
 java.awt.Container getSwingPanel()
          returns the chartPanel of this xyChart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XLINEAR_YLINEAR

public static final short XLINEAR_YLINEAR
x-axis is linear y-axis is linear

See Also:
Constant Field Values

XLINEAR_YLOGARITHMIC

public static final short XLINEAR_YLOGARITHMIC
x-axis is linear y-axis is logarithmic

See Also:
Constant Field Values

XLOGARITHMIC_YLINEAR

public static final short XLOGARITHMIC_YLINEAR
x-axis is logarithmic y-axis is linear

See Also:
Constant Field Values

XLOGARITHMIC_YLOGARITHMIC

public static final short XLOGARITHMIC_YLOGARITHMIC
x-axis is logarithmic y-axis is logarithmic

See Also:
Constant Field Values

LABEL_X_AXIS

public static final java.lang.String LABEL_X_AXIS
LABEL_X_AXIS is the label on the X-axis

See Also:
Constant Field Values

LABEL_Y_AXIS

public static final java.lang.String LABEL_Y_AXIS
LABEL_Y_AXIS is the label on the Y-axis

See Also:
Constant Field Values

chart

protected org.jfree.chart.JFreeChart chart
chart refers to the chart


dataset

protected XYDataset dataset
dataset refers to the dataset


axisType

protected short axisType
the axis type of the chart

Constructor Detail

XYChart

public XYChart(java.lang.String title)
constructs a new XYChart

Parameters:
title - the title

XYChart

public XYChart(java.lang.String title,
               short axisType)
constructs a new XYChart

Parameters:
title - the title
axisType - the axisType

XYChart

public XYChart(java.lang.String title,
               double[] domain)
constructs a new XYChart

Parameters:
title - tht title
domain - the domain

XYChart

public XYChart(java.lang.String title,
               double[] domain,
               short axisType)
constructs a new XYChart

Parameters:
title - tht title
domain - the domain
axisType - the axisType to use.

XYChart

public XYChart(java.lang.String title,
               double[] domain,
               double[] range)
constructs a new XYChart

Parameters:
title - the title
domain - the domain
range - the range

XYChart

public XYChart(java.lang.String title,
               double[] domain,
               double[] range,
               short axisType)
constructs a new XYChart

Parameters:
title - the title
domain - the domain
range - the range
axisType - the type of the axsis
Method Detail

add

public void add(Persistent persistent)
adds a tally to the xyChart

Parameters:
persistent - the persistent

add

public void add(java.lang.String description,
                nl.tudelft.simulation.event.EventProducerInterface source,
                nl.tudelft.simulation.event.EventType eventType)
         throws java.rmi.RemoteException
adds an eventProducer to the xyChart

Parameters:
description - the description of the eventProducer
source - the souce
eventType - the event
Throws:
java.rmi.RemoteException - on network failure

getChart

public org.jfree.chart.JFreeChart getChart()
returns the chart

Returns:
JFreeChart

getSwingPanel

public java.awt.Container getSwingPanel()
returns the chartPanel of this xyChart

Specified by:
getSwingPanel in interface Swingable
Returns:
ChartPanel

getDataset

public XYDataset getDataset()
returns the dataset of a xyChart

Returns:
HistogramSeries


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.