]> ruin.nu Git - moosique.git/blobdiff - MooToolbar.java
*** empty log message ***
[moosique.git] / MooToolbar.java
index 54b90db40f83a871e82fc4b3a666436fa2900ee9..92bf3457e083b11f79269e02e91590b02fc21dd3 100644 (file)
@@ -12,6 +12,7 @@ public class MooToolbar extends JToolBar {
 
        private JButton rewind, playpause, stop, fastforward;
        private JLabel measure, beats, ticks, measureValue, beatsValue, ticksValue;
+       private JPanel progIndPanel;
        private ImageIcon playIcon, pauseIcon;
        private MooMouseAdapter mouseAdapter;
        public static final Color bgColor = new Color(192, 224, 255);
@@ -52,7 +53,7 @@ public class MooToolbar extends JToolBar {
                spacesouth.setBackground(bgColor);
 
                // Creates progress indicator panel and adds components
-               JPanel progIndPanel = new JPanel();
+               progIndPanel = new JPanel();
                progIndPanel.setMaximumSize(new Dimension(120,27));
                progIndPanel.setLayout(new GridLayout(2,4));
                progIndPanel.add(spacenorth);
@@ -77,9 +78,9 @@ public class MooToolbar extends JToolBar {
                long measures = tickPosition / (beatsPerMeasure * ticksPerBeat);
                long beats = (tickPosition - measures * beatsPerMeasure * ticksPerBeat) / ticksPerBeat;
                long ticks = tickPosition - measures * beatsPerMeasure * ticksPerBeat - beats * ticksPerBeat;
-               measureValue.setText(Long.toString(measures));
-               beatsValue.setText(Long.toString(beats));
-               ticksValue.setText(Long.toString(ticks));
+               measureValue.setText(Long.toString(1 + measures));
+               beatsValue.setText(Long.toString(1 + beats));
+               ticksValue.setText(Long.toString(1 + ticks));
        }
 
        /*