Arrows a = Arrows.getArrowByColumn(ch.getStyle(), col);
Point p = new Point(sX, sY);
Rectangle sB = shadow.getBounds();
NoteComponent n = notes.get(p);
Syncs z = Syncs.getHighestEnum(beat);
isSaved = false;
mSave.setEnabled(true);
if (n != null)
{
/*
* No matter what, the old NoteComponent in use has to
* go away. Remove it. At this point, determine if
* the type to see if it's the same. If it is
* the same, remove it from the collection.
* Otherwise, replace it.
*/
stepChart.remove(n);
ch.getMeasure(measure).getBeat(beat).resetNote(col);
if (n.getNote().equals(aNote))
{
notes.remove(p);
updateStats();
return;
}
}
n = new NoteComponent(aNote, z, a);
n.setPreferredSize(ARR);
n.setSize(ARR);
n.setMinimumSize(ARR);
n.setMaximumSize(ARR);
n.setBounds(sB);
notes.put(p, n);
stepChart.add(n);
stepChart.setLayer(n, 2000 + sY);
ch.getMeasure(measure).getBeat(beat).setNote(col, n.getNote());
updateStats();
}