X-Git-Url: https://ruin.nu/git/intel?a=blobdiff_plain;f=MooInstrumentList.java;h=d109227a287d17173737e08e18cd7072b3229126;hb=2ee5615787c8377a17a91158ea18adbae1aa74c2;hp=8f1afcb4728b25a92ec6103a41eb84405c0999d4;hpb=c62f88aadcb432edd30b81305821a0d56b5e34eb;p=moosique.git diff --git a/MooInstrumentList.java b/MooInstrumentList.java index 8f1afcb..d109227 100644 --- a/MooInstrumentList.java +++ b/MooInstrumentList.java @@ -6,23 +6,24 @@ import java.awt.event.*; /** * A Combo Box where the instrument of the currently active channel can be selected. * - * @author Einar Pehrson + * @author Einar Pehrson, Michael Andreen */ public class MooInstrumentList extends JComboBox implements ActionListener { protected int channel; - - public MooInstrumentList(int instrument) { + public MooInstrumentList(int chan) { super(instruments); - setSelectedIndex(instrument); + setChannel(chan); setFont(new Font("Helvetica", Font.PLAIN, 10)); addActionListener(this); } public void setChannel(int chan){ channel = chan; - setSelectedIndex(Moosique.getChannel(chan).getProgram()); + System.out.println(chan); + setSelectedIndex(Moosique.getChannel(channel).getProgram()); + System.out.println(Moosique.getChannel(channel).getProgram()); } public void actionPerformed(ActionEvent e) {