Package org.apache.batik.bridge
Class SVGAnimationEngine.AnimationRoot
- java.lang.Object
-
- org.apache.batik.anim.timing.TimedElement
-
- org.apache.batik.anim.timing.TimeContainer
-
- org.apache.batik.anim.timing.TimedDocumentRoot
-
- org.apache.batik.bridge.SVGAnimationEngine.AnimationRoot
-
- All Implemented Interfaces:
SMILConstants
- Enclosing class:
- SVGAnimationEngine
protected class SVGAnimationEngine.AnimationRoot extends TimedDocumentRoot
A class for the root time container.
-
-
Field Summary
-
Fields inherited from class org.apache.batik.anim.timing.TimedDocumentRoot
documentBeginTime, isHyperlinking, isSampling, listeners, propagationFlags, useSVG11AccessKeys, useSVG12AccessKeys
-
Fields inherited from class org.apache.batik.anim.timing.TimeContainer
children
-
Fields inherited from class org.apache.batik.anim.timing.TimedElement
beginDependents, beginInstanceTimes, beginTimes, currentInterval, currentRepeatIteration, durMedia, endDependents, endInstanceTimes, endTimes, FILL_FREEZE, FILL_REMOVE, fillMode, handledEvents, hasParsed, hasPropagated, INDEFINITE, isActive, isFrozen, lastIntervalEnd, lastRepeatTime, lastSampleTime, localizableSupport, max, maxMedia, min, minMedia, parent, previousInterval, repeatCount, repeatDur, repeatDuration, RESOURCES, RESTART_ALWAYS, RESTART_NEVER, RESTART_WHEN_NOT_ACTIVE, restartMode, root, shouldUpdateCurrentInterval, simpleDur, UNRESOLVED
-
Fields inherited from interface org.apache.batik.util.SMILConstants
SMIL_ACCUMULATE_ATTRIBUTE, SMIL_ADDITIVE_ATTRIBUTE, SMIL_ALWAYS_VALUE, SMIL_ANIMATE_COLOR_TAG, SMIL_ANIMATE_MOTION_TAG, SMIL_ANIMATE_TAG, SMIL_ATTRIBUTE_NAME_ATTRIBUTE, SMIL_ATTRIBUTE_TYPE_ATTRIBUTE, SMIL_AUTO_VALUE, SMIL_BEGIN_ATTRIBUTE, SMIL_BEGIN_DEFAULT_VALUE, SMIL_BEGIN_EVENT_NAME, SMIL_BY_ATTRIBUTE, SMIL_CALC_MODE_ATTRIBUTE, SMIL_CSS_VALUE, SMIL_DEFAULT_VALUE, SMIL_DISCRETE_VALUE, SMIL_DUR_ATTRIBUTE, SMIL_END_ATTRIBUTE, SMIL_END_EVENT_NAME, SMIL_FILL_ATTRIBUTE, SMIL_FREEZE_VALUE, SMIL_FROM_ATTRIBUTE, SMIL_HOLD_VALUE, SMIL_INDEFINITE_VALUE, SMIL_KEY_POINTS_ATTRIBUTE, SMIL_KEY_SPLINES_ATTRIBUTE, SMIL_KEY_TIMES_ATTRIBUTE, SMIL_LINEAR_VALUE, SMIL_MAX_ATTRIBUTE, SMIL_MEDIA_VALUE, SMIL_MIN_ATTRIBUTE, SMIL_NEVER_VALUE, SMIL_NONE_VALUE, SMIL_ORIGIN_ATTRIBUTE, SMIL_PACED_VALUE, SMIL_PATH_ATTRIBUTE, SMIL_REMOVE_VALUE, SMIL_REPEAT_COUNT_ATTRIBUTE, SMIL_REPEAT_DUR_ATTRIBUTE, SMIL_REPEAT_EVENT_ALT_NAME, SMIL_REPEAT_EVENT_NAME, SMIL_REPLACE_VALUE, SMIL_RESTART_ATTRIBUTE, SMIL_SET_TAG, SMIL_SPLINE_VALUE, SMIL_SUM_VALUE, SMIL_TO_ATTRIBUTE, SMIL_VALUES_ATTRIBUTE, SMIL_WHEN_NOT_ACTIVE_VALUE, SMIL_XML_VALUE
-
-
Constructor Summary
Constructors Constructor Description AnimationRoot()Creates a new AnimationRoot object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcurrentIntervalWillUpdate()Invoked by timed elements in this document to indicate that the current interval will be re-evaluated at the next sample.protected voidfireTimeEvent(java.lang.String eventType, java.util.Calendar time, int detail)Fires a TimeEvent of the given type on this element.protected org.w3c.dom.events.EventTargetgetAnimationEventTarget()Returns the target of this animation as anEventTarget.org.w3c.dom.ElementgetElement()Returns the DOM element that corresponds to this timed element, if such a DOM element exists.protected java.lang.StringgetEventNamespaceURI(java.lang.String eventName)Returns the namespace URI of the event that corresponds to the given animation event name.protected org.w3c.dom.events.EventTargetgetEventTargetById(java.lang.String id)Returns the event target with the given ID.protected java.lang.StringgetEventType(java.lang.String eventName)Returns the type of the event that corresponds to the given animation event name.protected java.lang.StringgetRepeatEventName()Returns the name of the repeat event.protected org.w3c.dom.events.EventTargetgetRootEventTarget()Returns the event target that should be listened to for access key events.protected TimedElementgetTimedElementById(java.lang.String id)Returns the timed element with the given ID.booleanisBefore(TimedElement other)Returns whether this timed element comes before the given timed element in document order.protected voidremoveFill()Invoked to indicate that this timed element has had its fill removed.protected voidsampledAt(float simpleTime, float simpleDur, int repeatIteration)Invoked to indicate that this timed element has been sampled at the given time.protected voidsampledLastValue(int repeatIteration)Invoked to indicate that this timed element has been sampled at the end of its active time, at an integer multiple of the simple duration.protected voidtoActive(float begin)Invoked to indicate this timed element became active at the specified time.protected voidtoInactive(boolean stillActive, boolean isFrozen)Invoked to indicate that this timed element became inactive.-
Methods inherited from class org.apache.batik.anim.timing.TimedDocumentRoot
addTimegraphListener, convertEpochTime, convertWallclockTime, getCurrentTime, getDefaultBegin, getDocumentBeginTime, getImplicitDur, isHyperlinking, isSampling, removeTimegraphListener, resetDocument, seekTo
-
Methods inherited from class org.apache.batik.anim.timing.TimeContainer
addChild, getChildren, isConstantAnimation, removeChild, reset, sampleAt, sampleChildren, setRoot
-
Methods inherited from class org.apache.batik.anim.timing.TimedElement
addDependent, addInstanceTime, beginElement, beginElement, canBegin, canEnd, computeInterval, createException, deinitialize, endElement, endElement, endHasEventConditions, fireTimeEvent, formatMessage, getActiveDur, getActiveTime, getBeginTimingSpecifiers, getCurrentBeginTime, getEndTimingSpecifiers, getHyperlinkBeginTime, getLastSampleTime, getLocale, getRoot, getSimpleDur, getSimpleTime, initialize, instanceTimeChanged, isUnresolved, maxTime, minTime, minusTime, multiplyTime, notifyNewInterval, notifyRemoveInterval, parseAttributes, parseBegin, parseClockValue, parseDur, parseEnd, parseFill, parseMax, parseMin, parseRepeatCount, parseRepeatDur, parseRestart, removeDependent, removeInstanceTime, selectNewInterval, setLocale, toString
-
-
-
-
Method Detail
-
getEventNamespaceURI
protected java.lang.String getEventNamespaceURI(java.lang.String eventName)
Returns the namespace URI of the event that corresponds to the given animation event name.- Specified by:
getEventNamespaceURIin classTimedDocumentRoot
-
getEventType
protected java.lang.String getEventType(java.lang.String eventName)
Returns the type of the event that corresponds to the given animation event name.- Specified by:
getEventTypein classTimedDocumentRoot
-
getRepeatEventName
protected java.lang.String getRepeatEventName()
Returns the name of the repeat event.- Specified by:
getRepeatEventNamein classTimedDocumentRoot- Returns:
- "repeatEvent" for SVG
-
fireTimeEvent
protected void fireTimeEvent(java.lang.String eventType, java.util.Calendar time, int detail)Fires a TimeEvent of the given type on this element.- Specified by:
fireTimeEventin classTimedElement- Parameters:
eventType- the type of TimeEvent ("beginEvent", "endEvent" or "repeatEvent"/"repeat").time- the timestamp of the event object
-
toActive
protected void toActive(float begin)
Invoked to indicate this timed element became active at the specified time.- Specified by:
toActivein classTimedElement- Parameters:
begin- the time the element became active, in document simple time
-
toInactive
protected void toInactive(boolean stillActive, boolean isFrozen)Invoked to indicate that this timed element became inactive.- Specified by:
toInactivein classTimedElement- Parameters:
stillActive- if true, indicates that the element is still actually active, but between the end of the computed repeat duration and the end of the intervalisFrozen- whether the element is frozen or not
-
removeFill
protected void removeFill()
Invoked to indicate that this timed element has had its fill removed.- Specified by:
removeFillin classTimedElement
-
sampledAt
protected void sampledAt(float simpleTime, float simpleDur, int repeatIteration)Invoked to indicate that this timed element has been sampled at the given time.- Specified by:
sampledAtin classTimedElement- Parameters:
simpleTime- the sample time in local simple timesimpleDur- the simple duration of the elementrepeatIteration- the repeat iteration during which the element was sampled
-
sampledLastValue
protected void sampledLastValue(int repeatIteration)
Invoked to indicate that this timed element has been sampled at the end of its active time, at an integer multiple of the simple duration. This is the "last" value that will be used for filling, which cannot be sampled normally.- Specified by:
sampledLastValuein classTimedElement
-
getTimedElementById
protected TimedElement getTimedElementById(java.lang.String id)
Returns the timed element with the given ID.- Specified by:
getTimedElementByIdin classTimedElement
-
getEventTargetById
protected org.w3c.dom.events.EventTarget getEventTargetById(java.lang.String id)
Returns the event target with the given ID.- Specified by:
getEventTargetByIdin classTimedElement
-
getAnimationEventTarget
protected org.w3c.dom.events.EventTarget getAnimationEventTarget()
Returns the target of this animation as anEventTarget. Used for eventbase timing specifiers where the element ID is omitted.- Specified by:
getAnimationEventTargetin classTimedElement
-
getRootEventTarget
protected org.w3c.dom.events.EventTarget getRootEventTarget()
Returns the event target that should be listened to for access key events.- Specified by:
getRootEventTargetin classTimedElement
-
getElement
public org.w3c.dom.Element getElement()
Returns the DOM element that corresponds to this timed element, if such a DOM element exists.- Specified by:
getElementin classTimedElement
-
isBefore
public boolean isBefore(TimedElement other)
Returns whether this timed element comes before the given timed element in document order.- Specified by:
isBeforein classTimedElement
-
currentIntervalWillUpdate
protected void currentIntervalWillUpdate()
Invoked by timed elements in this document to indicate that the current interval will be re-evaluated at the next sample.- Overrides:
currentIntervalWillUpdatein classTimedDocumentRoot
-
-