altosui: Show filename in AltosGraph window
authorKeith Packard <keithp@keithp.com>
Tue, 23 Aug 2011 01:24:54 +0000 (18:24 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 23 Aug 2011 01:24:54 +0000 (18:24 -0700)
Makes it easier to tell multiple windows apart

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosGraphUI.java
altosui/AltosLanded.java
altosui/AltosUI.java

index 16b0fd4..be52bd4 100644 (file)
@@ -178,8 +178,8 @@ public class AltosGraphUI extends JFrame
         }
     }
 
-    public AltosGraphUI(AltosRecordIterable records) throws InterruptedException, IOException {
-               super("Altos Graph");
+       public AltosGraphUI(AltosRecordIterable records, String name) throws InterruptedException, IOException {
+               super(String.format("Altos Graph %s", name));
 
                AltosDataPointReader reader = new AltosDataPointReader (records);
                if (reader == null)
index 47aca29..71c1066 100644 (file)
@@ -240,7 +240,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
                                                throw new FileNotFoundException();
                                        }
                                        try {
-                                               new AltosGraphUI(records);
+                                               new AltosGraphUI(records, filename);
                                        } catch (InterruptedException ie) {
                                        } catch (IOException ie) {
                                        }
index b2c5107..0317f56 100644 (file)
@@ -311,7 +311,7 @@ public class AltosUI extends JFrame {
                if (record_reader == null)
                        return;
                try {
-                       new AltosGraphUI(record_reader);
+                       new AltosGraphUI(record_reader, chooser.filename());
                } catch (InterruptedException ie) {
                } catch (IOException ie) {
                }