/**
* Moves the animation down the sandwich such that it is in the right
* position according to begin time and document order.
*/
protected void pushDown(AbstractAnimation anim) {
TimedElement e = anim.getTimedElement();
AbstractAnimation top = null;
boolean moved = false;
while (anim.lowerAnimation != null
&& (anim.lowerAnimation.isActive
|| anim.lowerAnimation.isFrozen)
&& (anim.lowerAnimation.beginTime > anim.beginTime
|| anim.lowerAnimation.beginTime == anim.beginTime
&& e.isBefore(anim.lowerAnimation.getTimedElement()))) {
AbstractAnimation higher = anim.higherAnimation;
AbstractAnimation lower = anim.lowerAnimation;
AbstractAnimation lowerLower = lower.lowerAnimation;
if (higher != null) {
higher.lowerAnimation = lower;