X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooNoteElement.java;h=8d8778d369e57a18b778f39734a9158644b50385;hp=6f372349e5372c2e657f71333366075c0d4dfe50;hb=e31778837bee5cfbbaf643d17f1eaeb086d8e50c;hpb=a714980001770d23628599710a48260e12f09be4 diff --git a/MooNoteElement.java b/MooNoteElement.java index 6f37234..8d8778d 100644 --- a/MooNoteElement.java +++ b/MooNoteElement.java @@ -59,6 +59,14 @@ public class MooNoteElement extends JPanel { return selected; } + /** + * Returns the note of this element. + * @return the note + */ + public MooNote getNote() { + return note; + } + /** * Selects the current NoteElement. * @param state if the element should be selected @@ -85,8 +93,8 @@ public class MooNoteElement extends JPanel { } */ - g2.drawString(notePitch, 1, 9); - g2.drawString("" + noteVelocity, 21, 9); + g2.drawString(notePitch, 1, 8); + g2.drawString("" + noteVelocity, 21, 8); } /** @@ -117,18 +125,15 @@ public class MooNoteElement extends JPanel { noteVelocity = ""+note.getVelocity(); } - /** - * Gets the note that is element represents - * @return the MooNote object. - */ - public MooNote getNote(){ - return note; - } - /** * Listener that checks the mouse actions on this element. */ class MAdapter extends MouseAdapter { + + public void mouseClicked(MouseEvent e) { + + } + /** * Checks if the mouse is pressed. * Pops up the menu if right mousebutton is used. @@ -178,7 +183,7 @@ public class MooNoteElement extends JPanel { * Asks the MooTrackView that it's painted on to remove this element and the note. */ protected void remove(){ - mtv.removeNote(this, note); + mtv.removeNote(this); } }