X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosRomconfigUI.java;h=a25c39c468796637a479356de689100ad2bbde9d;hp=fd670d4ec9df439081ee7533662989f9e2223083;hb=52149fd81df45f37f5097850795f290f463c43ef;hpb=22005da598921ef6fe1a7f1bb5e56e41f44fe12f diff --git a/altosuilib/AltosRomconfigUI.java b/altosuilib/AltosRomconfigUI.java index fd670d4e..a25c39c4 100644 --- a/altosuilib/AltosRomconfigUI.java +++ b/altosuilib/AltosRomconfigUI.java @@ -16,12 +16,12 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_13; +package org.altusmetrum.altosuilib_14; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import org.altusmetrum.altoslib_13.*; +import org.altusmetrum.altoslib_14.*; public class AltosRomconfigUI extends AltosUIDialog @@ -29,9 +29,11 @@ public class AltosRomconfigUI { Container pane; Box box; + JLabel product_label; JLabel serial_label; JLabel radio_calibration_label; + JLabel product_value; JFrame owner; JTextField serial_value; JTextField radio_calibration_value; @@ -54,6 +56,29 @@ public class AltosRomconfigUI int y = 0; + /* Product name */ + /* Serial */ + c = new GridBagConstraints(); + c.gridx = 0; c.gridy = y; + c.gridwidth = 3; + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.LINE_START; + c.insets = il; + product_label = new JLabel("Product:"); + pane.add(product_label, c); + + c = new GridBagConstraints(); + c.gridx = 3; c.gridy = y; + c.gridwidth = 3; + c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.anchor = GridBagConstraints.LINE_START; + c.insets = ir; + product_value = new JLabel(config.usb_product); + pane.add(product_value, c); + + y++; + /* Serial */ c = new GridBagConstraints(); c.gridx = 0; c.gridy = y; @@ -76,7 +101,7 @@ public class AltosRomconfigUI y++; - if (AltosLib.has_radio(config.usb_id.pid)) { + if (config == null || AltosLib.has_radio(config.usb_id.pid)) { /* Radio calibration value */ c = new GridBagConstraints(); c.gridx = 0; c.gridy = y;