protected static int extraHeight = 0;
public static final int NOTE_HEIGHT = 10, NOTE_WIDTH = 40, VIEW_WIDTH = 200;
protected static int extraHeight = 0;
public static final int NOTE_HEIGHT = 10, NOTE_WIDTH = 40, VIEW_WIDTH = 200;
// If the element is currently in the view, removes its coordinates from the list.
Rectangle r = new Rectangle();
if (old){
// If the element is currently in the view, removes its coordinates from the list.
Rectangle r = new Rectangle();
if (old){
add(elem);
layoutElement(elem, false);
setPreferredSize(new Dimension(VIEW_WIDTH, viewLength + extraHeight));
add(elem);
layoutElement(elem, false);
setPreferredSize(new Dimension(VIEW_WIDTH, viewLength + extraHeight));
}
public void removeNote(MooNoteElement elem, MooNote mn) {
mn.removeFrom(track);
remove(elem);
elem.getNote().removeFrom(track);
}
public void removeNote(MooNoteElement elem, MooNote mn) {
mn.removeFrom(track);
remove(elem);
elem.getNote().removeFrom(track);
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if (source == popupAdd) {
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if (source == popupAdd) {
// int channel, int pitch, int velocity, long timestamp, int duration
// int channel, int pitch, int velocity, long timestamp, int duration