Package de.gsi.dataset.spi
Class WrappedDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<WrappedDataSet>
-
- de.gsi.dataset.spi.WrappedDataSet
-
- All Implemented Interfaces:
DataSet,DataSetMetaData,EventSource
public class WrappedDataSet extends AbstractDataSet<WrappedDataSet>
A data set implementation which wraps another data set.- Author:
- braeun
-
-
Field Summary
-
Fields inherited from class de.gsi.dataset.spi.AbstractDataSet
dataLabels, dataStyles, editConstraints, lock, metaInfoMap, name, updateListeners, xRange, yRange
-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Constructor Description WrappedDataSet(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDataCount()Get the number of data points in the data setintgetDataCount(double xmin, double xmax)Gets the number of data points in the range xmin to xmax.DataSetgetDataset()java.lang.StringgetName()Returns the name of the dataset.java.lang.StringgetStyle(int index)A string representation of the CSS style associated with this specificDataSetdata point.doublegetX(int i)Gets the x value of the data point with the index iintgetXIndex(double x)Gets the index of the data point closest to the given x coordinate.doublegetXMax()Gets the maximum x value of the data set.doublegetXMin()Gets the minimum x value of the data set.doublegetY(int i)Gets the y value of the data point with the index idoublegetYMax()Gets the maximum y value of the data set.doublegetYMin()Gets the minimum y value of the data set.voidsetDataset(DataSet dataset)update/overwrite internal data set with content from other data set-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, binarySearchX, binarySearchY, computeLimits, fireInvalidated, getDataLabel, getDefaultDataLabel, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getThis, getUndefValue, getWarningList, getXRange, getYIndex, getYRange, isAutoNotification, lock, minNeigbourSearchX, removeDataLabel, removeStyle, setAutoNotifaction, setEditConstraints, setName, toString, unlock, updateEventListener
-
Methods inherited from class de.gsi.dataset.spi.AbstractStylable
getStyle, setStyle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getStyle, getValue, getXValues, getYValues, setStyle
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, invokeListener, invokeListener, removeListener
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the dataset. This will return the name of the wrapped dataset. If no dataset is wrapped, the name of this object is returned.- Specified by:
getNamein interfaceDataSet- Overrides:
getNamein classAbstractDataSet<WrappedDataSet>- Returns:
- name of the dataset
-
setDataset
public void setDataset(DataSet dataset)
update/overwrite internal data set with content from other data set- Parameters:
dataset- new data set
-
getDataset
public DataSet getDataset()
- Returns:
- wrapped internal data set
-
getDataCount
public int getDataCount()
Description copied from interface:DataSetGet the number of data points in the data set- Returns:
- the number of data points
-
getDataCount
public int getDataCount(double xmin, double xmax)Description copied from class:AbstractDataSetGets the number of data points in the range xmin to xmax.- Specified by:
getDataCountin interfaceDataSet- Overrides:
getDataCountin classAbstractDataSet<WrappedDataSet>- Parameters:
xmin- the lower end of the rangexmax- the upper end of the range- Returns:
- the number of data points
-
getX
public double getX(int i)
Description copied from interface:DataSetGets the x value of the data point with the index i- Parameters:
i- the index of the data point- Returns:
- the x value
-
getY
public double getY(int i)
Description copied from interface:DataSetGets the y value of the data point with the index i- Parameters:
i- the index of the data point- Returns:
- the y value
-
getXIndex
public int getXIndex(double x)
Description copied from class:AbstractDataSetGets the index of the data point closest to the given x coordinate. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.- Specified by:
getXIndexin interfaceDataSet- Overrides:
getXIndexin classAbstractDataSet<WrappedDataSet>- Parameters:
x- the x position of the data point- Returns:
- the index of the data point
-
getXMin
public double getXMin()
Description copied from class:AbstractDataSetGets the minimum x value of the data set.- Specified by:
getXMinin interfaceDataSet- Overrides:
getXMinin classAbstractDataSet<WrappedDataSet>- Returns:
- minimum x value
-
getXMax
public double getXMax()
Description copied from class:AbstractDataSetGets the maximum x value of the data set.- Specified by:
getXMaxin interfaceDataSet- Overrides:
getXMaxin classAbstractDataSet<WrappedDataSet>- Returns:
- maximum x value
-
getYMin
public double getYMin()
Description copied from class:AbstractDataSetGets the minimum y value of the data set.- Specified by:
getYMinin interfaceDataSet- Overrides:
getYMinin classAbstractDataSet<WrappedDataSet>- Returns:
- minimum y value
-
getYMax
public double getYMax()
Description copied from class:AbstractDataSetGets the maximum y value of the data set.- Specified by:
getYMaxin interfaceDataSet- Overrides:
getYMaxin classAbstractDataSet<WrappedDataSet>- Returns:
- maximum y value
-
getStyle
public java.lang.String getStyle(int index)
Description copied from class:AbstractDataSetA string representation of the CSS style associated with this specificDataSetdata point. @see #getStyle()- Specified by:
getStylein interfaceDataSet- Overrides:
getStylein classAbstractDataSet<WrappedDataSet>- Parameters:
index- the index of the specific data point- Returns:
- user-specific data set style description (ie. may be set by user)
-
-