]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
varför vill det inte bli radbrytning???
[moosique.git] / MooToolbar.java
index bca5b5430e69b2032e8940c59f1e887a1d1382d4..8ee350adf6fc8b8abacd0975f7c5a1865f23fa85 100644 (file)
@@ -1,5 +1,7 @@
 import javax.swing.*;
 import java.awt.event.*;
+import java.awt.*;
+import java.awt.Color;
 
 public class MooToolbar extends JToolBar implements ActionListener     {
 
@@ -17,6 +19,15 @@ public class MooToolbar extends JToolBar implements ActionListener   {
                fastforward = createButton("images/forward.gif", "fast forward");
                add(fastforward);
                
+               meas = createProjIndButton("Mrs: \n" + measures);
+               add(meas);
+               
+               beat = createProjIndButton("Beat: \n" + beats);
+               add(beat);
+               
+               tick = createProjIndButton("Tick: \n" + ticks);
+               add(tick);
+
                }
                
                private JButton createButton(String imageLocation, String toolTip) {
@@ -26,22 +37,36 @@ public class MooToolbar extends JToolBar implements ActionListener  {
                        return button;
                }
                
-               public void actionPerformed(ActionEvent e) {
-                       Object ob = e.getActionCommand();
+               private JButton createProjIndButton(String title){
+                       JButton abutton = new JButton(title);
+                       abutton.setFont(new Font("Times New Roman", Font.PLAIN ,8));
+                       abutton.setMinimumSize(new Dimension(30,22));
+                       abutton.setVerticalTextPosition(AbstractButton.CENTER);
+                       return abutton;
+               }
+               
                        
-                       if (ob == rewind) {
+               public void actionPerformed(ActionEvent e) {}
+                                       
+                       /*if () {
                        
-                       } else if (ob == playpause) {
-                               JOptionPane.showMessageDialog(null, "playing");
+                       } else if () {
+                               
                        
-                       } else if (ob == stop) {
+                       } else if () {
                        
-                       } else if (ob == rewind) {
+                       } else if () {
                        
-                       }
-               }
+                       }*/
                private JButton rewind;
                private JButton playpause;
                private JButton stop;
                private JButton fastforward;
+               private JButton meas;
+               private JButton beat;
+               private JButton tick;
+               private int measures = 1;
+               private int beats = 1;
+               private int ticks = 1;
+
 }