- public void layoutElement(MooNoteElement elem){
- int extraHeight = Toolkit.getDefaultToolkit().getScreenSize().height - 150;
- int beatsPerSixteenth = Moosique.getSequence().getResolution() / 4;
+ public void layoutElement(MooNoteElement elem, boolean old){
+ // If the element is currently in the view, removes its coordinates from the list.
+ Rectangle r = new Rectangle();
+ if (old){
+ r = elem.getBounds(r);
+ for (Iterator i = rects.iterator(); i.hasNext();){
+ Object ob = i.next();
+ if (r.equals(ob)){
+ rects.remove(ob);
+ break;
+ }
+ }
+ }
+
+ // Creates temporary variables.
+ int ticksPerSixteenth = Moosique.getSequence().getResolution() / 4;