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 int
getDataCount()
boolean
getValidity(int index)
return the style for a given Datapointdouble
getY(int index)
java.lang.Double
getYError(int index)
java.util.List<java.lang.Double>
getYErrorValues()
java.util.List<java.lang.Double>
getYValues()
boolean
hasValidityInformation()
should return, if validity-information is available, false otherwise.void
setValues(java.util.List<java.lang.Double> xValues, java.util.List<java.lang.Double> yValues)
sets x- and y- values simultanously.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.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)
void
setYValues(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:
getDataCount
in interfacecern.jdve.data.DataSet
-
getY
public double getY(int index)
- Specified by:
getY
in 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:ValidityDataSet
return the style for a given Datapoint- Specified by:
getValidity
in interfaceValidityDataSet
- Parameters:
index
- the index for which to retrieve the style- Returns:
- the Style
-
hasValidityInformation
public boolean hasValidityInformation()
Description copied from interface:ValidityDataSet
should return, if validity-information is available, false otherwise.- Specified by:
hasValidityInformation
in 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:
getYError
in interfaceErrorDataSet
-
-