import java.awt.event.*;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
-import javax.swing.table.*;
import java.io.*;
-import java.util.*;
-import java.text.*;
-import java.util.prefs.*;
import java.util.concurrent.*;
+import org.altusmetrum.altosuilib.*;
public class AltosFlashUI
- extends AltosDialog
+ extends AltosUIDialog
implements ActionListener
{
Container pane;
boolean select_source_file() {
JFileChooser hexfile_chooser = new JFileChooser();
- File firmwaredir = AltosPreferences.firmwaredir();
+ File firmwaredir = AltosUIPreferences.firmwaredir();
if (firmwaredir != null)
hexfile_chooser.setCurrentDirectory(firmwaredir);
file = hexfile_chooser.getSelectedFile();
if (file == null)
return false;
- AltosPreferences.set_firmwaredir(file.getParentFile());
+ AltosUIPreferences.set_firmwaredir(file.getParentFile());
return true;
}
boolean select_debug_dongle() {
- debug_dongle = AltosDeviceDialog.show(frame, Altos.product_any);
+ debug_dongle = AltosDeviceUIDialog.show(frame, Altos.product_any);
if (debug_dongle == null)
return false;
public void run() {
ui.flash = flash;
ui.update_rom_config_info(current_config);
- System.out.printf("Done updating rom config info\n");
await_rom_config.release();
}
});
- System.out.printf("Waiting for rom configuration updates\n");
await_rom_config.acquire();
- System.out.printf("Got rom config update\n");
if (ui.rom_config != null) {
- System.out.printf("rom_config not null\n");
flash.set_romconfig(ui.rom_config);
flash.flash();
}
} catch (InterruptedException ee) {
final Exception e = ee;
- System.out.printf("exception %s\n", e.toString());
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ui.exception(e);
});
} catch (IOException ee) {
final Exception e = ee;
- System.out.printf("exception %s\n", e.toString());
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ui.exception(e);
});
} catch (AltosSerialInUseException ee) {
final Exception e = ee;
- System.out.printf("exception %s\n", e.toString());
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ui.exception(e);