Graphics
Class DynamicXYDataset

java.lang.Object
  extended bycom.jrefinery.data.AbstractDataset
      extended bycom.jrefinery.data.AbstractSeriesDataset
          extended bycom.jrefinery.data.DefaultXYDataset
              extended byGraphics.DynamicXYDataset
All Implemented Interfaces:
com.jrefinery.data.Dataset, com.jrefinery.data.SeriesChangeListener, com.jrefinery.data.SeriesDataset, com.jrefinery.data.XYDataset

public class DynamicXYDataset
extends com.jrefinery.data.DefaultXYDataset

Dynamic Dataset for series (functions) on the same domain [x_min,x_max] sampled at evenly spaced points in this interval. The number of points can vary from series to series. Works together with JGraph.


Field Summary
 
Fields inherited from class com.jrefinery.data.DefaultXYDataset
allSeriesData
 
Fields inherited from class com.jrefinery.data.AbstractDataset
listeners
 
Constructor Summary
DynamicXYDataset(double x_min, double x_max)
          Domain for all series is [x_min,x_max].
 
Method Summary
 void addSeries(double[] srs, java.lang.String srsName)
          A series is added by passing the array of values and the name of the series to this method.
 int getItemCount(int j)
           
 java.util.Vector getSeries()
          The vector of series arrays.
 int getSeriesCount()
          The number of series in the data set.
 java.lang.String getSeriesName(int j)
           
 java.util.Vector getSeriesNames()
          The vector of series names.
 java.lang.Number getXValue(int j, int k)
           
 java.lang.Number getYValue(int j, int k)
           
 java.util.Vector seriesNameListFromDataArray()
           
 void setSeriesNames(java.lang.String[] seriesNames)
          Sets the names of the series in the data source.
 
Methods inherited from class com.jrefinery.data.DefaultXYDataset
seriesNameListFromDataArray
 
Methods inherited from class com.jrefinery.data.AbstractSeriesDataset
getLegendItemCount, getLegendItemLabels, seriesChanged
 
Methods inherited from class com.jrefinery.data.AbstractDataset
addChangeListener, fireDatasetChanged, notifyListeners, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.data.Dataset
addChangeListener, removeChangeListener
 

Constructor Detail

DynamicXYDataset

public DynamicXYDataset(double x_min,
                        double x_max)

Domain for all series is [x_min,x_max].

Parameters:
x_min - minimum x-value
x_max - minimum x-value
Method Detail

getSeries

public java.util.Vector getSeries()
The vector of series arrays.


getSeriesNames

public java.util.Vector getSeriesNames()
The vector of series names. These go in the legend.


getSeriesCount

public int getSeriesCount()
The number of series in the data set.


getItemCount

public int getItemCount(int j)
Parameters:
j - number of series in data set.

getSeriesName

public java.lang.String getSeriesName(int j)
Parameters:
j - number of series in data set.

getXValue

public java.lang.Number getXValue(int j,
                                  int k)
Parameters:
j - number of series in data set.
k - number of point in series j.

getYValue

public java.lang.Number getYValue(int j,
                                  int k)
Parameters:
j - number of series in data set.
k - number of point in series j.

seriesNameListFromDataArray

public java.util.Vector seriesNameListFromDataArray()

setSeriesNames

public void setSeriesNames(java.lang.String[] seriesNames)
Sets the names of the series in the data source.

Parameters:
seriesNames - The names of the series in the data source.

addSeries

public void addSeries(double[] srs,
                      java.lang.String srsName)

A series is added by passing the array of values and the name of the series to this method.

Parameters:
srs - array of series values.
srsName - name of series (goes in legend).