jas.hist.util
Class TwoDSliceAdapter
java.lang.Object
java.util.Observable
jas.hist.util.ObserverAdapter
jas.hist.util.TwoDAdapter
jas.hist.util.ScatterAdapter
jas.hist.util.TwoDSliceAdapter
- All Implemented Interfaces:
- DataSource, HasScatterPlotData, HasSlices, HasStatistics, HasStyle, Rebinnable2DHistogramData, SliceAdapter, 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
| Methods inherited from class jas.hist.util.TwoDAdapter |
getStatistics, getStyle, getTitle, getXAxisLabels, getXAxisType, getXBins, getXMax, getXMin, getYAxisLabels, getYAxisType, getYBins, getYMax, getYMin, isRebinnable, rebin, toString |
| Methods inherited from interface jas.hist.Rebinnable2DHistogramData |
getXAxisLabels, getXAxisType, getXBins, getXMax, getXMin, getYAxisLabels, getYAxisType, getYBins, getYMax, getYMin, isRebinnable, rebin |
slices
protected Vector slices
TwoDSliceAdapter
public TwoDSliceAdapter(Rebinnable2DHistogramData source)
addSliceListener
public void addSliceListener(SliceListener l)
- Specified by:
addSliceListener in interface SliceAdapter
removeSliceListener
public void removeSliceListener(SliceListener l)
- Specified by:
removeSliceListener in interface SliceAdapter
fireSliceAdded
protected void fireSliceAdded(int index)
fireSliceRemoved
protected void fireSliceRemoved(int index)
getNSlices
public int getNSlices()
- Description copied from interface:
HasSlices
- Number of slices currently attached to plot
- Specified by:
getNSlices in interface HasSlices- Overrides:
getNSlices in class TwoDAdapter
getSliceParameters
public SliceParameters getSliceParameters(int n)
- Description copied from interface:
HasSlices
- Get the parameters of a slice. The SliceParameters can
subsequently be changed to update the slice.
- Specified by:
getSliceParameters in interface HasSlices- Overrides:
getSliceParameters in class TwoDAdapter
- 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:
HasSlices
- Get 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:
getSlice in interface HasSlices- Overrides:
getSlice in class TwoDAdapter
- Parameters:
n - The index of the slice
- Returns:
- The data resulting from the slice
canAddRemoveSlices
public boolean canAddRemoveSlices()
- Specified by:
canAddRemoveSlices in interface HasSlices- Overrides:
canAddRemoveSlices in class TwoDAdapter
addSlice
public int addSlice(double x,
double y,
double width,
double height,
double phi)
- Description copied from interface:
HasSlices
- Create a new slice with the specified initial parameters
- Specified by:
addSlice in interface HasSlices- Overrides:
addSlice in class TwoDAdapter
- Returns:
- the index of the slice that was added
removeSlice
public void removeSlice(int n)
- Description copied from interface:
HasSlices
- Remove a slice from the source
- Specified by:
removeSlice in interface HasSlices- Overrides:
removeSlice in class TwoDAdapter
- Parameters:
n - The index of the slice
Copyright © 2000-2009 FreeHEP. All Rights Reserved.