jas2.hist.util
Class ScatterTwoDAdapter
- java.lang.Object
-
- java.util.Observable
-
- jas2.hist.util.ObserverAdapter
-
- jas2.hist.util.ScatterTwoDAdapter
-
- All Implemented Interfaces:
- DataSource, HasScatterPlotData, HasStyle, Rebinnable2DHistogramData, ScatterPlotSource, java.util.Observer
public class ScatterTwoDAdapter extends ObserverAdapter implements Rebinnable2DHistogramData, HasScatterPlotData
An adaptor that converts a ScatterPlotSource to a DataSource that implements both Rebinnable2DHistogramData and HasScatterPlotData
-
-
Constructor Summary
Constructors Constructor and Description ScatterTwoDAdapter(ScatterPlotSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description JASHistStylegetStyle()This method is called by the plot to determine what style to be used for a plot.java.lang.StringgetTitle()Return the caption to be used in the legend for this data.java.lang.String[]getXAxisLabels()intgetXAxisType()Currently we only support DATE and DOUBLE typesintgetXBins()doublegetXMax()doublegetXMin()java.lang.String[]getYAxisLabels()intgetYAxisType()Currently we only support DOUBLEintgetYBins()doublegetYMax()doublegetYMin()booleanhasScatterPlotData()Even if a DataSource implements this interface it may not have any ScatterPlot data available at this time, hence the need for this method.booleanisRebinnable()double[][][]rebin(int Xbins, double Xmin, double Xmax, int Ybins, double Ymin, double Ymax, boolean wantErrors, boolean hurry, boolean overflow)ScatterEnumerationstartEnumeration()Starts the enumeration of points from the beginning, and the enumeration will include all points stored in the partition.ScatterEnumerationstartEnumeration(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 jas2.hist.util.ObserverAdapter
addObserver, clearObservable, deleteObserver, deleteObservers, setObservable, update
-
Methods inherited from class java.util.Observable
countObservers, hasChanged, notifyObservers, notifyObservers
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jas2.hist.HasScatterPlotData
startEnumeration, startEnumeration
-
Methods inherited from interface jas2.hist.Rebinnable2DHistogramData
getXAxisType, getXMax, getXMin, getYAxisType, getYMax, getYMin
-
Methods inherited from interface jas2.hist.DataSource
getTitle
-
-
-
-
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:
rebinin interfaceRebinnable2DHistogramData
-
getXBins
public int getXBins()
- Specified by:
getXBinsin interfaceRebinnable2DHistogramData
-
getYBins
public int getYBins()
- Specified by:
getYBinsin interfaceRebinnable2DHistogramData
-
isRebinnable
public boolean isRebinnable()
- Specified by:
isRebinnablein interfaceRebinnable2DHistogramData
-
getXAxisLabels
public java.lang.String[] getXAxisLabels()
- Specified by:
getXAxisLabelsin interfaceRebinnable2DHistogramData
-
getYAxisLabels
public java.lang.String[] getYAxisLabels()
- Specified by:
getYAxisLabelsin interfaceRebinnable2DHistogramData
-
hasScatterPlotData
public boolean hasScatterPlotData()
Description copied from interface:HasScatterPlotDataEven 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:
hasScatterPlotDatain interfaceHasScatterPlotData
-
startEnumeration
public ScatterEnumeration startEnumeration(double xMin, double xMax, double yMin, double yMax)
Description copied from interface:ScatterPlotSourceStarts the enumeration of points from the beginning, and the enumeration will include only points in the given range.- Specified by:
startEnumerationin interfaceScatterPlotSource
-
startEnumeration
public ScatterEnumeration startEnumeration()
Description copied from interface:ScatterPlotSourceStarts the enumeration of points from the beginning, and the enumeration will include all points stored in the partition.- Specified by:
startEnumerationin interfaceScatterPlotSource
-
getXMin
public double getXMin()
- Specified by:
getXMinin interfaceScatterPlotSource
-
getXMax
public double getXMax()
- Specified by:
getXMaxin interfaceScatterPlotSource
-
getYMin
public double getYMin()
- Specified by:
getYMinin interfaceScatterPlotSource
-
getYMax
public double getYMax()
- Specified by:
getYMaxin interfaceScatterPlotSource
-
getXAxisType
public int getXAxisType()
Description copied from interface:ScatterPlotSourceCurrently we only support DATE and DOUBLE types- Specified by:
getXAxisTypein interfaceScatterPlotSource
-
getYAxisType
public int getYAxisType()
Description copied from interface:ScatterPlotSourceCurrently we only support DOUBLE- Specified by:
getYAxisTypein interfaceScatterPlotSource
-
getTitle
public java.lang.String getTitle()
Description copied from interface:DataSourceReturn the caption to be used in the legend for this data.- Specified by:
getTitlein interfaceDataSource
-
getStyle
public JASHistStyle getStyle()
Description copied from interface:HasStyleThis 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:
getStylein interfaceHasStyle- Returns:
- The style to be used, or null to use the default style.
- See Also:
JASHist1DHistogramStyle,JASHist2DHistogramStyle,JASHistScatterPlotStyle
-
-
DataMelt 3.0 © DataMelt by jWork.ORG