X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooNoteElement.java;h=4b5d967ab9b3c8721020a4a236efa6352b7fd11e;hp=d5e4d2a433ece1f041b1056403b473425c75d63a;hb=8efaf48c550d5462b987e6a9e0f4efd14bc8b483;hpb=48a0c91ca112e632b96c773d9ca2419a0337acd4 diff --git a/MooNoteElement.java b/MooNoteElement.java index d5e4d2a..4b5d967 100644 --- a/MooNoteElement.java +++ b/MooNoteElement.java @@ -115,6 +115,10 @@ public class MooNoteElement extends JPanel { noteVelocity = ""+note.getVelocity(); } + public MooNote getNote(){ + return note; + } + class MAdapter extends MouseAdapter { public void mousePressed(MouseEvent e) { if (e.isControlDown()) { @@ -147,8 +151,13 @@ public class MooNoteElement extends JPanel { if (source == popupProp) { new MooDialog(note); } else if (source == popupRemove) { - mtv.remove((MooNoteElement)((JComponent)e.getSource()).getParent().getParent()); + remove(); } } } + + protected void remove(){ + mtv.remove(this); + } + }