Module xaos.ui.plot
Package eu.ess.xaos.ui.plot.data
Class DataReducingObservableList<X extends Number,Y extends Number>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- javafx.collections.ObservableListBase<E>
-
- javafx.collections.ModifiableObservableListBase<XYChart.Data<X,Y>>
-
- eu.ess.xaos.ui.plot.data.DataReducingObservableList<X,Y>
-
- Type Parameters:
X
- Type of X values.Y
- Type of Y values.
- All Implemented Interfaces:
Iterable<XYChart.Data<X,Y>>
,Collection<XYChart.Data<X,Y>>
,List<XYChart.Data<X,Y>>
,Observable
,ObservableList<XYChart.Data<X,Y>>
public final class DataReducingObservableList<X extends Number,Y extends Number> extends ModifiableObservableListBase<XYChart.Data<X,Y>>
AnObservableList
whose data is automatically reduced to the specifiedpointsCount
.- Author:
- Andreas Schaller (original author)., Grzegorz Kruk (original author)., claudio.rosati@esss.se
-
-
Property Summary
Properties Type Property Description ObjectProperty<DataReducer<X,Y>>
dataReducer
IntegerProperty
fixedPointsCount
IntegerProperty
pointsCount
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description DataReducingObservableList(ValueAxis<X> xAxis)
Creates a new instance ofDataReducingObservableList
initializing thesource data
to an empty list.DataReducingObservableList(ValueAxis<X> xAxis, ObservableList<XYChart.Data<X,Y>> sourceData)
Creates a new instance ofDataReducingObservableList
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectProperty<DataReducer<X,Y>>
dataReducerProperty()
protected void
doAdd(int index, XYChart.Data<X,Y> element)
protected XYChart.Data<X,Y>
doRemove(int index)
protected XYChart.Data<X,Y>
doSet(int index, XYChart.Data<X,Y> element)
IntegerProperty
fixedPointsCountProperty()
XYChart.Data<X,Y>
get(int index)
DataReducer<X,Y>
getDataReducer()
Gets the value of the property dataReducer.int
getPointsCount()
Gets the value of the property pointsCount.ObservableList<XYChart.Data<X,Y>>
getSourceData()
IntegerProperty
pointsCountProperty()
void
setDataReducer(DataReducer<X,Y> value)
Sets the value of the property dataReducer.void
setPointsCount(int value)
Sets the value of the property pointsCount.int
size()
-
Methods inherited from class javafx.collections.ModifiableObservableListBase
add, addAll, addAll, remove, remove, removeAll, removeRange, retainAll, set, setAll, subList
-
Methods inherited from class javafx.collections.ObservableListBase
addAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, remove, removeAll, removeListener, removeListener, retainAll, setAll
-
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, sort, spliterator, toArray, toArray
-
Methods inherited from interface javafx.collections.ObservableList
filtered, sorted, sorted
-
-
-
-
Property Detail
-
pointsCount
public final IntegerProperty pointsCountProperty
- See Also:
getPointsCount()
,setPointsCount(int)
-
dataReducer
public ObjectProperty<DataReducer<X extends Number,Y extends Number>> dataReducerProperty
- See Also:
getDataReducer()
,setDataReducer(DataReducer)
-
fixedPointsCount
public IntegerProperty fixedPointsCountProperty
-
-
Constructor Detail
-
DataReducingObservableList
public DataReducingObservableList(ValueAxis<X> xAxis) throws NullPointerException
Creates a new instance ofDataReducingObservableList
initializing thesource data
to an empty list.- Parameters:
xAxis
- X coordinates axis of the chart displaying the data.- Throws:
NullPointerException
- If the X value axis isnull
.
-
DataReducingObservableList
public DataReducingObservableList(ValueAxis<X> xAxis, ObservableList<XYChart.Data<X,Y>> sourceData) throws NullPointerException
Creates a new instance ofDataReducingObservableList
.- Parameters:
xAxis
- X coordinates axis of the chart displaying the data.sourceData
- List containing data to be reduced.- Throws:
NullPointerException
- If the X value axis and/or the source data list isnull
.
-
-
Method Detail
-
pointsCountProperty
public final IntegerProperty pointsCountProperty()
- See Also:
getPointsCount()
,setPointsCount(int)
-
getPointsCount
public int getPointsCount()
Gets the value of the property pointsCount.- Property description:
-
setPointsCount
public void setPointsCount(int value)
Sets the value of the property pointsCount.- Property description:
-
dataReducerProperty
public ObjectProperty<DataReducer<X,Y>> dataReducerProperty()
- See Also:
getDataReducer()
,setDataReducer(DataReducer)
-
fixedPointsCountProperty
public IntegerProperty fixedPointsCountProperty()
-
get
public XYChart.Data<X,Y> get(int index)
-
getDataReducer
public DataReducer<X,Y> getDataReducer()
Gets the value of the property dataReducer.- Property description:
-
getSourceData
public ObservableList<XYChart.Data<X,Y>> getSourceData()
-
setDataReducer
public void setDataReducer(DataReducer<X,Y> value)
Sets the value of the property dataReducer.- Property description:
-
size
public int size()
- Specified by:
size
in interfaceCollection<X extends Number>
- Specified by:
size
in interfaceList<X extends Number>
- Specified by:
size
in classModifiableObservableListBase<XYChart.Data<X extends Number,Y extends Number>>
-
doAdd
protected void doAdd(int index, XYChart.Data<X,Y> element)
- Specified by:
doAdd
in classModifiableObservableListBase<XYChart.Data<X extends Number,Y extends Number>>
-
doRemove
protected XYChart.Data<X,Y> doRemove(int index)
- Specified by:
doRemove
in classModifiableObservableListBase<XYChart.Data<X extends Number,Y extends Number>>
-
doSet
protected XYChart.Data<X,Y> doSet(int index, XYChart.Data<X,Y> element)
- Specified by:
doSet
in classModifiableObservableListBase<XYChart.Data<X extends Number,Y extends Number>>
-
-