+ LinkedBlockingQueue<String> reply_queue;
+
+ class Igniter {
+ JRadioButton button;
+ JLabel status_label;
+ String name;
+ int status;
+
+ void set_status (int status) {
+ this.status = status;
+ status_label.setText(String.format("\"%s\"", AltosIgnite.status_string(status)));
+ }
+
+ Igniter(AltosIgniteUI ui, String label, String name, int y) {
+ Container pane = getContentPane();
+ GridBagConstraints c = new GridBagConstraints();
+ Insets i = new Insets(4,4,4,4);
+
+ this.name = name;
+ this.status = AltosIgnite.Unknown;
+
+ c.gridx = 0;
+ c.gridy = y;
+ c.gridwidth = 1;
+ c.anchor = GridBagConstraints.WEST;
+ button = new JRadioButton (label);
+ pane.add(button, c);
+ button.addActionListener(ui);
+ button.setActionCommand(name);
+ group.add(button);
+
+ c.gridx = 1;
+ c.gridy = y;
+ c.gridwidth = 1;
+ c.anchor = GridBagConstraints.WEST;
+ status_label = new JLabel("plenty of text");
+ pane.add(status_label, c);
+
+ status = AltosIgnite.Unknown;
+ }
+ }
+
+ Igniter igniters[];
+
+ void set_status(String _name, int _status) {
+
+ final String name = _name;
+ final int status = _status;
+ Runnable r = new Runnable() {
+ public void run() {
+ for (int p = 0; p < igniters.length; p++)
+ if (name.equals(igniters[p].name))
+ igniters[p].set_status(status);
+ }
+ };
+ SwingUtilities.invokeLater(r);
+ }
+