Class Trace2DSimple
- java.lang.Object
-
- info.monitorenter.gui.chart.traces.ATrace2D
-
- info.monitorenter.gui.chart.traces.Trace2DSimple
-
- All Implemented Interfaces:
- ITrace2D, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Comparable<ITrace2D>, java.util.EventListener
- Direct Known Subclasses:
- Trace2DBijective, Trace2DReplacing
public class Trace2DSimple extends ATrace2D implements ITrace2D
A basicimplementation that stores the internalITrace2Dinstances in aTracePoint2D.ListThis class has the following behavior:
- All tracepoints that are added are stored unchanged in a LinkedList.
- All traceoints that are added are added to the end.
- If a tracepoint is inserted whose x - value already exists in the List, it is ok - the old point may remain. (no bijective assigement of X and Y)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface info.monitorenter.gui.chart.ITrace2D
ITrace2D.DistancePoint
-
-
Field Summary
-
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
Constructors Constructor and Description Trace2DSimple()Creates an empty trace.Trace2DSimple(java.lang.String name)Creates an emtpy trace with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetMaxSize()Returns the maximum amount ofTracePoint2Dinstances that may be added.intgetSize()Returns the amount ofTracePoint2Dinstances currently contained.booleanisEmpty()Returns false if internalinstances are contained or true if not.TracePoint2Djava.util.Iterator<ITracePoint2D>iterator()Returns anIteratorover the internalinstances.TracePoint2D-
Methods inherited from class info.monitorenter.gui.chart.traces.ATrace2D
addComputingTrace, addErrorBarPolicy, addPoint, addPoint, addPointHighlighter, addPropertyChangeListener, addTracePainter, compareTo, containsTracePainter, firePointChanged, getChangeListeners, getColor, getErrorBarPolicies, getHasErrorBars, getInstanceCount, getLabel, getMaxX, getMaxY, getMinX, getMinY, getName, getNearestPointEuclid, getNearestPointManhattan, getPhysicalUnits, getPhysicalUnitsX, getPhysicalUnitsY, getPointHighlighters, getPropertyChangeListeners, getRenderer, getStroke, getTracePainters, getZIndex, isVisible, 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 class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
-
-
-
Constructor Detail
-
Trace2DSimple
public Trace2DSimple()
Creates an empty trace.
-
Trace2DSimple
public Trace2DSimple(java.lang.String name)
Creates an emtpy trace with the given name.- Parameters:
name- the name that will be displayed below the chart.
-
-
Method Detail
-
getMaxSize
public final int getMaxSize()
Description copied from interface:ITrace2DReturns the maximum amount of
TracePoint2Dinstances that may be added. For implementations that limit the maximum amount this is a reasonable amount. Non-limiting implementations should returnInteger.MAX_VALUE. This allows to detect the unlimitedness. Of course no implementation could store that amount of points.- Specified by:
getMaxSizein interfaceITrace2D- Returns:
- The maximum amount of
TracePoint2Dinstances that may be added. - See Also:
ITrace2D.getMaxSize()
-
getSize
public final int getSize()
Description copied from interface:ITrace2DReturns the amount ofTracePoint2Dinstances currently contained.- Specified by:
getSizein interfaceITrace2D- Returns:
- The amount of
instances currently contained.TracePoint2D - See Also:
ITrace2D.getSize()
-
isEmpty
public boolean isEmpty()
Description copied from interface:ITrace2DReturns false if internalinstances are contained or true if not.TracePoint2D- Specified by:
isEmptyin interfaceITrace2D- Returns:
- false if internal
instances are contained or true if not.TracePoint2D - See Also:
ITrace2D.isEmpty()
-
iterator
public java.util.Iterator<ITracePoint2D> iterator()
Description copied from interface:ITrace2DReturns anIteratorover the internalinstances.TracePoint2DImplementations should be synchronized. This method is meant to allow modifications of the intenal
TracePoint2Dinstances, 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
TracePoint2Dinstances decides how theChart2Dwill paint the trace.- Specified by:
iteratorin interfaceITrace2D- Returns:
- an
Iteratorover the internalinstances.TracePoint2D - See Also:
ITrace2D.iterator()
-
-
DMelt 3.0 © DataMelt by jWork.ORG