From b6312d2dc8b1a096ecb1dfe9e6590d9f7bf14f71 Mon Sep 17 00:00:00 2001 From: Einar Pehrson Date: Tue, 13 May 2003 10:06:53 +0000 Subject: [PATCH] no message --- MooNoteElement.java | 11 +++++++++++ MooTrackView.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/MooNoteElement.java b/MooNoteElement.java index f64e082..dd31c86 100644 --- a/MooNoteElement.java +++ b/MooNoteElement.java @@ -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); diff --git a/MooTrackView.java b/MooTrackView.java index a9a41d9..8138442 100644 --- a/MooTrackView.java +++ b/MooTrackView.java @@ -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. -- 2.39.2