projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: move distinct classes to separate files.
[fw/altos]
/
altosui
/
AltosDataChooser.java
diff --git
a/altosui/AltosDataChooser.java
b/altosui/AltosDataChooser.java
index 15de05c2bb510723dabbe22704cbc41d55e57dad..4bd51c3938e61635bfb6ef49c6466c50304e7b8a 100644
(file)
--- a/
altosui/AltosDataChooser.java
+++ b/
altosui/AltosDataChooser.java
@@
-26,6
+26,7
@@
import java.io.*;
import java.util.*;
import java.text.*;
import java.util.prefs.*;
import java.util.*;
import java.text.*;
import java.util.prefs.*;
+import org.altusmetrum.AltosLib.*;
public class AltosDataChooser extends JFileChooser {
JFrame frame;
public class AltosDataChooser extends JFileChooser {
JFrame frame;
@@
-56,12
+57,15
@@
public class AltosDataChooser extends JFileChooser {
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
return new AltosTelemetryIterable(in);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
return new AltosTelemetryIterable(in);
+ } else if (filename.endsWith("mega")) {
+ FileInputStream in = new FileInputStream(file);
+ return new AltosEepromMegaIterable(in);
} else {
throw new FileNotFoundException();
}
} catch (FileNotFoundException fe) {
JOptionPane.showMessageDialog(frame,
} else {
throw new FileNotFoundException();
}
} catch (FileNotFoundException fe) {
JOptionPane.showMessageDialog(frame,
- f
ilename
,
+ f
e.getMessage()
,
"Cannot open file",
JOptionPane.ERROR_MESSAGE);
}
"Cannot open file",
JOptionPane.ERROR_MESSAGE);
}
@@
-73,7
+77,7
@@
public class AltosDataChooser extends JFileChooser {
frame = in_frame;
setDialogTitle("Select Flight Record File");
setFileFilter(new FileNameExtensionFilter("Flight data file",
frame = in_frame;
setDialogTitle("Select Flight Record File");
setFileFilter(new FileNameExtensionFilter("Flight data file",
- "telem", "eeprom"));
- setCurrentDirectory(AltosPreferences.logdir());
+ "telem", "eeprom"
, "mega"
));
+ setCurrentDirectory(Altos
UI
Preferences.logdir());
}
}
}
}