]> ruin.nu Git - moosique.git/blobdiff - MooNoteElement.java
*** empty log message ***
[moosique.git] / MooNoteElement.java
index beb5702b0467b663f102f2482e73cf75cbcb96fb..c502b4d568cd47e6269e0fb79e0cd3ff1f753ec9 100644 (file)
@@ -12,14 +12,18 @@ 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) {
                note = mn;
+               columns = mn.getDuration() / 24;
+               setBorder(BorderFactory.createLineBorder(Color.black));
        }
 
        /** 
@@ -64,6 +68,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);