jas.hist.util
Class ScatterTwoDAdapter

java.lang.Object
  |
  +--java.util.Observable
        |
        +--jas.hist.util.ObserverAdapter
              |
              +--jas.hist.util.ScatterSourceAdapter
                    |
                    +--jas.hist.util.ScatterTwoDAdapter
All Implemented Interfaces:
DataSource, HasScatterPlotData, HasStyle, java.util.Observer, Rebinnable2DHistogramData, ScatterPlotSource

public class ScatterTwoDAdapter
extends jas.hist.util.ScatterSourceAdapter
implements Rebinnable2DHistogramData, HasScatterPlotData

An adaptor that converts a ScatterPlotSource to a DataSource that implements both Rebinnable2DHistogramData and HasScatterPlotData


Field Summary
protected  ScatterPlotSource source
           
 
Fields inherited from interface jas.hist.DataSource
DATE, DELTATIME, DOUBLE, INTEGER, STRING
 
Constructor Summary
ScatterTwoDAdapter(ScatterPlotSource source)
           
 
Method Summary
 JASHistStyle getStyle()
          This method is called by the plot to determine what style to be used for a plot.
 java.lang.String getTitle()
          Return the caption to be used in the legend for this data.
 java.lang.String[] getXAxisLabels()
           
 int getXAxisType()
          Currently we only support DATE and DOUBLE types
 int getXBins()
           
 double getXMax()
           
 double getXMin()
           
 java.lang.String[] getYAxisLabels()
           
 int getYAxisType()
          Currently we only support DOUBLE
 int getYBins()
           
 double getYMax()
           
 double getYMin()
           
 boolean hasScatterPlotData()
          Even if a DataSource implements this interface it may not have any ScatterPlot data available at this time, hence the need for this method.
 boolean isRebinnable()
           
 double[][][] rebin(int Xbins, double Xmin, double Xmax, int Ybins, double Ymin, double Ymax, boolean wantErrors, boolean hurry, boolean overflow)
           
 ScatterEnumeration startEnumeration()
          Starts the enumeration of points from the beginning, and the enumeration will include all points stored in the partition.
 ScatterEnumeration startEnumeration(double xMin, double xMax, double yMin, double yMax)
          Starts the enumeration of points from the beginning, and the enumeration will include only points in the given range.
 
Methods inherited from class jas.hist.util.ObserverAdapter
addObserver, clearObservable, deleteObserver, deleteObservers, setObservable, update
 
Methods inherited from class java.util.Observable
clearChanged, countObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jas.hist.Rebinnable2DHistogramData
getXAxisType, getXMax, getXMin, getYAxisType, getYMax, getYMin
 
Methods inherited from interface jas.hist.DataSource
getTitle
 
Methods inherited from interface jas.hist.HasScatterPlotData
startEnumeration, startEnumeration
 

Field Detail

source

protected ScatterPlotSource source
Constructor Detail

ScatterTwoDAdapter

public ScatterTwoDAdapter(ScatterPlotSource source)
Method Detail

rebin

public double[][][] rebin(int Xbins,
                          double Xmin,
                          double Xmax,
                          int Ybins,
                          double Ymin,
                          double Ymax,
                          boolean wantErrors,
                          boolean hurry,
                          boolean overflow)
Specified by:
rebin in interface Rebinnable2DHistogramData

getXBins

public int getXBins()
Specified by:
getXBins in interface Rebinnable2DHistogramData

getYBins

public int getYBins()
Specified by:
getYBins in interface Rebinnable2DHistogramData

isRebinnable

public boolean isRebinnable()
Specified by:
isRebinnable in interface Rebinnable2DHistogramData

getXAxisLabels

public java.lang.String[] getXAxisLabels()
Specified by:
getXAxisLabels in interface Rebinnable2DHistogramData

getYAxisLabels

public java.lang.String[] getYAxisLabels()
Specified by:
getYAxisLabels in interface Rebinnable2DHistogramData

hasScatterPlotData

public boolean hasScatterPlotData()
Description copied from interface: HasScatterPlotData
Even if a DataSource implements this interface it may not have any ScatterPlot data available at this time, hence the need for this method.
Specified by:
hasScatterPlotData in interface HasScatterPlotData

startEnumeration

public ScatterEnumeration startEnumeration(double xMin,
                                           double xMax,
                                           double yMin,
                                           double yMax)
Description copied from interface: ScatterPlotSource
Starts the enumeration of points from the beginning, and the enumeration will include only points in the given range.
Specified by:
startEnumeration in interface ScatterPlotSource

startEnumeration

public ScatterEnumeration startEnumeration()
Description copied from interface: ScatterPlotSource
Starts the enumeration of points from the beginning, and the enumeration will include all points stored in the partition.
Specified by:
startEnumeration in interface ScatterPlotSource

getXMin

public double getXMin()
Specified by:
getXMin in interface ScatterPlotSource

getXMax

public double getXMax()
Specified by:
getXMax in interface ScatterPlotSource

getYMin

public double getYMin()
Specified by:
getYMin in interface ScatterPlotSource

getYMax

public double getYMax()
Specified by:
getYMax in interface ScatterPlotSource

getXAxisType

public int getXAxisType()
Description copied from interface: ScatterPlotSource
Currently we only support DATE and DOUBLE types
Specified by:
getXAxisType in interface ScatterPlotSource

getYAxisType

public int getYAxisType()
Description copied from interface: ScatterPlotSource
Currently we only support DOUBLE
Specified by:
getYAxisType in interface ScatterPlotSource

getTitle

public java.lang.String getTitle()
Description copied from interface: DataSource
Return the caption to be used in the legend for this data.
Specified by:
getTitle in interface DataSource

getStyle

public JASHistStyle getStyle()
Description copied from interface: HasStyle
This method is called by the plot to determine what style to be used for a plot. It is the programmers responsibility to return the correct subclass of JASHistStyle corresponding to the type of data being implemented by the DataSource.
Specified by:
getStyle in interface HasStyle
Following copied from interface: jas.hist.HasStyle
Returns:
The style to be used, or null to use the default style.
See Also:
JASHist1DHistogramStyle, JASHist2DHistogramStyle, JASHistScatterPlotStyle