gov.sns.tools.plot
Class DataSetJF

java.lang.Object
  |
  +--gov.sns.tools.plot.DataSetJF
All Implemented Interfaces:
com.jrefinery.data.Dataset, com.jrefinery.data.SeriesDataset, com.jrefinery.data.XYDataset

public class DataSetJF
extends java.lang.Object
implements com.jrefinery.data.XYDataset


Constructor Summary
DataSetJF(java.util.ArrayList xl, java.util.ArrayList yl)
          data set constructor for multi-curve plots without legends Data is entered in the form of ArrayLists.
DataSetJF(java.util.ArrayList xl, java.util.ArrayList yl, java.util.ArrayList ns)
          data set constructor for multi-curve plots with legends Data is entered in the form of ArrayLists.
DataSetJF(double[] x, double[] y)
           
 
Method Summary
 void addChangeListener(com.jrefinery.data.DatasetChangeListener dcl)
           
 int getItemCount(int series)
           
 int getSeriesCount()
           
 java.lang.String getSeriesName(int series)
           
 java.lang.Number getXValue(int series, int item)
           
 java.lang.Number getYValue(int series, int item)
           
 double maxX()
          return the maximum of all x values
 double maxY()
          return the maximum of all y values
 double minX()
          return the minimum of all x values
 double minY()
          return the minimum of all y values
 void removeChangeListener(com.jrefinery.data.DatasetChangeListener dcl)
           
 void setData(java.util.ArrayList xl, java.util.ArrayList yl)
          routine to assign data from ArrayLists to local simple double [][] arrays.
 boolean useLegend()
          whether info for a legend was supplied or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSetJF

public DataSetJF(java.util.ArrayList xl,
                 java.util.ArrayList yl,
                 java.util.ArrayList ns)
          throws XalException
data set constructor for multi-curve plots with legends Data is entered in the form of ArrayLists. Each element of the ArrayList is a double array containing the data to be plotted. The first curve has its x data points stored in the first element of the "x" ArrayList. Similar for the y points. Note: each curve can have different number of points.


DataSetJF

public DataSetJF(java.util.ArrayList xl,
                 java.util.ArrayList yl)
          throws XalException
data set constructor for multi-curve plots without legends Data is entered in the form of ArrayLists. Each element of the ArrayList is a double array containing the data to be plotted. The first curve has its x data points stored in the first element of the "x" ArrayList. Similar for the y points. Note: each curve can have different number of points.


DataSetJF

public DataSetJF(double[] x,
                 double[] y)
          throws XalException
Method Detail

minX

public double minX()
return the minimum of all x values


maxX

public double maxX()
return the maximum of all x values


minY

public double minY()
return the minimum of all y values


maxY

public double maxY()
return the maximum of all y values


useLegend

public boolean useLegend()
whether info for a legend was supplied or not


setData

public void setData(java.util.ArrayList xl,
                    java.util.ArrayList yl)
             throws XalException
routine to assign data from ArrayLists to local simple double [][] arrays. The thought is that this may be a bit faster for replotting etc. than for the more complex containers. I hope so, since memory use could be inefficient, if one curve contains more points than others.

XalException

getSeriesCount

public int getSeriesCount()
Specified by:
getSeriesCount in interface com.jrefinery.data.SeriesDataset

getSeriesName

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

getItemCount

public int getItemCount(int series)
Specified by:
getItemCount in interface com.jrefinery.data.XYDataset

getXValue

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

getYValue

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

addChangeListener

public void addChangeListener(com.jrefinery.data.DatasetChangeListener dcl)
Specified by:
addChangeListener in interface com.jrefinery.data.Dataset

removeChangeListener

public void removeChangeListener(com.jrefinery.data.DatasetChangeListener dcl)
Specified by:
removeChangeListener in interface com.jrefinery.data.Dataset