]> ruin.nu Git - moosique.git/blobdiff - MooNoteElement.java
Fixed a play thread that almost works
[moosique.git] / MooNoteElement.java
index f64e082c16884aa0f9382c8f2ba9380658161c6a..3b08887000f07f515cbbcfab170972ef6fb0cfe3 100644 (file)
@@ -12,6 +12,7 @@ import java.awt.event.*;
 public class MooNoteElement extends JPanel {
 
        private MooNote note;
+       private int columns;
        private boolean selected;
 
        /** 
@@ -19,8 +20,9 @@ public class MooNoteElement extends JPanel {
         * @param mn    the note that will be graphically represented
         * @param rows  the number of rows that the note will occupy
         */
-       public MooNoteElement (MooNote mn, int rows) {
+       public MooNoteElement (MooNote mn) {
                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);