/** * Invoked to indicate that this timed element has had its fill removed. */ public void removeFill(AbstractAnimation anim) { anim.isActive = false; anim.isFrozen = false; anim.value = null; anim.markDirty(); moveToBottom(anim); }
/** * Marks this animation and any animation that depends on it * as dirty. */ protected void markDirty() { isDirty = true; if (higherAnimation != null && !higherAnimation.willReplace() && !higherAnimation.isDirty) { higherAnimation.markDirty(); } }
/** * Marks this animation and any animation that depends on it * as dirty. */ protected void markDirty() { isDirty = true; if (higherAnimation != null && !higherAnimation.willReplace() && !higherAnimation.isDirty) { higherAnimation.markDirty(); } }
/** * Invoked to indicate that this timed element has had its fill removed. */ public void removeFill(AbstractAnimation anim) { anim.isActive = false; anim.isFrozen = false; anim.value = null; anim.markDirty(); moveToBottom(anim); }
/** * Invoked to indicate that this timed element has had its fill removed. */ public void removeFill(AbstractAnimation anim) { anim.isActive = false; anim.isFrozen = false; anim.value = null; anim.markDirty(); moveToBottom(anim); }
/** * Marks this animation and any animation that depends on it * as dirty. */ protected void markDirty() { isDirty = true; if (higherAnimation != null && !higherAnimation.willReplace() && !higherAnimation.isDirty) { higherAnimation.markDirty(); } }
/** * Invoked to indicate that this timed element became inactive. * * @param anim the animation * @param isFrozen whether the element is frozen or not */ public void toInactive(AbstractAnimation anim, boolean isFrozen) { anim.isActive = false; anim.isFrozen = isFrozen; anim.markDirty(); if (!isFrozen) { anim.value = null; anim.beginTime = Float.NEGATIVE_INFINITY; moveToBottom(anim); } }
/** * Invoked to indicate that base value of the specified attribute * or property has changed. */ public void baseValueChanged(AnimationTarget t, String ns, String ln, boolean isCSS) { short type = isCSS ? ANIM_TYPE_CSS : ANIM_TYPE_XML; Sandwich sandwich = getSandwich(t, type, ns, ln); sandwich.shouldUpdate = true; AbstractAnimation anim = sandwich.animation; while (anim.lowerAnimation != null) { anim = anim.lowerAnimation; } anim.markDirty(); } }
/** * Invoked to indicate that this timed element became inactive. * * @param anim the animation * @param isFrozen whether the element is frozen or not */ public void toInactive(AbstractAnimation anim, boolean isFrozen) { anim.isActive = false; anim.isFrozen = isFrozen; anim.markDirty(); if (!isFrozen) { anim.value = null; anim.beginTime = Float.NEGATIVE_INFINITY; moveToBottom(anim); } }
/** * Invoked to indicate that base value of the specified attribute * or property has changed. */ public void baseValueChanged(AnimationTarget t, String ns, String ln, boolean isCSS) { short type = isCSS ? ANIM_TYPE_CSS : ANIM_TYPE_XML; Sandwich sandwich = getSandwich(t, type, ns, ln); sandwich.shouldUpdate = true; AbstractAnimation anim = sandwich.animation; while (anim.lowerAnimation != null) { anim = anim.lowerAnimation; } anim.markDirty(); } }
/** * Invoked to indicate that this timed element became inactive. * * @param anim the animation * @param isFrozen whether the element is frozen or not */ public void toInactive(AbstractAnimation anim, boolean isFrozen) { anim.isActive = false; anim.isFrozen = isFrozen; anim.markDirty(); if (!isFrozen) { anim.value = null; anim.beginTime = Float.NEGATIVE_INFINITY; moveToBottom(anim); } }
/** * Invoked to indicate that base value of the specified attribute * or property has changed. */ public void baseValueChanged(AnimationTarget t, String ns, String ln, boolean isCSS) { short type = isCSS ? ANIM_TYPE_CSS : ANIM_TYPE_XML; Sandwich sandwich = getSandwich(t, type, ns, ln); sandwich.shouldUpdate = true; AbstractAnimation anim = sandwich.animation; while (anim.lowerAnimation != null) { anim = anim.lowerAnimation; } anim.markDirty(); } }
/** * Invoked to indicate an animation became active at the specified time. * * @param anim the animation * @param begin the time the element became active, in document simple time */ public void toActive(AbstractAnimation anim, float begin) { moveToTop(anim); anim.isActive = true; anim.beginTime = begin; anim.isFrozen = false; // Move the animation down, in case it began at the same time as another // animation in the sandwich and it's earlier in document order. pushDown(anim); anim.markDirty(); }
/** * Invoked to indicate an animation became active at the specified time. * * @param anim the animation * @param begin the time the element became active, in document simple time */ public void toActive(AbstractAnimation anim, float begin) { moveToTop(anim); anim.isActive = true; anim.beginTime = begin; anim.isFrozen = false; // Move the animation down, in case it began at the same time as another // animation in the sandwich and it's earlier in document order. pushDown(anim); anim.markDirty(); }
/** * Invoked to indicate an animation became active at the specified time. * * @param anim the animation * @param begin the time the element became active, in document simple time */ public void toActive(AbstractAnimation anim, float begin) { moveToTop(anim); anim.isActive = true; anim.beginTime = begin; anim.isFrozen = false; // Move the animation down, in case it began at the same time as another // animation in the sandwich and it's earlier in document order. pushDown(anim); anim.markDirty(); }
/** * Moves the given animation to the bottom of the sandwich. */ protected void moveToBottom(AbstractAnimation anim) { if (anim.lowerAnimation == null) { return; } AnimationInfo animInfo = getAnimationInfo(anim); Sandwich sandwich = getSandwich(animInfo.target, animInfo.type, animInfo.attributeNamespaceURI, animInfo.attributeLocalName); AbstractAnimation nextLower = anim.lowerAnimation; nextLower.markDirty(); anim.lowerAnimation.higherAnimation = anim.higherAnimation; if (anim.higherAnimation != null) { anim.higherAnimation.lowerAnimation = anim.lowerAnimation; } else { sandwich.animation = nextLower; sandwich.shouldUpdate = true; } sandwich.lowestAnimation.lowerAnimation = anim; anim.higherAnimation = sandwich.lowestAnimation; anim.lowerAnimation = null; sandwich.lowestAnimation = anim; if (sandwich.animation.isDirty) { sandwich.shouldUpdate = true; } }
/** * Moves the given animation to the bottom of the sandwich. */ protected void moveToBottom(AbstractAnimation anim) { if (anim.lowerAnimation == null) { return; } AnimationInfo animInfo = getAnimationInfo(anim); Sandwich sandwich = getSandwich(animInfo.target, animInfo.type, animInfo.attributeNamespaceURI, animInfo.attributeLocalName); AbstractAnimation nextLower = anim.lowerAnimation; nextLower.markDirty(); anim.lowerAnimation.higherAnimation = anim.higherAnimation; if (anim.higherAnimation != null) { anim.higherAnimation.lowerAnimation = anim.lowerAnimation; } else { sandwich.animation = nextLower; sandwich.shouldUpdate = true; } sandwich.lowestAnimation.lowerAnimation = anim; anim.higherAnimation = sandwich.lowestAnimation; anim.lowerAnimation = null; sandwich.lowestAnimation = anim; if (sandwich.animation.isDirty) { sandwich.shouldUpdate = true; } }
/** * Removes an animation from the document. */ public void removeAnimation(AbstractAnimation anim) { // org.apache.batik.anim.timing.Trace.enter(this, "removeAnimation", new Object[] { anim } ); try { timedDocumentRoot.removeChild(anim.getTimedElement()); AbstractAnimation nextHigher = anim.higherAnimation; if (nextHigher != null) { nextHigher.markDirty(); } moveToBottom(anim); if (anim.higherAnimation != null) { anim.higherAnimation.lowerAnimation = null; } AnimationInfo animInfo = getAnimationInfo(anim); Sandwich sandwich = getSandwich(animInfo.target, animInfo.type, animInfo.attributeNamespaceURI, animInfo.attributeLocalName); if (sandwich.animation == anim) { sandwich.animation = null; sandwich.lowestAnimation = null; sandwich.shouldUpdate = true; } // } finally { org.apache.batik.anim.timing.Trace.exit(); } }
/** * Removes an animation from the document. */ public void removeAnimation(AbstractAnimation anim) { // org.apache.batik.anim.timing.Trace.enter(this, "removeAnimation", new Object[] { anim } ); try { timedDocumentRoot.removeChild(anim.getTimedElement()); AbstractAnimation nextHigher = anim.higherAnimation; if (nextHigher != null) { nextHigher.markDirty(); } moveToBottom(anim); if (anim.higherAnimation != null) { anim.higherAnimation.lowerAnimation = null; } AnimationInfo animInfo = getAnimationInfo(anim); Sandwich sandwich = getSandwich(animInfo.target, animInfo.type, animInfo.attributeNamespaceURI, animInfo.attributeLocalName); if (sandwich.animation == anim) { sandwich.animation = null; sandwich.lowestAnimation = null; sandwich.shouldUpdate = true; } // } finally { org.apache.batik.anim.timing.Trace.exit(); } }
/** * Removes an animation from the document. */ public void removeAnimation(AbstractAnimation anim) { // org.apache.batik.anim.timing.Trace.enter(this, "removeAnimation", new Object[] { anim } ); try { timedDocumentRoot.removeChild(anim.getTimedElement()); AbstractAnimation nextHigher = anim.higherAnimation; if (nextHigher != null) { nextHigher.markDirty(); } moveToBottom(anim); if (anim.higherAnimation != null) { anim.higherAnimation.lowerAnimation = null; } AnimationInfo animInfo = getAnimationInfo(anim); Sandwich sandwich = getSandwich(animInfo.target, animInfo.type, animInfo.attributeNamespaceURI, animInfo.attributeLocalName); if (sandwich.animation == anim) { sandwich.animation = null; sandwich.lowestAnimation = null; sandwich.shouldUpdate = true; } // } finally { org.apache.batik.anim.timing.Trace.exit(); } }