3 import java.awt.event.*;
6 * The title bar for each track with track name, channel, instrument etc.
8 * @author Andersson, Andreen, Lanneskog, Pehrson
12 public class MooTrackTitle extends JPanel{
14 private MooInstrumentList instruments;
15 private JComboBox channel;
16 private JCheckBox mute;
17 private JCheckBox solo;
19 * Creates the title bar.
21 public MooTrackTitle () {
22 setLayout(new GridLayout(3,1));
23 instruments = new MooInstrumentList();
26 JPanel checkboxes = new JPanel();
27 checkboxes.setLayout(new GridLayout(1,3));
29 channel = new JComboBox();
30 channel.setFont(new Font("Helvetica", Font.PLAIN, 10));
31 for (int i = 1; i <= 16; i++)
32 channel.addItem(new Integer(i));
33 channel.addItemListener(new ItemListener(){
34 public void itemStateChanged(ItemEvent e){
35 Object ob = channel.getSelectedItem();
36 if (ob instanceof Integer){
43 mute = new JCheckBox("Mute");
44 mute.setFont(new Font("Helvetica", Font.PLAIN, 10));
45 mute.addActionListener(new ActionListener(){
46 public void actionPerformed(ActionEvent event){
48 solo.setSelected(false);
52 solo = new JCheckBox("Solo");
53 solo.setFont(new Font("Helvetica", Font.PLAIN, 10));
54 solo.addActionListener(new ActionListener(){
55 public void actionPerformed(ActionEvent event){
57 mute.setSelected(false);