]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
Added comment for prospective addition
[moosique.git] / MooToolbar.java
index 7ba77d6e468c34d8365f96d5c6fc197e827ed3c3..2415b3bbbbbd97af56e0807c2c59b53fb5865e3a 100644 (file)
@@ -1,25 +1,60 @@
 import javax.swing.*;
+import java.awt.event.*;
 
-/*
- * 
- * 
- * @author  Andersson, Andreen, Lanneskog, Pehrson
- * @version 1
- */
-public class Moo {
+public class MooToolbar extends JToolBar       {
 
-       /* 
-        * 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 = createProgressIndikator("meas");
+               add(meas);
+               }
+               
+               private JButton createButton(String imageLocation, String toolTip) {
+                       JButton button = new JButton (new ImageIcon(imageLocation));
+                       button.setToolTipText(toolTip);
+                       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) {
+                       String but = e.getActionCommand();
+                       
+                       if (but == "rewind") {
+                       
+                       } else if (but == "images/play.gif") {
+                               JOptionPane.showMessageDialog(null, "playing");
+                       
+                       } else if (but == "stop") {
+                       
+                       } else if (but == "rewind") {
+                       
+                       }
+               }*/
+               private JButton rewind;
+               private JButton playpause;
+               private JButton stop;
+               private JButton fastforward;
+               private JPanel meas;
 }