From 4e2fd7ae76c23aa8da1390ebcbd8f45276cd7a32 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Aug 2011 18:24:54 -0700 Subject: [PATCH] altosui: Show filename in AltosGraph window Makes it easier to tell multiple windows apart Signed-off-by: Keith Packard --- altosui/AltosGraphUI.java | 4 ++-- altosui/AltosLanded.java | 2 +- altosui/AltosUI.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 16b0fd48..be52bd4e 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -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) diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 47aca29d..71c10663 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -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) { } diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index b2c5107e..0317f569 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -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) { } -- 2.30.2