edu.ucla.stat.SOCR.chart.data
Class SimpleIntervalXYDataset2

java.lang.Object
  extended by org.jfree.data.general.AbstractDataset
      extended by org.jfree.data.general.AbstractSeriesDataset
          extended by org.jfree.data.xy.AbstractXYDataset
              extended by org.jfree.data.xy.AbstractIntervalXYDataset
                  extended by edu.ucla.stat.SOCR.chart.data.SimpleIntervalXYDataset2
All Implemented Interfaces:
java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, org.jfree.data.general.Dataset, org.jfree.data.general.SeriesChangeListener, org.jfree.data.general.SeriesDataset, org.jfree.data.xy.IntervalXYDataset, org.jfree.data.xy.XYDataset

public class SimpleIntervalXYDataset2
extends org.jfree.data.xy.AbstractIntervalXYDataset
implements org.jfree.data.xy.IntervalXYDataset

A quick and dirty sample dataset.

See Also:
Serialized Form

Constructor Summary
SimpleIntervalXYDataset2(int itemCount)
          Creates a new dataset.
SimpleIntervalXYDataset2(int itemCount, double[] x, double[] y1, double[] y2)
           
 
Method Summary
 void addChangeListener(org.jfree.data.general.DatasetChangeListener listener)
          Registers an object for notification of changes to the dataset.
 java.lang.Number getEndX(int series, int item)
          Returns the ending X value for the specified series and item.
 java.lang.Number getEndY(int series, int item)
          Returns the ending Y value for the specified series and item.
 int getItemCount(int series)
          Returns the number of items in a series.
 int getSeriesCount()
          Returns the number of series in the dataset.
 java.lang.Comparable getSeriesKey(int series)
          Returns the key for a series.
 java.lang.Number getStartX(int series, int item)
          Returns the starting X value for the specified series and item.
 java.lang.Number getStartY(int series, int item)
          Returns the starting Y value for the specified series and item.
 java.lang.Number getX(int series, int item)
          Returns the x-value for an item within a series.
 java.lang.Number getY(int series, int item)
          Returns the y-value for an item within a series.
 void removeChangeListener(org.jfree.data.general.DatasetChangeListener listener)
          Deregisters an object for notification of changes to the dataset.
 
Methods inherited from class org.jfree.data.xy.AbstractIntervalXYDataset
getEndXValue, getEndYValue, getStartXValue, getStartYValue
 
Methods inherited from class org.jfree.data.xy.AbstractXYDataset
getDomainOrder, getXValue, getYValue
 
Methods inherited from class org.jfree.data.general.AbstractSeriesDataset
indexOf, seriesChanged
 
Methods inherited from class org.jfree.data.general.AbstractDataset
clone, fireDatasetChanged, getGroup, hasListener, notifyListeners, 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.xy.IntervalXYDataset
getEndXValue, getEndYValue, getStartXValue, getStartYValue
 
Methods inherited from interface org.jfree.data.xy.XYDataset
getDomainOrder, getXValue, getYValue
 
Methods inherited from interface org.jfree.data.general.SeriesDataset
indexOf
 
Methods inherited from interface org.jfree.data.general.Dataset
getGroup, setGroup
 

Constructor Detail

SimpleIntervalXYDataset2

public SimpleIntervalXYDataset2(int itemCount)
Creates a new dataset.

Parameters:
itemCount - the number of items to generate.

SimpleIntervalXYDataset2

public SimpleIntervalXYDataset2(int itemCount,
                                double[] x,
                                double[] y1,
                                double[] y2)
Method Detail

getSeriesCount

public int getSeriesCount()
Returns the number of series in the dataset.

Specified by:
getSeriesCount in interface org.jfree.data.general.SeriesDataset
Specified by:
getSeriesCount in class org.jfree.data.general.AbstractSeriesDataset
Returns:
the number of series in the dataset.

getSeriesKey

public java.lang.Comparable getSeriesKey(int series)
Returns the key for a series.

Specified by:
getSeriesKey in interface org.jfree.data.general.SeriesDataset
Specified by:
getSeriesKey in class org.jfree.data.general.AbstractSeriesDataset
Parameters:
series - the series (zero-based index).
Returns:
The series key.

getItemCount

public int getItemCount(int series)
Returns the number of items in a series.

Specified by:
getItemCount in interface org.jfree.data.xy.XYDataset
Parameters:
series - the series (zero-based index).
Returns:
the number of items within a series.

getX

public java.lang.Number getX(int series,
                             int item)
Returns the x-value for an item within a series.

The implementation is responsible for ensuring that the x-values are presented in ascending order.

Specified by:
getX in interface org.jfree.data.xy.XYDataset
Parameters:
series - the series (zero-based index).
item - the item (zero-based index).
Returns:
the x-value for an item within a series.

getY

public java.lang.Number getY(int series,
                             int item)
Returns the y-value for an item within a series.

Specified by:
getY in interface org.jfree.data.xy.XYDataset
Parameters:
series - the series (zero-based index).
item - the item (zero-based index).
Returns:
the y-value for an item within a series.

getStartX

public java.lang.Number getStartX(int series,
                                  int item)
Returns the starting X value for the specified series and item.

Specified by:
getStartX in interface org.jfree.data.xy.IntervalXYDataset
Parameters:
series - the series (zero-based index).
item - the item within a series (zero-based index).
Returns:
the start x value.

getEndX

public java.lang.Number getEndX(int series,
                                int item)
Returns the ending X value for the specified series and item.

Specified by:
getEndX in interface org.jfree.data.xy.IntervalXYDataset
Parameters:
series - the series (zero-based index).
item - the item within a series (zero-based index).
Returns:
the end x value.

getStartY

public java.lang.Number getStartY(int series,
                                  int item)
Returns the starting Y value for the specified series and item.

Specified by:
getStartY in interface org.jfree.data.xy.IntervalXYDataset
Parameters:
series - the series (zero-based index).
item - the item within a series (zero-based index).
Returns:
the start y value.

getEndY

public java.lang.Number getEndY(int series,
                                int item)
Returns the ending Y value for the specified series and item.

Specified by:
getEndY in interface org.jfree.data.xy.IntervalXYDataset
Parameters:
series - the series (zero-based index).
item - the item within a series (zero-based index).
Returns:
the end y value.

addChangeListener

public void addChangeListener(org.jfree.data.general.DatasetChangeListener listener)
Registers an object for notification of changes to the dataset.

Specified by:
addChangeListener in interface org.jfree.data.general.Dataset
Overrides:
addChangeListener in class org.jfree.data.general.AbstractDataset
Parameters:
listener - the object to register.

removeChangeListener

public void removeChangeListener(org.jfree.data.general.DatasetChangeListener listener)
Deregisters an object for notification of changes to the dataset.

Specified by:
removeChangeListener in interface org.jfree.data.general.Dataset
Overrides:
removeChangeListener in class org.jfree.data.general.AbstractDataset
Parameters:
listener - the object to deregister.