jas2.hist.util
Class TwoDSliceAdapter
- java.lang.Object
-
- java.util.Observable
-
- jas2.hist.util.ObserverAdapter
-
- jas2.hist.util.TwoDAdapter
-
- jas2.hist.util.ScatterAdapter
-
- jas2.hist.util.TwoDSliceAdapter
-
- All Implemented Interfaces:
- DataSource, HasScatterPlotData, HasSlices, HasStatistics, HasStyle, Rebinnable2DHistogramData, SliceAdapter, java.util.Observer
- Direct Known Subclasses:
- ScatterSliceAdapter
public class TwoDSliceAdapter extends ScatterAdapter implements HasSlices, SliceAdapter
A Two2SliceAdapter can be used to convert any Rebinnable2DHistogramData object to a Rebinnable2DHistogramData which also implements HasSlices
-
-
Constructor Summary
Constructors Constructor and Description TwoDSliceAdapter(Rebinnable2DHistogramData source)
-
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 parametersvoidaddSliceListener(SliceListener l)booleancanAddRemoveSlices()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.voidremoveSlice(int n)Remove a slice from the sourcevoidremoveSliceListener(SliceListener l)-
Methods inherited from class jas2.hist.util.ScatterAdapter
hasScatterPlotData, startEnumeration, startEnumeration
-
Methods inherited from class jas2.hist.util.TwoDAdapter
getStatistics, getStyle, getTitle, getXAxisLabels, getXAxisType, getXBins, getXMax, getXMin, getYAxisLabels, getYAxisType, getYBins, getYMax, getYMin, isRebinnable, rebin, toString
-
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, wait, wait, wait
-
Methods inherited from interface jas2.hist.Rebinnable2DHistogramData
getXAxisLabels, getXAxisType, getXBins, getXMax, getXMin, getYAxisLabels, getYAxisType, getYBins, getYMax, getYMin, isRebinnable, rebin
-
Methods inherited from interface jas2.hist.DataSource
getTitle
-
-
-
-
Constructor Detail
-
TwoDSliceAdapter
public TwoDSliceAdapter(Rebinnable2DHistogramData source)
-
-
Method Detail
-
addSliceListener
public void addSliceListener(SliceListener l)
- Specified by:
addSliceListenerin interfaceSliceAdapter
-
removeSliceListener
public void removeSliceListener(SliceListener l)
- Specified by:
removeSliceListenerin interfaceSliceAdapter
-
getNSlices
public int getNSlices()
Description copied from interface:HasSlicesNumber of slices currently attached to plot- Specified by:
getNSlicesin interfaceHasSlices- Overrides:
getNSlicesin classTwoDAdapter
-
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- Overrides:
getSliceParametersin classTwoDAdapter- 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- Specified by:
getSlicein interfaceHasSlices- Overrides:
getSlicein classTwoDAdapter- Parameters:
n- The index of the slice- Returns:
- The data resulting from the slice
-
canAddRemoveSlices
public boolean canAddRemoveSlices()
- Specified by:
canAddRemoveSlicesin interfaceHasSlices- Overrides:
canAddRemoveSlicesin classTwoDAdapter
-
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- Specified by:
addSlicein interfaceHasSlices- Overrides:
addSlicein classTwoDAdapter- Returns:
- the index of the slice that was added
-
removeSlice
public void removeSlice(int n)
Description copied from interface:HasSlicesRemove a slice from the source- Specified by:
removeSlicein interfaceHasSlices- Overrides:
removeSlicein classTwoDAdapter- Parameters:
n- The index of the slice
-
-
DataMelt 3.0 © DataMelt by jWork.ORG