Class Trace2DLtdReplacing
java.lang.Object
info.monitorenter.gui.chart.traces.ATrace2D
info.monitorenter.gui.chart.traces.Trace2DLtd
info.monitorenter.gui.chart.traces.Trace2DLtdReplacing
- All Implemented Interfaces:
ITrace2D
,PropertyChangeListener
,Serializable
,Comparable<ITrace2D>
,EventListener
In addition to the
The
Tracepoints with x- values not contained before will be appended to the end of the internal data- structure.
Trace2DLtd
this class offers the guarantee only to allow a
single tracepoint with a certain x- value. If a new tracepoint is added whose x- value is already
contained, the new tracepoints values will get assigned to the certain old tracepoint respecting
the fact that only an additional changed y- value occurs. The
add
methods increase complexity to factor n but some event - handling may be
saved (no change of x and y). Tracepoints with x- values not contained before will be appended to the end of the internal data- structure.
- Version:
- $Revision: 1.16 $
- Author:
- Achim Westerman
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface info.monitorenter.gui.chart.ITrace2D
ITrace2D.DistancePoint
-
Field Summary
Fields inherited from class info.monitorenter.gui.chart.traces.Trace2DLtd
m_buffer
Fields inherited from class info.monitorenter.gui.chart.traces.ATrace2D
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
Fields inherited from interface info.monitorenter.gui.chart.ITrace2D
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_POINT_CHANGED, PROPERTY_POINT_HIGHLIGHTERS_CHANGED, PROPERTY_STROKE, PROPERTY_TRACEPOINT, PROPERTY_VISIBLE, PROPERTY_ZINDEX, Z_INDEX_MIN, ZINDEX_MAX
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aTrace2DLtdReplacing
with a default buffer size of 100.Trace2DLtdReplacing
(int bufsize) Constructs an instance with a buffer size of bufsize. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Override this template method for the custom add operation that depends on the policies of the implementation.Methods inherited from class info.monitorenter.gui.chart.traces.Trace2DLtd
equals, getMaxSize, getSize, hashCode, isEmpty, iterator, removeAllPointsInternal, removePointInternal, setMaxSize
Methods inherited from class info.monitorenter.gui.chart.traces.ATrace2D
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, toString
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface info.monitorenter.gui.chart.ITrace2D
addComputingTrace, 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, showsPositiveYErrorBars
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
-
Constructor Details
-
Trace2DLtdReplacing
public Trace2DLtdReplacing()Constructs aTrace2DLtdReplacing
with a default buffer size of 100. -
Trace2DLtdReplacing
public Trace2DLtdReplacing(int bufsize) Constructs an instance with a buffer size of bufsize.- Parameters:
bufsize
- the maximum amount of points that will be displayed.
-
-
Method Details
-
addPointInternal
Description copied from class:ATrace2D
Override 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 methodATrace2D.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".
- Overrides:
addPointInternal
in classTrace2DLtd
- Parameters:
p
- the point to add.- Returns:
- true if the given point was accepted or false if not.
- See Also:
-