jas2.swingstudio
Class JAS2DRebinAdaptor
- java.lang.Object
-
- java.util.Observable
-
- jas2.swingstudio.JAS2DRebinAdaptor
-
- All Implemented Interfaces:
- DataSource, ExtendedStatistics, HasSlices, HasStatistics, HasStyle, Rebinnable2DHistogramData, Statistics, java.util.Observer
public class JAS2DRebinAdaptor extends java.util.Observable implements Rebinnable2DHistogramData, java.util.Observer, HasSlices, HasStyle, HasStatistics, ExtendedStatistics
-
-
Constructor Summary
Constructors Constructor and Description JAS2DRebinAdaptor(RemoteRebinnable2DHistogramData source, RMIDestination obs, RMIEventDelivery ed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intaddSlice(double x, double y, double width, double height, double phi)Create a new slice with the specified initial parametersbooleancanAddRemoveSlices()java.lang.ObjectgetExtendedStatistic(java.lang.String name)Returns an object corresponding to the named statistic.intgetNSlices()Number of slices currently attached to plotRebinnable1DHistogramDatagetSlice(int n)Get the data corresponding to the slice.SliceParametersgetSliceParameters(int n)Get the parameters of a slice.doublegetStatistic(java.lang.String name)java.lang.String[]getStatisticNames()StatisticsgetStatistics()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()intgetXBins()doublegetXMax()doublegetXMin()java.lang.String[]getYAxisLabels()intgetYAxisType()intgetYBins()doublegetYMax()doublegetYMin()booleanisRebinnable()double[][][]rebin(int xbins, double xmin, double xmax, int ybins, double ymin, double ymax, boolean wantErrors, boolean hurry, boolean overflow)Fetch binned data from remote data source.voidremoveSlice(int n)Remove a slice from the sourcejava.lang.StringtoString()voidupdate(java.util.Observable obs, java.lang.Object arg)
-
-
-
Constructor Detail
-
JAS2DRebinAdaptor
public JAS2DRebinAdaptor(RemoteRebinnable2DHistogramData source, RMIDestination obs, RMIEventDelivery ed)
-
-
Method Detail
-
update
public void update(java.util.Observable obs, java.lang.Object arg)- Specified by:
updatein interfacejava.util.Observer
-
rebin
public double[][][] rebin(int xbins, double xmin, double xmax, int ybins, double ymin, double ymax, boolean wantErrors, boolean hurry, boolean overflow)Fetch binned data from remote data source. Also caches result to speed up subsequent requests for the same binned data.- Specified by:
rebinin interfaceRebinnable2DHistogramData
-
getXMin
public double getXMin()
- Specified by:
getXMinin interfaceRebinnable2DHistogramData
-
getXMax
public double getXMax()
- Specified by:
getXMaxin interfaceRebinnable2DHistogramData
-
getYMin
public double getYMin()
- Specified by:
getYMinin interfaceRebinnable2DHistogramData
-
getYMax
public double getYMax()
- Specified by:
getYMaxin interfaceRebinnable2DHistogramData
-
getXBins
public int getXBins()
- Specified by:
getXBinsin interfaceRebinnable2DHistogramData
-
getYBins
public int getYBins()
- Specified by:
getYBinsin interfaceRebinnable2DHistogramData
-
getXAxisType
public int getXAxisType()
- Specified by:
getXAxisTypein interfaceRebinnable2DHistogramData
-
getYAxisType
public int getYAxisType()
- Specified by:
getYAxisTypein interfaceRebinnable2DHistogramData
-
getXAxisLabels
public java.lang.String[] getXAxisLabels()
- Specified by:
getXAxisLabelsin interfaceRebinnable2DHistogramData
-
getYAxisLabels
public java.lang.String[] getYAxisLabels()
- Specified by:
getYAxisLabelsin interfaceRebinnable2DHistogramData
-
isRebinnable
public boolean isRebinnable()
- Specified by:
isRebinnablein interfaceRebinnable2DHistogramData
-
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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getStatistics
public Statistics getStatistics()
- Specified by:
getStatisticsin interfaceHasStatistics
-
getStatisticNames
public java.lang.String[] getStatisticNames()
- Specified by:
getStatisticNamesin interfaceStatistics- Returns:
- A list of statistic names
-
getStatistic
public double getStatistic(java.lang.String name)
- Specified by:
getStatisticin interfaceStatistics- Returns:
- The value for the statistic
-
getExtendedStatistic
public java.lang.Object getExtendedStatistic(java.lang.String name)
Description copied from interface:ExtendedStatisticsReturns an object corresponding to the named statistic. In general the statistic will be displayed by calling its toString method, however if a Format object has been defined for this class (how?) then it will be used instead. By default the following formatters are defined- java.lang.Double
- jas2.util.ScientificFormat
- jas2.util.DoubleWithError
- jas2.util.ScientificFormat
- Specified by:
getExtendedStatisticin interfaceExtendedStatistics- Parameters:
name- The name of the statistic to return- See Also:
ScientificFormat,DoubleWithError
-
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
-
getNSlices
public int getNSlices()
Description copied from interface:HasSlicesNumber of slices currently attached to plot- Specified by:
getNSlicesin interfaceHasSlices
-
getSliceParameters
public SliceParameters getSliceParameters(int n)
Description copied from interface:HasSlicesGet the parameters of a slice. The SliceParameters can subsequently be changed to update the slice.- Specified by:
getSliceParametersin interfaceHasSlices- Parameters:
n- The index of the slice- Returns:
- The Slice parameters of the slice with the specified index
-
getSlice
public Rebinnable1DHistogramData getSlice(int n)
Description copied from interface:HasSlicesGet the data corresponding to the slice. The data will be observable and will notify its observers if the slice changes, or the data from which the slice is derived changes
-
canAddRemoveSlices
public boolean canAddRemoveSlices()
- Specified by:
canAddRemoveSlicesin interfaceHasSlices
-
addSlice
public int addSlice(double x, double y, double width, double height, double phi)Description copied from interface:HasSlicesCreate a new slice with the specified initial parameters
-
removeSlice
public void removeSlice(int n)
Description copied from interface:HasSlicesRemove a slice from the source- Specified by:
removeSlicein interfaceHasSlices- Parameters:
n- The index of the slice
-
-
DataMelt 3.0 © DataMelt by jWork.ORG