]> ruin.nu Git - moosique.git/commitdiff
no message
authorEinar Pehrson <einarp@itstud.chalmers.se>
Tue, 13 May 2003 10:06:53 +0000 (10:06 +0000)
committerEinar Pehrson <einarp@itstud.chalmers.se>
Tue, 13 May 2003 10:06:53 +0000 (10:06 +0000)
MooNoteElement.java
MooTrackView.java

index f64e082c16884aa0f9382c8f2ba9380658161c6a..dd31c86b800cc2b7cb1e8a1c077f12bee74f8ad2 100644 (file)
@@ -12,6 +12,7 @@ import java.awt.event.*;
 public class MooNoteElement extends JPanel {
 
        private MooNote note;
+       private int columns;
        private boolean selected;
 
        /** 
@@ -21,6 +22,7 @@ public class MooNoteElement extends JPanel {
         */
        public MooNoteElement (MooNote mn, int rows) {
                note = mn;
+               columns = mn.getDuration() / 24;
        }
 
        /** 
@@ -65,6 +67,15 @@ public class MooNoteElement extends JPanel {
                        case 10: n = "A#"; break;
                        case 11: n = "B"; break;
                }
+
+       /*
+               switch(columns) {
+                       case 0:
+                       case 1:
+                       ...
+               }
+       */
+               
                g2.setFont(new Font("Helvetica", Font.PLAIN, 8));
                n = n +(pitch/12);
                g2.drawString(n + " "+ note.getVelocity(), 1, 9);
index a9a41d9f127a9c6a8871b5b8515c46cfcd9d1aea..81384425b7289063262d4968546aab0033cdfb6b 100644 (file)
@@ -89,7 +89,7 @@ public class MooTrackView extends JPanel implements ActionListener {
                                if (note instanceof MooNote) {
                                        // Adds the note element to the note area.
                                        MooNote mn = (MooNote)note;
-                                       elem = new MooNoteElement(mn, mn.getDuration() / 24);
+                                       elem = new MooNoteElement(mn);
                                        add(elem);
 
                                        // Moves the note element to the appropriate place.