altosuilib: Make graph enable buttons be CheckBoxes instead of RadioButtons
authorKeith Packard <keithp@keithp.com>
Sat, 14 Jun 2014 23:26:22 +0000 (16:26 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 14 Jun 2014 23:26:22 +0000 (16:26 -0700)
aj noticed.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosUIEnable.java

index 8d42c09bfa2791a7267ee3162f0e84f8da17818a..da98797a7cfd7ae54f78cc6fe0fa5941bb5c6eab 100644 (file)
@@ -45,7 +45,7 @@ public class AltosUIEnable extends Container {
 
        class GraphElement implements ActionListener {
                AltosUIGrapher  grapher;
-               JRadioButton    enable;
+               JCheckBox       enable;
                String          name;
 
                public void actionPerformed(ActionEvent ae) {
@@ -55,7 +55,7 @@ public class AltosUIEnable extends Container {
                GraphElement (String name, AltosUIGrapher grapher, boolean enabled) {
                        this.name = name;
                        this.grapher = grapher;
-                       enable = new JRadioButton(name, enabled);
+                       enable = new JCheckBox(name, enabled);
                        grapher.set_enable(enabled);
                        enable.addActionListener(this);
                }
@@ -86,10 +86,10 @@ public class AltosUIEnable extends Container {
                /* Imperial units setting */
 
                /* Add label */
-               JRadioButton imperial_units = new JRadioButton("Imperial Units", AltosUIPreferences.imperial_units());
+               JCheckBox imperial_units = new JCheckBox("Imperial Units", AltosUIPreferences.imperial_units());
                imperial_units.addActionListener(new ActionListener() {
                                public void actionPerformed(ActionEvent e) {
-                                       JRadioButton item = (JRadioButton) e.getSource();
+                                       JCheckBox item = (JCheckBox) e.getSource();
                                        boolean enabled = item.isSelected();
                                        AltosUIPreferences.set_imperial_units(enabled);
                                }