ITrace2D, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<ITrace2D>, java.util.EventListenerTrace2DLtdReplacingpublic class Trace2DLtd extends ATrace2D implements ITrace2D
ITrace2D.DistancePoint| Modifier and Type | Field | Description |
|---|---|---|
protected IRingBuffer<ITracePoint2D> |
m_buffer |
Internal fast FIFO buffer implementation based upon indexed access to an
array.
|
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_MAX| Constructor | Description |
|---|---|
Trace2DLtd() |
Constructs an instance with a default buffer size of 100.
|
Trace2DLtd(int maxsize) |
Constructs an instance with a buffersize of maxsize and a default name.
|
Trace2DLtd(int maxsize,
java.lang.String name) |
Constructs an instance with a buffersize of maxsize and a default name.
|
Trace2DLtd(java.lang.String name) |
Creates an instance with a default buffersize of 100 and the given name.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected boolean |
addPointInternal(ITracePoint2D p) |
Override this template method for the custom add operation that depends on
the policies of the implementation.
|
boolean |
equals(java.lang.Object obj) |
|
int |
getMaxSize() |
Returns the maximum amount of
TracePoint2D instances that may be
added. |
int |
getSize() |
Returns the acutal amount of points in this trace.
|
int |
hashCode() |
|
boolean |
isEmpty() |
Returns false if internal
instances are
contained or true if not. |
java.util.Iterator<ITracePoint2D> |
iterator() |
Returns an
Iterator over the internal
instances. |
void |
removeAllPointsInternal() |
Override this template method for the custom remove operation that depends
on the
Collection used in the implementation. |
protected ITracePoint2D |
removePointInternal(ITracePoint2D point) |
Returns null always because internally a ring buffer is used which does not
allow removing of values because that would break the contract of a ring
buffer.
|
void |
setMaxSize(int amount) |
Sets the maximum amount of points that may be displayed.
|
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, showsPositiveYErrorBarsprotected IRingBuffer<ITracePoint2D> m_buffer
public Trace2DLtd()
public Trace2DLtd(int maxsize)
maxsize - the buffer size for the maximum amount of points that will be
shown.public Trace2DLtd(int maxsize,
java.lang.String name)
maxsize - the buffer size for the maximum amount of points that will be
shown.name - the name that will be displayed for this trace.public Trace2DLtd(java.lang.String name)
name - the name that will be displayed for the trace.protected boolean addPointInternal(ITracePoint2D p)
ATrace2DOverride this template method for the custom add operation that depends on the policies of the implementation.
No property change events have to be fired by default. If this method
returns true the outer logic of the calling method
will perform bound checks for
the new point and fire property changes as described in method
ATrace2D.addPoint(ITracePoint2D).
ATrace2D.firePointChanged(ITracePoint2D, int)
In special cases - when additional modifications to the internal set of points take place (e.g. a further point gets removed) this method should return false (regardless whether the new point was accepted or not) and perform bound checks and fire the property changes as mentioned above "manually".
addPointInternal in class ATrace2Dp - the point to add.ATrace2D.addPointInternal(info.monitorenter.gui.chart.ITracePoint2D)public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public 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 ITrace2DTracePoint2D instances that may be
added.ITrace2D.getMaxSize()public int getSize()
getSize in interface ITrace2DITrace2D.getSize()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isEmpty()
ITrace2DTracePoint2D instances are
contained or true if not.
isEmpty in interface ITrace2DTracePoint2D
instances are contained or true if not.ITrace2D.isEmpty()public java.util.Iterator<ITracePoint2D> iterator()
ITrace2DIterator over the internal
TracePoint2D
instances.
Implementations should be synchronized. This method is meant to allow
modifications of the intenal TracePoint2D instances, so the
original points should be returned.
There is no guarantee that changes made to the contained tracepoints will
be reflected in the display immediately. The order the iterator returns the
TracePoint2D instances decides how the Chart2D
will paint the trace.
iterator in interface ITrace2DIterator over the internal
TracePoint2D instances.ITrace2D.iterator()public void removeAllPointsInternal()
ATrace2DCollection used in the implementation.
No change events have to be fired, this is done by ATrace2D.
removeAllPointsInternal in class ATrace2DITrace2D.removeAllPoints()protected ITracePoint2D removePointInternal(ITracePoint2D point)
removePointInternal in class ATrace2Dpoint - the point to remove.public final void setMaxSize(int amount)
Don't use this too often as decreases in size may cause expensive array copy operations and new searches on all points for bound changes.
TODO: Only search for bounds if size is smaller than before, debug and test.
amount - the new maximum amount of points to show.Copyright © 2001 - 2010 LGPL, All Rights Footloose.