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 16b0fd48552d77d4dcbbc3ec5ec022f8772d6519..be52bd4e97d14eb3426dee6d10ff64edd780f40c 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 47aca29dbeb3e48bb690e325101bd5957a3792d6..71c1066318bad9c0410e994d7b76429ab41937c5 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 b2c5107e2ca6aee02ca3f4e55ed4c4fee43d31ae..0317f569d53239439a3484a0dfc5cdecdf5ba256 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) {
                }