|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.monitorenter.gui.chart.traces.ATrace2D
info.monitorenter.gui.chart.traces.Trace2DSimple
public class Trace2DSimple
A basic
implementation that stores the internal
ITrace2D
instances in
a TracePoint2D
.
List
This class has the following behaviour:
Field Summary | |
---|---|
protected LinkedList |
m_points
Internal List <ITracePoint2D>. |
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_MAX_X, PROPERTY_MAX_Y, PROPERTY_MIN_X, PROPERTY_MIN_Y, PROPERTY_NAME, PROPERTY_PAINTERS, PROPERTY_PHYSICALUNITS, PROPERTY_POINT_CHANGED, PROPERTY_STROKE, PROPERTY_TRACEPOINT, PROPERTY_VISIBLE, PROPERTY_ZINDEX, Z_INDEX_MIN, ZINDEX_MAX |
Constructor Summary | |
---|---|
Trace2DSimple()
Creates an empty trace. |
|
Trace2DSimple(String name)
Creates an emtpy trace with the given name. |
Method Summary | |
---|---|
protected boolean |
addPointInternal(TracePoint2D p)
Override this template method for the custom add operation that depends on the policies of the implementation. |
int |
getMaxSize()
Returns the maximum amount of TracePoint2D instances that may be added. |
int |
getSize()
Returns the amount of TracePoint2D instances currently contained. |
boolean |
isEmpty()
Returns false if internal instances are contained or true
if not. |
Iterator |
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 TracePoint2D |
removePointInternal(TracePoint2D point)
Override this template method for the custom remove operation that depends on the internal storage the implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface info.monitorenter.util.collections.IComparableProperty |
---|
getComparableProperty, setComparableProperty |
Methods inherited from interface java.beans.PropertyChangeListener |
---|
propertyChange |
Field Detail |
---|
protected LinkedList m_points
Constructor Detail |
---|
public Trace2DSimple()
public Trace2DSimple(String name)
name
- the name that will be displayed below the chart.Method Detail |
---|
protected boolean addPointInternal(TracePoint2D p)
ATrace2D
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(TracePoint2D)
.
ATrace2D.firePointChanged(TracePoint2D, 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 wether the new point was accepted or not) and perform bound checks and fire the property changes as mentioned above "manually".
addPointInternal
in class ATrace2D
p
- the point to add.
ATrace2D.addPointInternal(info.monitorenter.gui.chart.TracePoint2D)
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 ITrace2D
TracePoint2D
instances that may be added.ITrace2D.getMaxSize()
public final int getSize()
ITrace2D
TracePoint2D
instances currently contained.
getSize
in interface ITrace2D
TracePoint2D
instances currently contained.ITrace2D.getSize()
public boolean isEmpty()
ITrace2D
TracePoint2D
instances are contained or true
if not.
isEmpty
in interface ITrace2D
TracePoint2D
instances are
contained or true if not.ITrace2D.isEmpty()
public Iterator iterator()
ITrace2D
Iterator
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 ITrace2D
Iterator
over the internal TracePoint2D
instances.ITrace2D.iterator()
public final void removeAllPointsInternal()
ATrace2D
Collection
used in the implementation.
No change events have to be fired, this is done by ATrace2D
.
removeAllPointsInternal
in class ATrace2D
ATrace2D.removeAllPointsInternal()
protected TracePoint2D removePointInternal(TracePoint2D point)
ATrace2D
The returned point may be the same as the given. But some "computing" traces like
will
internally delete a different point and return that one.
Trace2DArithmeticMean
No property change events have to be fired by default. If this method returns null
the outer logic of the calling method
will
perform bound checks for the returned point and fire property changes for the properties
ATrace2D.removePoint(TracePoint2D)
, ITrace2D.PROPERTY_MAX_X
,
ITrace2D.PROPERTY_MIN_X
and ITrace2D.PROPERTY_MAX_Y
.
ITrace2D.PROPERTY_MIN_Y
In special cases - when additional modifications to the internal set of points take place (e.g. a further point get added) this method should return false (regardless wether the old point was really removed or not) and perform bound checks and fire the property changes as mentioned above "manually".
removePointInternal
in class ATrace2D
point
- the point to remove.
ATrace2D.removePointInternal(info.monitorenter.gui.chart.TracePoint2D)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |