]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
fixat lite mer menyer som einar bad om
[moosique.git] / MooToolbar.java
index 2415b3bbbbbd97af56e0807c2c59b53fb5865e3a..22cde75db5c1bf8bee0e10601478fa0d2368118e 100644 (file)
@@ -1,7 +1,8 @@
 import javax.swing.*;
 import java.awt.event.*;
+import java.awt.*;
 
-public class MooToolbar extends JToolBar       {
+public class MooToolbar extends JToolBar implements ActionListener     {
 
        public MooToolbar()     {
        
@@ -17,44 +18,35 @@ public class MooToolbar extends JToolBar    {
                fastforward = createButton("images/forward.gif", "fast forward");
                add(fastforward);
                
-               meas = createProgressIndikator("meas");
-               add(meas);
+               
                }
                
                private JButton createButton(String imageLocation, String toolTip) {
                        JButton button = new JButton (new ImageIcon(imageLocation));
                        button.setToolTipText(toolTip);
+                       button.addActionListener(this);
+                       //JOptionPane.showMessageDialog(rewind.getActionEvent());
                        return button;
                }
                
-               private JPanel createProgressIndikator(String name) {
-                       JPanel panel = new JPanel();
-                       JLabel label = new JLabel(name);
-                       JComboBox combo = new JComboBox();
-                       add(label);
-                       add(combo);
-                       return panel;
+               public void actionPerformed(ActionEvent e) {
                        
-               
-               }
-               
-               /*public void actionPerformed(ActionEvent e) {
-                       String but = e.getActionCommand();
                        
-                       if (but == "rewind") {
+               System.out.println(e.getSource());
+                       
+                       /*if () {
                        
-                       } else if (but == "images/play.gif") {
-                               JOptionPane.showMessageDialog(null, "playing");
+                       } else if () {
+                               
                        
-                       } else if (but == "stop") {
+                       } else if () {
                        
-                       } else if (but == "rewind") {
+                       } else if () {
                        
-                       }
-               }*/
+                       }*/
+               }
                private JButton rewind;
                private JButton playpause;
                private JButton stop;
                private JButton fastforward;
-               private JPanel meas;
 }