projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add TeleLCOTwo firmware
[fw/altos]
/
micropeak
/
MicroPeak.java
diff --git
a/micropeak/MicroPeak.java
b/micropeak/MicroPeak.java
index 27a8db02a262845ba2fb2feb5c0f3f763a62ccb3..1b7327e4ef161249baf139c89fb07709d7f6309d 100644
(file)
--- a/
micropeak/MicroPeak.java
+++ b/
micropeak/MicroPeak.java
@@
-23,8
+23,8
@@
import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
import java.util.*;
import java.io.*;
import java.util.concurrent.*;
import java.util.*;
-import org.altusmetrum.altoslib_
2
.*;
-import org.altusmetrum.altosuilib_
1
.*;
+import org.altusmetrum.altoslib_
9
.*;
+import org.altusmetrum.altosuilib_
9
.*;
public class MicroPeak extends MicroFrame implements ActionListener, ItemListener {
public class MicroPeak extends MicroFrame implements ActionListener, ItemListener {
@@
-65,6
+65,10
@@
public class MicroPeak extends MicroFrame implements ActionListener, ItemListene
try {
data = new MicroData((InputStream) fis, filename.getName());
AltosUIPreferences.set_last_logdir(filename);
try {
data = new MicroData((InputStream) fis, filename.getName());
AltosUIPreferences.set_last_logdir(filename);
+ } catch (MicroData.NonHexcharException nhe) {
+ data = null;
+ } catch (MicroData.FileEndedException nhe) {
+ data = null;
} catch (InterruptedException ie) {
data = null;
} finally {
} catch (InterruptedException ie) {
data = null;
} finally {
@@
-103,7
+107,7
@@
public class MicroPeak extends MicroFrame implements ActionListener, ItemListene
private void DownloadData() {
AltosDevice device = MicroDeviceDialog.show(this);
private void DownloadData() {
AltosDevice device = MicroDeviceDialog.show(this);
-
+
if (device != null)
new MicroDownload(this, device);
}
if (device != null)
new MicroDownload(this, device);
}
@@
-124,7
+128,7
@@
public class MicroPeak extends MicroFrame implements ActionListener, ItemListene
if (save.runDialog())
SetName(data.name);
}
if (save.runDialog())
SetName(data.name);
}
-
+
private void Export() {
if (data == null) {
no_data();
private void Export() {
if (data == null) {
no_data();
@@
-186,10
+190,25
@@
public class MicroPeak extends MicroFrame implements ActionListener, ItemListene
public void itemStateChanged(ItemEvent e) {
}
public void itemStateChanged(ItemEvent e) {
}
+ /* OSXAdapter interfaces */
+ public void macosx_file_handler(String path) {
+ CommandGraph(new File(path));
+ }
+
+ public void macosx_quit_handler() {
+ System.exit(0);
+ }
+
+ public void macosx_preferences_handler() {
+ Preferences();
+ }
+
public MicroPeak() {
++number_of_windows;
public MicroPeak() {
++number_of_windows;
+ register_for_macosx_events();
+
AltosUIPreferences.set_component(this);
container = getContentPane();
AltosUIPreferences.set_component(this);
container = getContentPane();