com.ge.research.charts.jfree.data
Class DefaultIntervalXYDataset

java.lang.Object
  extended byorg.jfree.data.AbstractDataset
      extended byorg.jfree.data.AbstractSeriesDataset
          extended bycom.ge.research.charts.jfree.data.DefaultIntervalXYDataset
All Implemented Interfaces:
java.lang.Cloneable, org.jfree.data.Dataset, java.util.EventListener, org.jfree.data.IntervalXYDataset, java.io.ObjectInputValidation, java.io.Serializable, org.jfree.data.SeriesChangeListener, org.jfree.data.SeriesDataset, org.jfree.data.XYDataset

public class DefaultIntervalXYDataset
extends org.jfree.data.AbstractSeriesDataset
implements org.jfree.data.IntervalXYDataset

A default, generic, implementation of the IntervalXYDataset interface that allows a range of data to be defined for the X values, the Y values, or both the X and Y values. This class supports bar plots against numerical axes.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:55 $
Author:
garbiras
See Also:
Serialized Form

Constructor Summary
DefaultIntervalXYDataset()
           
 
Method Summary
 void add(double[] xStart, double[] yStart, double[] xEnd, double[] yEnd)
          Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes.
 void add(java.lang.Number[] xStart, java.lang.Number[] yStart, java.lang.Number[] xEnd, java.lang.Number[] yEnd)
          Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes.
 void add(java.lang.String seriesName, double[] xStart, double[] yStart, double[] xEnd, double[] yEnd)
          Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes.
 void add(java.lang.String seriesName, java.lang.Number[] xStart, java.lang.Number[] yStart, java.lang.Number[] xEnd, java.lang.Number[] yEnd)
          Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes.
 void addSeries(org.jfree.data.XYSeries series)
          Adds a single dataseries to the dataset.
 void addSeries(org.jfree.data.XYSeries startSeries, org.jfree.data.XYSeries endSeries)
          Adds a single dataseries to the dataset.
 java.lang.Number getEndXValue(int series, int item)
           
 java.lang.Number getEndYValue(int series, int item)
           
 int getItemCount(int series)
           
 int getSeriesCount()
           
 java.lang.String getSeriesName(int series)
           
 java.lang.Number getStartXValue(int series, int item)
           
 java.lang.Number getStartYValue(int series, int item)
           
 java.lang.Number getXValue(int series, int item)
           
 java.lang.Number getYValue(int series, int item)
           
 void setEndXValue(int series, int item, java.lang.Number value)
          Sets the interval end value along the x axis for the datapoint at index item within ordered series series.
 void setEndYValue(int series, int item, java.lang.Number value)
          Sets the interval end value along the y axis for the datapoint at index item within ordered series series.
 void setSeriesName(int series, java.lang.String name)
          Sets the name of the dataseries.
 void setStartXValue(int series, int item, java.lang.Number value)
          Sets the interval start value along the x axis for the datapoint at index item within ordered series series.
 void setStartYValue(int series, int item, java.lang.Number value)
          Sets the interval start value along the y axis for the datapoint at index item within ordered series series.
 
Methods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChanged
 
Methods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup
 

Constructor Detail

DefaultIntervalXYDataset

public DefaultIntervalXYDataset()
Method Detail

add

public void add(double[] xStart,
                double[] yStart,
                double[] xEnd,
                double[] yEnd)
Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes. The new dataseries is given a name equivalent to it's order within the dataset (e.g. "Series 4")

Parameters:
xStart - the array of interval start values along the x axis for the dataseries
yStart - the array of interval start values along the y axis for the dataseries
xEnd - the array of interval end values along the x axis for the dataseries
yEnd - the array of interval end values along the y axis for the dataseries
See Also:
add(java.lang.Number[], java.lang.Number[], java.lang.Number[], java.lang.Number[]), DatasetUtilities.createNumberArray(double[])

add

public void add(java.lang.Number[] xStart,
                java.lang.Number[] yStart,
                java.lang.Number[] xEnd,
                java.lang.Number[] yEnd)
Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes. The new dataseries is given a name equivalent to it's order within the dataset (e.g. "Series 4")

Parameters:
xStart - the array of interval start values along the x axis for the dataseries
yStart - the array of interval start values along the y axis for the dataseries
xEnd - the array of interval end values along the x axis for the dataseries
yEnd - the array of interval end values along the y axis for the dataseries
See Also:
add(java.lang.String, java.lang.Number[], java.lang.Number[], java.lang.Number[], java.lang.Number[])

add

public void add(java.lang.String seriesName,
                double[] xStart,
                double[] yStart,
                double[] xEnd,
                double[] yEnd)
Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes. The new dataseries' name is set to the argument seriesName

