repaint();
}
+ /**
+ * Transposes the current note element the given number of halftones.
+ * @param halftones the number of halftones to transpose - positive for up, negative for down
+ */
+ public void transpose(int halftones) {
+ note.transpose(halftones);
+ update();
+ }
+
/**
* Draws the string that shows the note's properties.
* @param g The Graphics object used to draw the strings.
}
/**
- * layout this changed elemnt
+ * Layout this changed elemnt.
*/
protected void newLayout(){
mtv.layoutElement(this,true);
}
+
/**
* Listener that checks the mouse actions on this element.
*/
} else if (source == popupRemove) {
remove();
} else if (source == popupTranspOctUp) {
- note.transpose(12);
- update();
+ transpose(12);
} else if (source == popupTranspOctDown) {
- note.transpose(-12);
- update();
+ transpose(-12);
}
}
}