public class Trace2DLtdSorted extends Trace2DSorted
Trace2DLtdReplacing
all tracepoints will be
sorted by their x- value.
Performance is slower compared to the class named above. Internally a
TreeSet
is used (instead of RingBufferArrayFast
)
to keep the comparable TracePoint2D
- instances sorted.
Internally all tracepoints are TracePoint2D
-instances.
ITrace2D.DistancePoint
Modifier and Type | Field and Description |
---|---|
protected int |
m_maxsize
The maximum amount of points that will be shown.
|
m_points
m_computingTraces, m_maxX, m_maxXErrorBar, m_maxY, m_maxYErrorBar, m_minX, m_minXErrorBar, m_minY, m_minYErrorBar, m_name, m_physicalUnitsX, m_physicalUnitsY, m_propertyChangeSupport, m_renderer
PROPERTY_COLOR, PROPERTY_ERRORBARPOLICY, PROPERTY_ERRORBARPOLICY_CONFIGURATION, PROPERTY_LABEL, PROPERTY_MAX_X, PROPERTY_MAX_Y, PROPERTY_MIN_X, PROPERTY_MIN_Y, PROPERTY_NAME, PROPERTY_PAINTERS, PROPERTY_PHYSICALUNITS, PROPERTY_STROKE, PROPERTY_TRACEPOINT_CHANGED_HIGHLIGHTERS, PROPERTY_TRACEPOINT_CHANGED_LOCATION, PROPERTY_TRACEPOINT_CHANGED_RENDERING, PROPERTY_TRACEPOINTS, PROPERTY_VISIBLE, PROPERTY_ZINDEX, Z_INDEX_MIN, ZINDEX_MAX
PROPERTY_ACCUMULATION_STRATEGY, PROPERTY_ACCUMULATION_STRATEGY_ACCUMULATION_FUNCTION_CHANGED
Constructor and Description |
---|
Trace2DLtdSorted()
Constructs an instance with a default buffer size of 100.
|
Trace2DLtdSorted(int maxsize)
Constructs an instance with a buffer size of maxsize.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
addPointInternal(ITracePoint2D point)
In case point has an x- value already contained, the old trace point with
that value will be replaced by the new one.
|
int |
getMaxSize()
Returns the maximum amount of
ITracePoint2D instances that may be
added. |
void |
setMaxSize(int amount)
Sets the maximum amount of points that will be shown.
|
descendingIterator, getSize, isEmpty, iterator, removeAllPointsInternal, removePointInternal
addComputingTrace, addErrorBarPolicy, addPoint, addPoint, addPoint, addPointHighlighter, addPropertyChangeListener, addTracePainter, boundSearch, compareTo, containsTracePainter, ensureInitialized, finalize, firePointAdded, firePointChanged, firePointRemoved, firePropertyChange, getAccumulationStrategy, getChangeListeners, getColor, getErrorBarPolicies, getHasErrorBars, getInstanceCount, getLabel, getMaxX, getMaxY, getMinX, getMinY, getName, getNearestPointEuclid, getNearestPointManhattan, getPhysicalUnits, getPhysicalUnitsX, getPhysicalUnitsY, getPointHighlighters, getPropertyChangeListeners, getRenderer, getStroke, getTracePainters, getTracePointProvider, getZIndex, initPaintIteration, isAdditionalSpaceRequired, isPixelTransformationRequired, isVisible, iterator, maxXSearch, maxYSearch, minXSearch, minYSearch, onAdded2ChartBeforeFirstPaint, propertyChange, removeAllPointHighlighters, removeAllPoints, removeComputingTrace, removeErrorBarPolicy, removePoint, removePointHighlighter, removePropertyChangeListener, removePropertyChangeListener, removeTracePainter, setAccumulationStrategy, setColor, setErrorBarPolicy, setName, setPhysicalUnits, setPointHighlighter, setRenderer, setStroke, setTracePainter, setTracePointProvider, setVisible, setZIndex, showsErrorBars, showsNegativeXErrorBars, showsNegativeYErrorBars, showsPositiveXErrorBars, showsPositiveYErrorBars, toString
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addComputingTrace, addErrorBarPolicy, addPoint, addPoint, addPoint, addPointHighlighter, addPropertyChangeListener, addTracePainter, containsTracePainter, firePointChanged, getColor, getErrorBarPolicies, getHasErrorBars, getLabel, getMaxX, getMaxY, getMinX, getMinY, getName, getNearestPointEuclid, getNearestPointManhattan, getPhysicalUnits, getPhysicalUnitsX, getPhysicalUnitsY, getPointHighlighters, getPropertyChangeListeners, getRenderer, getStroke, getTracePainters, getTracePointProvider, getZIndex, initPaintIteration, isAdditionalSpaceRequired, isPixelTransformationRequired, isVisible, maxXSearch, maxYSearch, minXSearch, minYSearch, onAdded2ChartBeforeFirstPaint, removeAllPointHighlighters, removeAllPoints, removeComputingTrace, removeErrorBarPolicy, removePoint, removePointHighlighter, removePropertyChangeListener, removePropertyChangeListener, removeTracePainter, setColor, setErrorBarPolicy, setName, setPhysicalUnits, setPointHighlighter, setRenderer, setStroke, setTracePainter, setTracePointProvider, setVisible, setZIndex, showsErrorBars, showsNegativeXErrorBars, showsNegativeYErrorBars, showsPositiveXErrorBars, showsPositiveYErrorBars
propertyChange
compareTo
public Trace2DLtdSorted()
public Trace2DLtdSorted(int maxsize)
maxsize
- the maximum amount of points to show.protected boolean addPointInternal(ITracePoint2D point)
If points takes additional space (it's x- value is not already contained) and maxsize is reached, the first element (with lowest x- value) will be removed.
addPointInternal
in class Trace2DSorted
point
- the point to add.public final int getMaxSize()
ITrace2D
Returns the maximum amount of ITracePoint2D
instances that may be
added. For implementations that limit the maximum amount this is a
reasonable amount. Non-limiting implementations should return
Integer.MAX_VALUE
. This allows to detect the unlimitedness. Of
course no implementation could store that amount of points.
getMaxSize
in interface ITrace2D
getMaxSize
in class Trace2DSorted
ITracePoint2D
instances that may be
added.ITrace2D.getMaxSize()
public final void setMaxSize(int amount)
amount
- the maximum amount of points that will be shown.Copyright © 2017. All rights reserved.