]> ruin.nu Git - moosique.git/blobdiff - MooTrackTitle.java
det går att kompilera nu!
[moosique.git] / MooTrackTitle.java
index 49082670e1df277bd87e11084fddf55ce198d1ff..8b3c84d1d096dd7401f41fddefd1ff2bde91cad5 100644 (file)
@@ -1,25 +1,54 @@
 import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
 
-/*
+/**
  * The title bar for each track with track name, channel, instrument etc.
  * 
  * @author  Andersson, Andreen, Lanneskog, Pehrson
  * @version 1
  */
  
-public class MooTrackTitle {
+public class MooTrackTitle extends JPanel{
 
-       /* 
+       private MooInstrumentList instruments;
+       private JComboBox channel;
+       private JCheckBox mute;
+       private JCheckBox solo;
+       /** 
         * Creates the title bar.
         */
        public MooTrackTitle () {
+               setLayout(new GridLayout(1,3));
+               instruments = new MooInstrumentList();
+               add(instruments);
 
-       }
+               channel = new JComboBox();
+               for (int i = 0; i < 16; i++)
+                       channel.addItem(new Integer(i));
+               channel.addItemListener(new ItemListener(){
+                               public void itemStateChanged(ItemEvent e){
+                                       Object ob = channel.getSelectedItem();
+                                       if (ob instanceof Integer){
+                                               //set channel
+                                       }
+                               }});
+               add(channel);
+               
+               mute = new JCheckBox("Mute");
+               mute.addActionListener(new ActionListener(){
+                               public void actionPerformed(ActionEvent event){
+                                       //setMute
+                                       solo.setSelected(false);
+                               }});
+               add(mute);
 
-       /* 
-        * 
-        */
-       public void () {
-       
+               solo = new JCheckBox("Solo");
+               solo.addActionListener(new ActionListener(){
+                               public void actionPerformed(ActionEvent event){
+                                       //setSolo
+                                       mute.setSelected(false);
+                               }});
+               add(solo);
        }
 }