Class ListDataSet
- java.lang.Object
-
- cern.jdve.data.AbstractDataSet
-
- cern.accsoft.steering.util.gui.dv.ds.AbstractJmadDataSet
-
- cern.accsoft.steering.util.gui.dv.ds.ListDataSet
-
- All Implemented Interfaces:
MarkerXProvider,ErrorDataSet,ValidityDataSet,cern.jdve.data.DataSet,java.lang.Cloneable
- Direct Known Subclasses:
PhaseSpaceDataSet
public class ListDataSet extends AbstractJmadDataSet implements ErrorDataSet
this class represents a dataset for a list of double-values. The x-values are then simply the indizes
-
-
Field Summary
-
Fields inherited from class cern.jdve.data.AbstractDataSet
PROPERTY_EDITABLE, PROPERTY_EDITION_HINT, PROPERTY_MARKER, PROPERTY_NAME, PROPERTY_STYLE, PROPERTY_UNDEF_VALUE, PROPERTY_VISIBLE, PROPERTY_VISIBLE_IN_LEGEND, xRange, yRange
-
Fields inherited from interface cern.accsoft.steering.jmad.gui.mark.MarkerXProvider
ELEMENT_NAME_HV_BORDER
-
-
Constructor Summary
Constructors Constructor Description ListDataSet(java.lang.String name)the constructor, which needs a name for the dataset
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDataCount()booleangetValidity(int index)return the style for a given DatapointdoublegetY(int index)java.lang.DoublegetYError(int index)java.util.List<java.lang.Double>getYErrorValues()java.util.List<java.lang.Double>getYValues()booleanhasValidityInformation()should return, if validity-information is available, false otherwise.voidsetValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues)sets x- and y- values simultanously.voidsetValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues, java.util.List<java.lang.Boolean> validityValues)sets x- and y- values simultaniously.voidsetValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues, java.util.List<java.lang.Double> yErrorValues, java.util.List<java.lang.Boolean> validityValues)voidsetYValues(java.util.List<java.lang.Double> yValues)-
Methods inherited from class cern.accsoft.steering.util.gui.dv.ds.AbstractJmadDataSet
add, fireFullChange, getDataLabel, getLabels, getX, getXPositions, getXValues, refresh, remove, setLabels, setXValues
-
Methods inherited from class cern.jdve.data.AbstractDataSet
add, addDataSetListener, clear, clone, computeLimits, createRanges, ensureEditable, findMaxXIndex, findMaxYIndex, findMinXIndex, findMinYIndex, fireDataAdded, fireDataChanged, fireDataRemoved, fireDataSetChanged, getDataCnt, getDataPointIndex, getEditionHint, getIndexWindow, getName, getProperty, getUndefValue, getXRange, getYRange, indexOf, initRanges, interpolate, isAdjusting, isEditable, isLimitsValid, isVisible, isVisible, isVisibleLegend, removeDataSetListener, set, setAdjusting, setEditable, setEditionHint, setLimitsValid, setName, setProperty, setUndefValue, setVisible, setVisibleLegend, toString, updateRange, updateRange
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cern.jdve.data.DataSet
add, add, addDataSetListener, getDataLabel, getEditionHint, getIndexWindow, getName, getProperty, getUndefValue, getX, getXRange, getYRange, indexOf, interpolate, isEditable, isVisible, isVisibleLegend, remove, removeDataSetListener, set, setProperty
-
-
-
-
Method Detail
-
getDataCount
public int getDataCount()
- Specified by:
getDataCountin interfacecern.jdve.data.DataSet
-
getY
public double getY(int index)
- Specified by:
getYin interfacecern.jdve.data.DataSet
-
getYValues
public java.util.List<java.lang.Double> getYValues()
- Returns:
- the list of y-values
-
setValues
public void setValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues)sets x- and y- values simultanously. This only can be done together. So the length of them is consistent and the refresh is only triggered once.- Parameters:
xValues- the values for the x-axisyValues- the values for the y-axis
-
setValues
public void setValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues, java.util.List<java.lang.Boolean> validityValues)sets x- and y- values simultaniously. This only can be done together. So the length of them is consistent and the refresh is only triggered once.- Parameters:
xValues- the values for the x-axisyValues- the values for the y-axis
-
setValues
public void setValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues, java.util.List<java.lang.Double> yErrorValues, java.util.List<java.lang.Boolean> validityValues)
-
setYValues
public void setYValues(java.util.List<java.lang.Double> yValues)
- Parameters:
yValues- the yValues to set
-
getValidity
public boolean getValidity(int index)
Description copied from interface:ValidityDataSetreturn the style for a given Datapoint- Specified by:
getValidityin interfaceValidityDataSet- Parameters:
index- the index for which to retrieve the style- Returns:
- the Style
-
hasValidityInformation
public boolean hasValidityInformation()
Description copied from interface:ValidityDataSetshould return, if validity-information is available, false otherwise.- Specified by:
hasValidityInformationin interfaceValidityDataSet- Returns:
- true, if validity information is available, false otherwise
-
getYErrorValues
public java.util.List<java.lang.Double> getYErrorValues()
- Returns:
- the yErrorValues
-
getYError
public java.lang.Double getYError(int index)
- Specified by:
getYErrorin interfaceErrorDataSet
-
-