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

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

public class XYChart
extends Object
implements Swingable

The xyChart specifies the xyChart in DSOL.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:44 $
Author:
Peter Jacobs

Field Summary
protected  short axisType
          the axis type of the chart
protected  JFreeChart chart
          chart refers to the chart
protected  XYDataset 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
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(String title)
          constructs a new XYChart
XYChart(String title, double period)
          constructs a new XYChart
XYChart(String title, double[] domain)
          constructs a new XYChart
XYChart(String title, double[] domain, double[] range)
          constructs a new XYChart
XYChart(String title, double[] domain, double[] range, short axisType)
          constructs a new XYChart
XYChart(String title, double[] domain, short axisType)
          constructs a new XYChart
XYChart(String title, double period, double[] range)
          constructs a new XYChart
XYChart(String title, double period, double[] range, short axisType)
          constructs a new XYChart
XYChart(String title, double period, short axisType)
          constructs a new XYChart
XYChart(String title, short axisType)
          constructs a new XYChart
 
Method Summary
 void add(Persistent persistent)
          adds a tally to the xyChart
 void add(String description, EventProducerInterface source, EventType eventType)
          adds an eventProducer to the xyChart
 JFreeChart getChart()
          returns the chart
 XYDataset getDataset()
          returns the dataset of a xyChart
 Container getSwingPanel()
          returns the chartPanel of this xyChart
 void setFilter(Filterinterface filter)
          applies a filter on the chart
 
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 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 String LABEL_Y_AXIS
LABEL_Y_AXIS is the label on the Y-axis

See Also:
Constant Field Values

chart

protected 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(String title)
constructs a new XYChart

Parameters:
title - the title

XYChart

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

Parameters:
title - the title
axisType - the axisType

XYChart

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

Parameters:
title - tht title
domain - the domain

XYChart

public XYChart(String title,
               double period)
constructs a new XYChart

Parameters:
title - tht title
period - the period to show in the domain

XYChart

public XYChart(String title,
               double period,
               short axisType)
constructs a new XYChart

Parameters:
title - tht title
period - the period to show in the domain
axisType - the axisType to use.

XYChart

public XYChart(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(String title,
               double[] domain,
               double[] range)
constructs a new XYChart

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

XYChart

public XYChart(String title,
               double period,
               double[] range)
constructs a new XYChart

Parameters:
title - the title
period - the period to show in the domain
range - the range

XYChart

public XYChart(String title,
               double period,
               double[] range,
               short axisType)
constructs a new XYChart

Parameters:
title - the title
period - the period to show in the domain
range - the range
axisType - the type of the axsis

XYChart

public XYChart(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(String description,
                EventProducerInterface source,
                EventType eventType)
         throws RemoteException
adds an eventProducer to the xyChart

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

getChart

public JFreeChart getChart()
returns the chart

Returns:
JFreeChart

getSwingPanel

public 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

setFilter

public void setFilter(Filterinterface filter)
applies a filter on the chart

Parameters:
filter - the filter to apply


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