edu.cmu.minorthird.util.gui
Class LineCharter

java.lang.Object
  extended by edu.cmu.minorthird.util.gui.LineCharter

public class LineCharter
extends java.lang.Object

Wraps JFreeChart's XY line graph capability.

Author:
William cohen

Constructor Summary
LineCharter()
           
 
Method Summary
 void addPoint(double x, double y)
          Add a point to the current curve.
 void addPoint(double x, double y, boolean mayDuplicate)
          Add a point to the current curve.
 javax.swing.JPanel getPanel(java.lang.String title, java.lang.String xlabel, java.lang.String ylabel)
          Get a panel showing the curves, with the given axis labels and title.
 void startCurve(java.lang.String label)
          Start a new curve with a given label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineCharter

public LineCharter()
Method Detail

startCurve

public void startCurve(java.lang.String label)
Start a new curve with a given label.


addPoint

public void addPoint(double x,
                     double y,
                     boolean mayDuplicate)
Add a point to the current curve.

Parameters:
mayDuplicate - - there may be points x,y1 and x,y2 in the curve, ie it might nont be a function.

addPoint

public void addPoint(double x,
                     double y)
Add a point to the current curve.


getPanel

public javax.swing.JPanel getPanel(java.lang.String title,
                                   java.lang.String xlabel,
                                   java.lang.String ylabel)
Get a panel showing the curves, with the given axis labels and title.