Documentation of 'info.monitorenter.gui.chart.traces.Trace2DSimple' Java class
Trace2DSimple
info.monitorenter.gui.chart.traces

Class 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 basic ITrace2D implementation that stores the internal TracePoint2D instances in a List.

    This 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
    • 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: 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.

        Specified by:
        getMaxSize in interface ITrace2D
        Returns:
        The maximum amount of TracePoint2D instances that may be added.
        See Also:
        ITrace2D.getMaxSize()
      • iterator

        public java.util.Iterator<ITracePoint2D> iterator()
        Description copied from interface: ITrace2D
        Returns an 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.

        Specified by:
        iterator in interface ITrace2D
        Returns:
        an Iterator over the internal TracePoint2D instances.
        See Also:
        ITrace2D.iterator()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.