projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Add product pictures to manual
[fw/altos]
/
altosui
/
AltosEepromManage.java
diff --git
a/altosui/AltosEepromManage.java
b/altosui/AltosEepromManage.java
index e6739e770eb0f55e572d3876a174e8d11e82a13e..da0a977733083696bacd66870a42f5118ddb6646 100644
(file)
--- a/
altosui/AltosEepromManage.java
+++ b/
altosui/AltosEepromManage.java
@@
-21,7
+21,8
@@
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
import javax.swing.*;
import java.io.*;
import java.util.concurrent.*;
-import org.altusmetrum.AltosLib.*;
+import org.altusmetrum.altoslib_2.*;
+import org.altusmetrum.altosuilib_1.*;
public class AltosEepromManage implements ActionListener {
public class AltosEepromManage implements ActionListener {
@@
-44,6
+45,15
@@
public class AltosEepromManage implements ActionListener {
}
}
}
}
+ private int countDeletedFlights() {
+ int count = 0;
+ for (AltosEepromLog flight : flights) {
+ if (flight.selected)
+ count++;
+ }
+ return count;
+ }
+
private String showDeletedFlights() {
String result = "";
private String showDeletedFlights() {
String result = "";
@@
-93,7
+103,8
@@
public class AltosEepromManage implements ActionListener {
} else if (cmd.equals("delete")) {
if (success) {
JOptionPane.showMessageDialog(frame,
} else if (cmd.equals("delete")) {
if (success) {
JOptionPane.showMessageDialog(frame,
- String.format("Flights erased: %s",
+ String.format("%d flights erased: %s",
+ countDeletedFlights(),
showDeletedFlights()),
serial_line.device.toShortString(),
JOptionPane.INFORMATION_MESSAGE);
showDeletedFlights()),
serial_line.device.toShortString(),
JOptionPane.INFORMATION_MESSAGE);
@@
-122,11
+133,13
@@
public class AltosEepromManage implements ActionListener {
for (AltosEepromLog flight : flights)
any_selected = any_selected || flight.selected;
if (any_selected) {
for (AltosEepromLog flight : flights)
any_selected = any_selected || flight.selected;
if (any_selected) {
- download = new AltosEepromDownload(frame,
+ AltosEepromMonitorUI monitor = new AltosEepromMonitorUI(frame);
+ monitor.addActionListener(this);
+ serial_line.set_frame(frame);
+ download = new AltosEepromDownload(monitor,
serial_line,
remote,
flights);
serial_line,
remote,
flights);
- download.addActionListener(this);
/*
* Start flight log download
*/
/*
* Start flight log download
*/
@@
-153,7
+166,7
@@
public class AltosEepromManage implements ActionListener {
ee.getLocalizedMessage(),
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof TimeoutException) {
ee.getLocalizedMessage(),
JOptionPane.ERROR_MESSAGE);
} else if (e instanceof TimeoutException) {
- TimeoutException te = (TimeoutException) e;
+
//
TimeoutException te = (TimeoutException) e;
JOptionPane.showMessageDialog(frame,
String.format("Communications failed with \"%s\"",
device.toShortString()),
JOptionPane.showMessageDialog(frame,
String.format("Communications failed with \"%s\"",
device.toShortString()),
@@
-194,10
+207,10
@@
public class AltosEepromManage implements ActionListener {
public AltosEepromManage(JFrame given_frame) {
public AltosEepromManage(JFrame given_frame) {
-
boolean
running = false;
+
//boolean
running = false;
frame = given_frame;
frame = given_frame;
- device = AltosDeviceDialog.show(frame, Altos.product_any);
+ device = AltosDevice
UI
Dialog.show(frame, Altos.product_any);
remote = false;
remote = false;