]> ruin.nu Git - moosique.git/blobdiff - MooNoteElement.java
no message
[moosique.git] / MooNoteElement.java
index ca1d5c2e9bb533f7c01914f59e2b9afce728c08e..beb5702b0467b663f102f2482e73cf75cbcb96fb 100644 (file)
@@ -45,17 +45,12 @@ public class MooNoteElement extends JPanel {
        {
                super.paintComponent(g);
 
-               if (note == null)
-                       return;
-
-               if (!(g instanceof Graphics2D))
-                       return;
+               if (note == null || !(g instanceof Graphics2D)) return;
                Graphics2D g2 = (Graphics2D)g;
 
                String n = ""; 
                int pitch = note.getPitch();
-               switch( pitch % 12)
-               {
+               switch (pitch % 12) {
                        case 0: n = "C"; break;
                        case 1: n = "C#"; break;
                        case 2: n = "D"; break;
@@ -69,11 +64,8 @@ public class MooNoteElement extends JPanel {
                        case 10: n = "A#"; break;
                        case 11: n = "B"; break;
                }
-               g2.setFont(new Font("Helvetica", Font.PLAIN, 10));
+               g2.setFont(new Font("Helvetica", Font.PLAIN, 8));
                n = n +(pitch/12);
-               g2.drawString(n, 1, 11);
-               g2.drawString(""+note.getVelocity(),1,23);
-
+               g2.drawString(n + " "+ note.getVelocity(), 1, 9);
        }
-
-}
+}
\ No newline at end of file