]> ruin.nu Git - moosique.git/blobdiff - MooTrackTitle.java
some gui changes..
[moosique.git] / MooTrackTitle.java
index 522de6504b32c045412d6f199e4c8799c89cac36..b24931f0cc5cc7907f42461bab4f4dec1dbd94a5 100644 (file)
@@ -1,18 +1,62 @@
 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(3,1));
+               instruments = new MooInstrumentList();
+               add(instruments);
 
+               JPanel checkboxes = new JPanel();
+               checkboxes.setLayout(new GridLayout(1,3));
+
+               channel = new JComboBox();
+               channel.setFont(new Font("Helvetica", Font.PLAIN, 10));
+               for (int i = 1; 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.setFont(new Font("Helvetica", Font.PLAIN, 10));
+               mute.addActionListener(new ActionListener(){
+                               public void actionPerformed(ActionEvent event){
+                                       //setMute
+                                       solo.setSelected(false);
+                               }});
+               checkboxes.add(mute);
+
+               solo = new JCheckBox("Solo");
+               solo.setFont(new Font("Helvetica", Font.PLAIN, 10));
+               solo.addActionListener(new ActionListener(){
+                               public void actionPerformed(ActionEvent event){
+                                       //setSolo
+                                       mute.setSelected(false);
+                               }});
+               checkboxes.add(solo);
+               add(checkboxes);
        }
 }