]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
varför vill det inte bli radbrytning???
[moosique.git] / MooToolbar.java
index 3045118d7cbe573f14105a6cf8c286ded0bbae6a..8ee350adf6fc8b8abacd0975f7c5a1865f23fa85 100644 (file)
@@ -19,15 +19,15 @@ public class MooToolbar extends JToolBar implements ActionListener  {
                fastforward = createButton("images/forward.gif", "fast forward");
                add(fastforward);
                
-               meas = createLabel("Measure");
+               meas = createProjIndButton("Mrs: \n" + measures);
                add(meas);
                
-               beat = createLabel("Beats");
+               beat = createProjIndButton("Beat: \n" + beats);
                add(beat);
                
-               ticks = createLabel("Ticks");
-               add(ticks);
-               
+               tick = createProjIndButton("Tick: \n" + ticks);
+               add(tick);
+
                }
                
                private JButton createButton(String imageLocation, String toolTip) {
@@ -37,15 +37,17 @@ public class MooToolbar extends JToolBar implements ActionListener  {
                        return button;
                }
                
-               private JLabel createLabel(String name) {
-                       JLabel label = new JLabel(name);
-                       return label;
-                       
+               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;
                }
                
-               public void actionPerformed(ActionEvent e) {
-                       
                        
+               public void actionPerformed(ActionEvent e) {}
+                                       
                        /*if () {
                        
                        } else if () {
@@ -56,12 +58,15 @@ public class MooToolbar extends JToolBar implements ActionListener  {
                        } else if () {
                        
                        }*/
-               }
                private JButton rewind;
                private JButton playpause;
                private JButton stop;
                private JButton fastforward;
-               private JLabel meas;
-               private JLabel beat;
-               private JLabel ticks;
+               private JButton meas;
+               private JButton beat;
+               private JButton tick;
+               private int measures = 1;
+               private int beats = 1;
+               private int ticks = 1;
+
 }