Class Trace2DDebugger

java.lang.Object
info.monitorenter.gui.chart.traces.Trace2DDebugger
All Implemented Interfaces:
ITrace2D, PropertyChangeListener, Serializable, Comparable<ITrace2D>, EventListener

public class Trace2DDebugger extends Object implements ITrace2D
A decorator for any ITrace2D implementation. Useful if your chart looks unexpected and the problem may be related to the data that is added. It prints every point added to the console.

Use it by decorating the ITrace2D you normally use:

      // Create a chart:
      Chart2D chart = new Chart2D();
      // Create an ITrace:
      <b>ITrace2D trace = new Trace2DDebugger(new Trace2DSimple());
      // add data...
      ...
      //
      chart.addTrace(trace);
 

One can use setXRange(Range),setYRange(Range) to let this instance throw an Exception if bounds for legal data are exceeded.

Version:
$Revision: 1.34 $
Author:
Achim Westermann
See Also: