altosui: Fix channel changing in flight UI to actually work
[fw/altos] / ao-tools / altosui / AltosChannelMenu.java
index 8069c8531b1c71f9a5802be9c1e3a94d23a4c352..abbb86f43c31ea56e75b6cd6e5a48b11e18a5a24 100644 (file)
@@ -30,31 +30,11 @@ import java.util.concurrent.LinkedBlockingQueue;
 
 public class AltosChannelMenu extends JComboBox implements ActionListener {
        int                             channel;
 
 public class AltosChannelMenu extends JComboBox implements ActionListener {
        int                             channel;
-       LinkedList<ActionListener>      listeners;
-
-       public void addActionListener(ActionListener l) {
-               listeners.add(l);
-       }
-
-       public void actionPerformed(ActionEvent e) {
-               channel = getSelectedIndex();
-
-               ActionEvent newe = new ActionEvent(this, channel, e.getActionCommand());
-
-               ListIterator<ActionListener>    i = listeners.listIterator();
-
-               while (i.hasNext()) {
-                       ActionListener  listener = i.next();
-                       listener.actionPerformed(newe);
-               }
-               setMaximumSize(getPreferredSize());
-       }
 
        public AltosChannelMenu(int current_channel) {
 
                channel = current_channel;
 
 
        public AltosChannelMenu(int current_channel) {
 
                channel = current_channel;
 
-               listeners = new LinkedList<ActionListener>();
                for (int c = 0; c <= 9; c++)
                        addItem(String.format("Channel %1d (%7.3fMHz)", c, 434.550 + c * 0.1));
                setSelectedIndex(channel);
                for (int c = 0; c <= 9; c++)
                        addItem(String.format("Channel %1d (%7.3fMHz)", c, 434.550 + c * 0.1));
                setSelectedIndex(channel);