docs: Document altosui "Graph Data" button
[fw/altos] / ao-tools / altosui / AltosGraphUI.java
index d945c333cffa870e62e313f21595d1cea82d6df4..cd158651402d2634e4763015c1d36214b7899fb4 100644 (file)
@@ -17,10 +17,6 @@ import org.jfree.chart.axis.AxisLocation;
 import org.jfree.ui.ApplicationFrame;
 import org.jfree.ui.RefineryUtilities;
 
-import altosui.AltosCsvReader;
-import altosui.AltosDataPoint;
-import altosui.AltosGraphTime;
-
 public class AltosGraphUI extends JFrame 
 {
     static final private Color red = new Color(194,31,31);
@@ -155,18 +151,15 @@ public class AltosGraphUI extends JFrame
         }
     }
 
-    public AltosGraphUI(JFrame frame)
-    {
-        super("Altos Graph");
+       public AltosGraphUI(AltosRecordIterable records) {
+               super("Altos Graph");
 
-        AltosGraphDataChooser chooser;
-        chooser = new AltosGraphDataChooser(frame);
-        Iterable<AltosDataPoint> reader = chooser.runDialog();
-        if (reader == null)
-            return;
+               Iterable<AltosDataPoint> reader = new AltosDataPointReader (records);
+               if (reader == null)
+                       return;
         
-        init(reader, 0);
-    }
+               init(reader, 0);
+       }
 
     public AltosGraphUI(Iterable<AltosDataPoint> data, int which) 
     {
@@ -228,26 +221,6 @@ public class AltosGraphUI extends JFrame
 
         return graph;
     }
-
-    public static void main(String[] args) 
-        throws java.io.FileNotFoundException, java.io.IOException 
-    {
-        if (args.length < 1 || 2 < args.length)
-        {
-            System.out.println("Please specify telemetry csv");
-            return;
-        }
-
-        AltosCsvReader csv = new AltosCsvReader(args[0]);
-        if (args.length == 1) {
-            for (AltosGraph g : createGraphs(csv)) {
-                g.toPNG();
-            }
-        } else {
-            int which = Integer.parseInt(args[1].trim());
-            AltosGraphUI demo = new AltosGraphUI(csv, which);
-        }
-    }
 }
 
 /* gnuplot bits...