+
+ public MooNote getNote(){
+ return note;
+ }
+
+ class MAdapter extends MouseAdapter {
+ public void mousePressed(MouseEvent e) {
+ if (e.isControlDown()) {
+ if (pitchRect.contains(e.getPoint())) {
+ if (SwingUtilities.isRightMouseButton(e)) {
+ note.setPitch(note.getPitch() + 1);
+ } else if (SwingUtilities.isLeftMouseButton(e)) {
+ note.setPitch(note.getPitch() - 1);
+ }
+ calculateString();
+ } else if (veloRect.contains(e.getPoint())) {
+ if (SwingUtilities.isRightMouseButton(e)) {
+ note.setVelocity(note.getVelocity() + 1);
+ } else if (SwingUtilities.isLeftMouseButton(e)) {
+ note.setVelocity(note.getVelocity() - 1);
+ }
+ calculateString();
+ }
+ e.getComponent().repaint();
+ } else if (e.isPopupTrigger()) {
+ popup.show(e.getComponent(), e.getX(), e.getY());
+ }
+ }
+ }
+
+ class PopupListener implements ActionListener {
+ public void actionPerformed(ActionEvent e) {
+ Object source = e.getSource();
+ if (source == popupProp) {
+ new MooDialog(note);
+ } else if (source == popupRemove) {
+ remove();
+ }
+ }
+ }
+
+ protected void remove(){
+ mtv.remove(this);
+ }
+
+}