projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
telegps: Track graph windows as one of the TeleGPS windows
[fw/altos]
/
telegps
/
TeleGPSGraphUI.java
diff --git
a/telegps/TeleGPSGraphUI.java
b/telegps/TeleGPSGraphUI.java
index b7c17780d522e91f776ecaa3554ee8114ee12769..84c80815d82875630778c2548e8505c70c992d53 100644
(file)
--- a/
telegps/TeleGPSGraphUI.java
+++ b/
telegps/TeleGPSGraphUI.java
@@
-21,7
+21,11
@@
import java.io.*;
import java.util.ArrayList;
import java.awt.*;
import java.util.ArrayList;
import java.awt.*;
+import java.awt.event.*;
import javax.swing.*;
import javax.swing.*;
+import java.io.*;
+import java.util.concurrent.*;
+import java.util.*;
import org.altusmetrum.altoslib_4.*;
import org.altusmetrum.altosuilib_2.*;
import org.altusmetrum.altoslib_4.*;
import org.altusmetrum.altosuilib_2.*;
@@
-46,6
+50,12
@@
public class TeleGPSGraphUI extends AltosUIFrame
}
}
}
}
+ private void close() {
+ setVisible(false);
+ dispose();
+ TeleGPS.subtract_window();
+ }
+
TeleGPSGraphUI(AltosStateIterable states, File file) throws InterruptedException, IOException {
super(file.getName());
state = null;
TeleGPSGraphUI(AltosStateIterable states, File file) throws InterruptedException, IOException {
super(file.getName());
state = null;
@@
-65,11
+75,23
@@
public class TeleGPSGraphUI extends AltosUIFrame
setContentPane (pane);
setContentPane (pane);
+ addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ close();
+ }
+ });
+
pack();
pack();
- setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
+
+ TeleGPS.add_window();
+
setVisible(true);
setVisible(true);
+
if (state != null)
map.centre(state);
if (state != null)
map.centre(state);
+
}
}
}
}