import java.awt.event.*;
import libaltosJNI.*;
-public class AltosDeviceDialog extends JDialog implements ActionListener {
+public class AltosDeviceDialog extends AltosDialog implements ActionListener {
private AltosDevice value;
private JList list;
private AltosDevice[] devices() {
java.util.List<AltosDevice> usb_devices = AltosUSBDevice.list(product);
- java.util.List<AltosDevice> bt_devices = Altos.bt_known.list(product);
- AltosDevice[] devices = new AltosDevice[usb_devices.size() + bt_devices.size()];
+ int num_devices = usb_devices.size();
+ java.util.List<AltosDevice> bt_devices = AltosBTKnown.bt_known().list(product);
+ num_devices += bt_devices.size();
+ AltosDevice[] devices = new AltosDevice[num_devices];
for (int i = 0; i < usb_devices.size(); i++)
devices[i] = usb_devices.get(i);
if ("select".equals(e.getActionCommand()))
value = (AltosDevice)(list.getSelectedValue());
if ("manage".equals(e.getActionCommand())) {
- AltosBTManage.show(frame, Altos.bt_known);
+ AltosBTManage.show(frame, AltosBTKnown.bt_known());
update_devices();
return;
}