Package info.monitorenter.gui.chart.io
Class RandomDataCollectorOffset
- java.lang.Object
-
- info.monitorenter.gui.chart.io.ADataCollector
-
- info.monitorenter.gui.chart.io.RandomDataCollectorOffset
-
- All Implemented Interfaces:
java.lang.Runnable
public class RandomDataCollectorOffset extends ADataCollector
A proof of concept dummy implementation for the supertype.Only collects random values with timestamp on the x axis. The timestamp is related to the time when this instance is instantiated to make it a lower value (offset to start). implementation for exact timestamps that may be formatted with java.text.DateFormat instances.
- Version:
- $Revision: 1.9 $
- Author:
- Achim Westermann
-
-
Constructor Summary
Constructors Constructor Description RandomDataCollectorOffset(ITrace2D trace, int latency)
Creates a collector that collectes every latency ms a point and adds it to the trace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITracePoint2D
collectData()
Override this method.-
Methods inherited from class info.monitorenter.gui.chart.io.ADataCollector
finalize, getLatency, getTrace, isRunning, run, setLatency, start, stop
-
-
-
-
Constructor Detail
-
RandomDataCollectorOffset
public RandomDataCollectorOffset(ITrace2D trace, int latency)
Creates a collector that collectes every latency ms a point and adds it to the trace.- Parameters:
trace
- the trace to add points to.latency
- the interval for collection of points.
-
-
Method Detail
-
collectData
public ITracePoint2D collectData()
Description copied from class:ADataCollector
Override this method. It will be invoked in intervals of the configured latency time. The TracePoint2D that is returned will be added to the constructor given ITrace2D.
Keep your implementation fast. If the computations performed here take longer than the latency time that desired refresh rate will not be reached.
- Specified by:
collectData
in classADataCollector
- Returns:
- the collected point.
- See Also:
ADataCollector.collectData()
-
-