]> ruin.nu Git - moosique.git/blobdiff - MooNoteElement.java
no message
[moosique.git] / MooNoteElement.java
index beb5702b0467b663f102f2482e73cf75cbcb96fb..dd31c86b800cc2b7cb1e8a1c077f12bee74f8ad2 100644 (file)
@@ -12,14 +12,17 @@ import java.awt.event.*;
 public class MooNoteElement extends JPanel {
 
        private MooNote note;
+       private int columns;
        private boolean selected;
 
        /** 
         * Creates a new note element.
-        * @param mn The note that will be graphically represented
+        * @param mn    the note that will be graphically represented
+        * @param rows  the number of rows that the note will occupy
         */
-       public MooNoteElement (MooNote mn) {
+       public MooNoteElement (MooNote mn, int rows) {
                note = mn;
+               columns = mn.getDuration() / 24;
        }
 
        /** 
@@ -64,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);