projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Split out UI-specific preferences
[fw/altos]
/
altosui
/
AltosScanUI.java
diff --git
a/altosui/AltosScanUI.java
b/altosui/AltosScanUI.java
index bce4b32c9ef02e19db030e33eb77a5e5a2558005..2b9137d80c4f2c1d47301cf4631556f64560e758 100644
(file)
--- a/
altosui/AltosScanUI.java
+++ b/
altosui/AltosScanUI.java
@@
-102,7
+102,7
@@
class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel
}
public class AltosScanUI
}
public class AltosScanUI
- extends
J
Dialog
+ extends
Altos
Dialog
implements ActionListener
{
AltosUI owner;
implements ActionListener
{
AltosUI owner;
@@
-130,8
+130,7
@@
public class AltosScanUI
void scan_exception(Exception e) {
if (e instanceof FileNotFoundException) {
JOptionPane.showMessageDialog(owner,
void scan_exception(Exception e) {
if (e instanceof FileNotFoundException) {
JOptionPane.showMessageDialog(owner,
- String.format("Cannot open device \"%s\"",
- device.toShortString()),
+ ((FileNotFoundException) e).getMessage(),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof AltosSerialInUseException) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof AltosSerialInUseException) {
@@
-268,7
+267,7
@@
public class AltosScanUI
scanning_telemetry |= (1 << Altos.ao_telemetry_standard);
telemetry_boxes[Altos.ao_telemetry_standard - Altos.ao_telemetry_min].setSelected(true);
}
scanning_telemetry |= (1 << Altos.ao_telemetry_standard);
telemetry_boxes[Altos.ao_telemetry_standard - Altos.ao_telemetry_min].setSelected(true);
}
- AltosPreferences.set_scanning_telemetry(scanning_telemetry);
+ Altos
UI
Preferences.set_scanning_telemetry(scanning_telemetry);
}
if (cmd.equals("monitor")) {
}
if (cmd.equals("monitor")) {
@@
-326,8
+325,7
@@
public class AltosScanUI
return true;
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(owner,
return true;
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(owner,
- String.format("Cannot open device \"%s\"",
- device.toShortString()),
+ ee.getMessage(),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
@@
-361,7
+359,7
@@
public class AltosScanUI
owner = in_owner;
owner = in_owner;
- frequencies = AltosPreferences.common_frequencies();
+ frequencies = Altos
UI
Preferences.common_frequencies();
frequency_index = 0;
telemetry = Altos.ao_telemetry_min;
frequency_index = 0;
telemetry = Altos.ao_telemetry_min;
@@
-402,7
+400,7
@@
public class AltosScanUI
c.gridy = 2;
pane.add(telemetry_label, c);
c.gridy = 2;
pane.add(telemetry_label, c);
- int scanning_telemetry = AltosPreferences.scanning_telemetry();
+ int scanning_telemetry = Altos
UI
Preferences.scanning_telemetry();
telemetry_boxes = new JCheckBox[Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1];
for (int k = Altos.ao_telemetry_min; k <= Altos.ao_telemetry_max; k++) {
int j = k - Altos.ao_telemetry_min;
telemetry_boxes = new JCheckBox[Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1];
for (int k = Altos.ao_telemetry_min; k <= Altos.ao_telemetry_max; k++) {
int j = k - Altos.ao_telemetry_min;