Parameters:
seriesName - the name of the dataseries (null allowed)
xStart - the array of interval start values along the x axis for the dataseries
yStart - the array of interval start values along the y axis for the dataseries
xEnd - the array of interval end values along the x axis for the dataseries
yEnd - the array of interval end values along the y axis for the dataseries
See Also:
add(java.lang.String, java.lang.Number[], java.lang.Number[], java.lang.Number[], java.lang.Number[]), DatasetUtilities.createNumberArray(double[])

add

public void add(java.lang.String seriesName,
                java.lang.Number[] xStart,
                java.lang.Number[] yStart,
                java.lang.Number[] xEnd,
                java.lang.Number[] yEnd)
Adds a new dataseries to this dataset using the argument values for the start/end values for the intervals around the x and y axes. The new dataseries' name is set to the argument seriesName

Parameters:
seriesName - the name of the dataseries (null allowed)
xStart - the array of interval start values along the x axis for the dataseries
yStart - the array of interval start values along the y axis for the dataseries
xEnd - the array of interval end values along the x axis for the dataseries
yEnd - the array of interval end values along the y axis for the dataseries

addSeries

public void addSeries(org.jfree.data.XYSeries series)
Adds a single dataseries to the dataset. Does this by using the values from the series as both the starting and ending values for the x's and y's

Parameters:
series - the dataseries to add to this dataset
See Also:
addSeries(org.jfree.data.XYSeries, org.jfree.data.XYSeries)

addSeries

public void addSeries(org.jfree.data.XYSeries startSeries,
                      org.jfree.data.XYSeries endSeries)
Adds a single dataseries to the dataset. Does this by combining the x and and y values from the startSeries and endSeries into a single dataseries. Four Lists are created (startx, starty, endx, endy) to store information about each point in the new dataseries, and the values are populated in order form the appropriate argument series. Finally a Map is created to store these Lists and then placed in teh ordered List of dataset series information.

Parameters:
startSeries - the series containing the starting x and y values
endSeries - the series containing the ending x and y values

getEndXValue

public java.lang.Number getEndXValue(int series,
                                     int item)
Specified by:
getEndXValue in interface org.jfree.data.IntervalXYDataset

getEndYValue

public java.lang.Number getEndYValue(int series,
                                     int item)
Specified by:
getEndYValue in interface org.jfree.data.IntervalXYDataset

getItemCount

public int getItemCount(int series)
Specified by:
getItemCount in interface org.jfree.data.XYDataset

getSeriesCount

public int getSeriesCount()
Specified by:
getSeriesCount in interface org.jfree.data.SeriesDataset

getSeriesName

public java.lang.String getSeriesName(int series)
Specified by:
getSeriesName in interface org.jfree.data.SeriesDataset

getStartXValue

public java.lang.Number getStartXValue(int series,
                                       int item)
Specified by:
getStartXValue in interface org.jfree.data.IntervalXYDataset

getStartYValue

public java.lang.Number getStartYValue(int series,
                                       int item)
Specified by:
getStartYValue in interface org.jfree.data.IntervalXYDataset

getXValue

public java.lang.Number getXValue(int series,
                                  int item)
Specified by:
getXValue in interface org.jfree.data.XYDataset

getYValue

public java.lang.Number getYValue(int series,
                                  int item)
Specified by:
getYValue in interface org.jfree.data.XYDataset

setEndXValue

public void setEndXValue(int series,
                         int item,
                         java.lang.Number value)
Sets the interval end value along the x axis for the datapoint at index item within ordered series series.

Parameters:
series - which series the data value is for
item - which datapoint of the series the data value is for
value - the new value of the datapoint

setEndYValue

public void setEndYValue(int series,
                         int item,
                         java.lang.Number value)
Sets the interval end value along the y axis for the datapoint at index item within ordered series series.

Parameters:
series - which series the data value is for
item - which datapoint of the series the data value is for
value - the new value of the datapoint

setStartXValue

public void setStartXValue(int series,
                           int item,
                           java.lang.Number value)
Sets the interval start value along the x axis for the datapoint at index item within ordered series series.

Parameters:
series - which series the data value is for
item - which datapoint of the series the data value is for
value - the new value of the datapoint

setStartYValue

public void setStartYValue(int series,
                           int item,
                           java.lang.Number value)
Sets the interval start value along the y axis for the datapoint at index item within ordered series series.

Parameters:
series - which series the data value is for
item - which datapoint of the series the data value is for
value - the new value of the datapoint

setSeriesName

public void setSeriesName(int series,
                          java.lang.String name)
Sets the name of the dataseries.

Parameters:
series - which series the name is for
name - the new name of the dataseries