first cut at turnon scripts for EasyTimer v2
[fw/altos] / altosuilib / AltosRomconfigUI.java
index f8dcc3e1fe9ba83e8f21ca819b5673407a7c0d68..44d3a9f8a685687212aee908c7cbf1a94daadfe4 100644 (file)
  * 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;
@@ -49,11 +51,37 @@ public class AltosRomconfigUI
                Insets il = new Insets(4,4,4,4);
                Insets ir = new Insets(4,4,4,4);
 
-               pane = getContentPane();
+               pane = getScrollablePane();
                pane.setLayout(new GridBagLayout());
 
                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;
+               String product = "unknown";
+               if (config != null)
+                       product = config.usb_product;
+               product_value = new JLabel(product);
+               pane.add(product_value, c);
+
+               y++;
+
                /* Serial */
                c = new GridBagConstraints();
                c.gridx = 0; c.gridy = y;