ITrace2D, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<ITrace2D>, java.util.EventListenerpublic 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 | Description |
|---|---|---|
protected int |
m_maxsize |
The maximum amount of points that will be shown.
|
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_rendererPROPERTY_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_POINT_CHANGED, PROPERTY_POINT_HIGHLIGHTERS_CHANGED, PROPERTY_STROKE, PROPERTY_TRACEPOINT, PROPERTY_VISIBLE, PROPERTY_ZINDEX, Z_INDEX_MIN, ZINDEX_MAXm_points| Constructor | 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 | 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
TracePoint2D instances that may be
added. |
void |
setMaxSize(int amount) |
Sets the maximum amount of points that will be shown.
|
addComputingTrace, addErrorBarPolicy, addPoint, addPoint, addPointHighlighter, addPropertyChangeListener, addTracePainter, compareTo, containsTracePainter, ensureInitialized, finalize, firePointAdded, firePointChanged, firePointRemoved, firePropertyChange, getChangeListeners, getColor, getErrorBarPolicies, getHasErrorBars, getInstanceCount, getLabel, getMaxX, getMaxY, getMinX, getMinY, getName, getNearestPointEuclid, getNearestPointManhattan, getPhysicalUnits, getPhysicalUnitsX, getPhysicalUnitsY, getPointHighlighters, getPropertyChangeListeners, getRenderer, getStroke, getTracePainters, getZIndex, isVisible, maxXSearch, maxYSearch, minXSearch, minYSearch, propertyChange, removeAllPointHighlighters, removeAllPoints, removeComputingTrace, removeErrorBarPolicy, removePoint, removePointHighlighter, removePropertyChangeListener, removePropertyChangeListener, removeTracePainter, setColor, setErrorBarPolicy, setName, setPhysicalUnits, setPointHighlighter, setRenderer, setStroke, setTracePainter, setVisible, setZIndex, showsErrorBars, showsNegativeXErrorBars, showsNegativeYErrorBars, showsPositiveXErrorBars, showsPositiveYErrorBars, toStringaddComputingTrace, addErrorBarPolicy, 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, getZIndex, isVisible, removeAllPointHighlighters, removeAllPoints, removeComputingTrace, removeErrorBarPolicy, removePoint, removePointHighlighter, removePropertyChangeListener, removePropertyChangeListener, removeTracePainter, setColor, setErrorBarPolicy, setName, setPhysicalUnits, setPointHighlighter, setRenderer, setStroke, setTracePainter, setVisible, setZIndex, showsErrorBars, showsNegativeXErrorBars, showsNegativeYErrorBars, showsPositiveXErrorBars, showsPositiveYErrorBarsclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSize, isEmpty, iterator, removeAllPointsInternal, removePointInternalpublic 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 Trace2DSortedpoint - the point to add.public final int getMaxSize()
ITrace2D
Returns the maximum amount of TracePoint2D 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 ITrace2DgetMaxSize in class Trace2DSortedTracePoint2D instances that may be
added.ITrace2D.getMaxSize()public final void setMaxSize(int amount)
amount - the maximum amount of points that will be shown.Copyright © 2001 - 2010 LGPL, All Rights Footloose.