info.monitorenter.gui.chart.io
Class RandomDataCollectorTimeStamped

java.lang.Object
  extended by info.monitorenter.gui.chart.io.ADataCollector
      extended by info.monitorenter.gui.chart.io.RandomDataCollectorTimeStamped
All Implemented Interfaces:
java.lang.Runnable

public class RandomDataCollectorTimeStamped
extends ADataCollector

Data collector that collects values with an absolute timestamp as x value and a random jumping y value.

Version:
$Revision: 1.9 $
Author:
Achim Westermann

Constructor Summary
RandomDataCollectorTimeStamped(ITrace2D trace, int latency)
          Creates an instance that will collect every latency ms a point and add it to the trace.
 
Method Summary
 ITracePoint2D collectData()
           Override this method.
 
Methods inherited from class info.monitorenter.gui.chart.io.ADataCollector
finalize, getLatency, getTrace, isRunning, run, setLatency, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomDataCollectorTimeStamped

public RandomDataCollectorTimeStamped(ITrace2D trace,
                                      int latency)
Creates an instance that will collect every latency ms a point and add it to the trace.

Parameters:
trace - the trace to add collected points to.
latency - the interval in ms for collecting 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 class ADataCollector
Returns:
the collected point.
See Also:
ADataCollector.collectData()


Copyright © 2001 - 2010 LGPL, All Rights Footloose.