]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
Fixed the FileFilter, implemented some menu options, tweaked the GUI and organized...
[moosique.git] / MooToolbar.java
index 7ba77d6e468c34d8365f96d5c6fc197e827ed3c3..3045118d7cbe573f14105a6cf8c286ded0bbae6a 100644 (file)
@@ -1,25 +1,67 @@
 import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.awt.Color;
 
-/*
- * 
- * 
- * @author  Andersson, Andreen, Lanneskog, Pehrson
- * @version 1
- */
-public class Moo {
+public class MooToolbar extends JToolBar implements ActionListener     {
 
-       /* 
-        * Creates the toolbar.
-        */
-       public MooToolbar () {
-
-       }
-
-       /* 
-        * 
-        */
-       public void () {
+       public MooToolbar()     {
        
-       }
+               rewind = createButton("images/rewind.gif", "rewind");
+               add(rewind);
+
+               playpause = createButton("images/play.gif", "play");
+               add(playpause);
+               
+               stop = createButton("images/stop.gif", "stop");
+               add(stop);
+               
+               fastforward = createButton("images/forward.gif", "fast forward");
+               add(fastforward);
+               
+               meas = createLabel("Measure");
+               add(meas);
+               
+               beat = createLabel("Beats");
+               add(beat);
+               
+               ticks = createLabel("Ticks");
+               add(ticks);
+               
+               }
+               
+               private JButton createButton(String imageLocation, String toolTip) {
+                       JButton button = new JButton (new ImageIcon(imageLocation));
+                       button.setToolTipText(toolTip);
+                       button.addActionListener(this);
+                       return button;
+               }
+               
+               private JLabel createLabel(String name) {
+                       JLabel label = new JLabel(name);
+                       return label;
+                       
+               }
+               
+               public void actionPerformed(ActionEvent e) {
+                       
+                       
+                       /*if () {
+                       
+                       } else if () {
+                               
+                       
+                       } else if () {
+                       
+                       } else if () {
+                       
+                       }*/
+               }
+               private JButton rewind;
+               private JButton playpause;
+               private JButton stop;
+               private JButton fastforward;
+               private JLabel meas;
+               private JLabel beat;
+               private JLabel ticks;
 }