Package org.apache.batik.anim.timing
Class TimedElement
- java.lang.Object
-
- org.apache.batik.anim.timing.TimedElement
-
- All Implemented Interfaces:
SMILConstants
- Direct Known Subclasses:
SVGAnimationElementBridge.SVGTimedElement,TimeContainer
public abstract class TimedElement extends java.lang.Object implements SMILConstants
An abstract base class for elements that can have timing applied to them. The concrete versions of this class do not necessarily have to be the same as the DOM class, and in fact, this will mostly be impossible unless creating new DOM classes that inherit from these elements.- Version:
- $Id: TimedElement.java 1831630 2018-05-15 12:56:55Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.LinkedListbeginDependentsList of TimingSpecifiers on other elements that depend on this element's begin times.protected java.util.ListbeginInstanceTimesList of begin InstanceTimes.protected TimingSpecifier[]beginTimesTiming specifiers for the begin times of this element.protected IntervalcurrentIntervalThe current Interval.protected intcurrentRepeatIterationThe current repeat iteration.protected booleandurMediaWhether the simple duration of this element should be equal to the implicit duration.protected java.util.LinkedListendDependentsList of TimingSpecifiers on other elements that depend on this element's end times.protected java.util.ListendInstanceTimesList of end InstanceTimes.protected TimingSpecifier[]endTimesTiming specifiers for the end times of this element.static intFILL_FREEZEstatic intFILL_REMOVEprotected intfillModeThe fill mode for this element.protected java.util.MaphandledEventsprotected booleanhasParsedWhether this timed element has parsed its timing attributes yet.protected booleanhasPropagatedWhether an instance time update message has already been propagated to this timed element.static floatINDEFINITEprotected booleanisActiveWhether the element is currently active.protected booleanisFrozenWhether the element is currently frozen.protected booleanisSamplingWhether this timed element is currently being sampled.protected floatlastIntervalEndThe end time of the previous interval, initiallyFloat.NEGATIVE_INFINITY.protected floatlastRepeatTimeThe local active time of the last repeat.protected floatlastSampleTimeThe current time of this element in local active time.protected static LocalizableSupportlocalizableSupportThe localizable support for the error messages.protected floatmaxThe maximum active duration of this element.protected booleanmaxMediaWhether the max value was specified as 'media'.protected floatminThe minimum active duration of this element.protected booleanminMediaWhether the min value was specified as 'media'.protected TimeContainerparentThe parent time container.protected IntervalpreviousIntervalThe previous interval.protected floatrepeatCountThe number of repeats.protected floatrepeatDurThe duration of repeats.protected floatrepeatDurationThe computed repeat duration of the element.protected static java.lang.StringRESOURCESThe error messages bundle class name.static intRESTART_ALWAYSstatic intRESTART_NEVERstatic intRESTART_WHEN_NOT_ACTIVEprotected intrestartModeThe restart mode for this element.protected TimedDocumentRootrootThe root time container.protected booleanshouldUpdateCurrentIntervalWhether the list of instance times should be checked to update the current interval.protected floatsimpleDurDuration of this element, ifdurMedia= false.static floatUNRESOLVED-
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 TimedElement()Creates a new TimedElement.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDependent(TimingSpecifier dependent, boolean forBegin)Adds a dependent TimingSpecifier for this element.protected floataddInstanceTime(InstanceTime time, boolean isBegin)Called by a TimingSpecifier of this element when a new InstanceTime is created.voidbeginElement()Adds a time to the begin time instance list that will cause the element to begin immediately (if restart semantics allow it).voidbeginElement(float offset)Adds a time to the begin time instance list that will cause the element to begin at some offset to the current time (if restart semantics allow it).booleancanBegin()Returns whether this element can be begun or restarted currently.booleancanEnd()Returns whether this element can be ended currently.protected IntervalcomputeInterval(boolean first, boolean fixedBegin, float beginAfter, boolean incl)Computes an interval from the begin and end instance time lists.AnimationExceptioncreateException(java.lang.String code, java.lang.Object[] params)Creates and returns a newAnimationException.voiddeinitialize()Deinitializes this timed element.voidendElement()Adds a time to the end time instance list that will cause the element to end immediately (if restart semantics allow it).voidendElement(float offset)Adds a time to the end time instance list that will cause the element to end at some offset to the current time (if restart semantics allow it).protected booleanendHasEventConditions()Returns whether the end timing specifier list contains any eventbase, accesskey or repeat timing specifiers.(package private) voideventOccurred(TimingSpecifier t, org.w3c.dom.events.Event e)Invoked by aTimingSpecifierto indicate that an event occurred that would create a new instance time for this timed element.protected voidfireTimeEvent(java.lang.String eventType, float time, int detail)Fires a TimeEvent of the given type on this element.protected abstract voidfireTimeEvent(java.lang.String eventType, java.util.Calendar time, int detail)Fires a TimeEvent of the given type on this element.static java.lang.StringformatMessage(java.lang.String key, java.lang.Object[] args)ImplementsLocalizable.formatMessage(String,Object[]).floatgetActiveDur(float B, float end)Returns the active duration time of this element.floatgetActiveTime()Returns the current active time of this element.protected abstract org.w3c.dom.events.EventTargetgetAnimationEventTarget()Returns the target of this animation as anEventTarget.TimingSpecifier[]getBeginTimingSpecifiers()Returns an array of the begin timing specifiers on this timed element.floatgetCurrentBeginTime()Returns the begin time of the current interval, in parent simple time, orFloat.NaNif the element is not active.abstract org.w3c.dom.ElementgetElement()Returns the DOM element that corresponds to this timed element, if such a DOM element exists.TimingSpecifier[]getEndTimingSpecifiers()Returns an array of the end timing specifiers on this timed element.protected abstract org.w3c.dom.events.EventTargetgetEventTargetById(java.lang.String id)Returns the event target with the given ID.floatgetHyperlinkBeginTime()Returns the time that the document would seek to if this animation element were hyperlinked to, orNaNif there is no such begin time.protected floatgetImplicitDur()Returns the implicit duration of the element.floatgetLastSampleTime()Returns the last sample time of this element, in local active time.static java.util.LocalegetLocale()ImplementsLocalizable.getLocale().TimedDocumentRootgetRoot()Returns the root time container of this timed element.protected abstract org.w3c.dom.events.EventTargetgetRootEventTarget()Returns the event target that should be listened to for access key events.floatgetSimpleDur()Returns the simple duration time of this element.floatgetSimpleTime()Returns the current simple time of this element.protected abstract TimedElementgetTimedElementById(java.lang.String id)Returns the timed element with the given ID.voidinitialize()Initializes this timed element.protected floatinstanceTimeChanged(InstanceTime time, boolean isBegin)Called by a TimingSpecifier of this element when an InstanceTime has been updated.abstract booleanisBefore(TimedElement other)Returns whether this timed element comes before the given timed element in document order.protected abstract booleanisConstantAnimation()Returns whether this timed element is for a constant animation (i.e., a 'set' animation.static booleanisUnresolved(float t)Returns whether the given time value is equal to theUNRESOLVEDvalue.protected floatmaxTime(float t1, float t2)Returns the maximum of two time values.protected floatminTime(float t1, float t2)Returns the minimum of two time values.protected floatminusTime(float t1, float t2)Subtracts one simple time from another.protected floatmultiplyTime(float t, float n)Multiplies one simple time by n.protected floatnotifyNewInterval(Interval interval)Notifies dependents of a new interval.protected floatnotifyRemoveInterval(Interval interval)Notifies dependents of a removed interval.voidparseAttributes(java.lang.String begin, java.lang.String dur, java.lang.String end, java.lang.String min, java.lang.String max, java.lang.String repeatCount, java.lang.String repeatDur, java.lang.String fill, java.lang.String restart)Parses the animation attributes for this timed element.protected voidparseBegin(java.lang.String begin)Parses a new 'begin' attribute.protected floatparseClockValue(java.lang.String s, boolean parseOffset)Parses a clock value or offset and returns it as a float.protected voidparseDur(java.lang.String dur)Parses a new 'dur' attribute.protected voidparseEnd(java.lang.String end)Parses a new 'end' attribute.protected voidparseFill(java.lang.String fill)Parses a new 'fill' attribute.protected voidparseMax(java.lang.String max)Parses a new 'max' attribute.protected voidparseMin(java.lang.String min)Parses a new 'min' attribute.protected voidparseRepeatCount(java.lang.String repeatCount)Parses a new 'repeatCount' attribute.protected voidparseRepeatDur(java.lang.String repeatDur)Parses a new 'repeatDur' attribute.protected voidparseRestart(java.lang.String restart)Parses a new 'restart' attribute.protected voidremoveDependent(TimingSpecifier dependent, boolean forBegin)Removes a dependent TimingSpecifier for this element.protected abstract voidremoveFill()Invoked to indicate that this timed element has had its fill removed.protected floatremoveInstanceTime(InstanceTime time, boolean isBegin)Called by a TimingSpecifier of this element when an InstanceTime should be removed.protected voidreset(boolean clearCurrentBegin)Resets this element.protected floatsampleAt(float parentSimpleTime, boolean hyperlinking)Calculates the local simple time.protected abstract voidsampledAt(float simpleTime, float simpleDur, int repeatIteration)Invoked to indicate that this timed element has been sampled at the given time.protected abstract 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 floatselectNewInterval(float time, Interval interval)Sets the current interval to the one specified.static voidsetLocale(java.util.Locale l)ImplementsLocalizable.setLocale(java.util.Locale).protected abstract voidtoActive(float begin)Invoked to indicate this timed element became active at the specified time.protected abstract voidtoInactive(boolean stillActive, boolean isFrozen)Invoked to indicate that this timed element became inactive.static java.lang.StringtoString(float time)Returns a string representation of the given time value.
-
-
-
Field Detail
-
FILL_REMOVE
public static final int FILL_REMOVE
- See Also:
- Constant Field Values
-
FILL_FREEZE
public static final int FILL_FREEZE
- See Also:
- Constant Field Values
-
RESTART_ALWAYS
public static final int RESTART_ALWAYS
- See Also:
- Constant Field Values
-
RESTART_WHEN_NOT_ACTIVE
public static final int RESTART_WHEN_NOT_ACTIVE
- See Also:
- Constant Field Values
-
RESTART_NEVER
public static final int RESTART_NEVER
- See Also:
- Constant Field Values
-
INDEFINITE
public static final float INDEFINITE
- See Also:
- Constant Field Values
-
UNRESOLVED
public static final float UNRESOLVED
- See Also:
- Constant Field Values
-
root
protected TimedDocumentRoot root
The root time container.
-
parent
protected TimeContainer parent
The parent time container.
-
beginTimes
protected TimingSpecifier[] beginTimes
Timing specifiers for the begin times of this element.
-
endTimes
protected TimingSpecifier[] endTimes
Timing specifiers for the end times of this element.
-
simpleDur
protected float simpleDur
-
durMedia
protected boolean durMedia
Whether the simple duration of this element should be equal to the implicit duration.
-
repeatCount
protected float repeatCount
The number of repeats. If unspecified, it will beUNRESOLVED.
-
repeatDur
protected float repeatDur
The duration of repeats. If unspecified, it will beUNRESOLVED.
-
currentRepeatIteration
protected int currentRepeatIteration
The current repeat iteration.
-
lastRepeatTime
protected float lastRepeatTime
The local active time of the last repeat.
-
fillMode
protected int fillMode
The fill mode for this element. Uses the FILL_* constants defined in this class.
-
restartMode
protected int restartMode
The restart mode for this element. Uses the RESTART_* constants defined in this class.
-
min
protected float min
-
minMedia
protected boolean minMedia
Whether the min value was specified as 'media'.
-
max
protected float max
-
maxMedia
protected boolean maxMedia
Whether the max value was specified as 'media'.
-
isActive
protected boolean isActive
Whether the element is currently active.
-
isFrozen
protected boolean isFrozen
Whether the element is currently frozen.
-
lastSampleTime
protected float lastSampleTime
The current time of this element in local active time.
-
repeatDuration
protected float repeatDuration
The computed repeat duration of the element.
-
beginInstanceTimes
protected java.util.List beginInstanceTimes
List of begin InstanceTimes.
-
endInstanceTimes
protected java.util.List endInstanceTimes
List of end InstanceTimes.
-
currentInterval
protected Interval currentInterval
The current Interval.
-
lastIntervalEnd
protected float lastIntervalEnd
The end time of the previous interval, initiallyFloat.NEGATIVE_INFINITY.
-
previousInterval
protected Interval previousInterval
The previous interval.
-
beginDependents
protected java.util.LinkedList beginDependents
List of TimingSpecifiers on other elements that depend on this element's begin times.
-
endDependents
protected java.util.LinkedList endDependents
List of TimingSpecifiers on other elements that depend on this element's end times.
-
shouldUpdateCurrentInterval
protected boolean shouldUpdateCurrentInterval
Whether the list of instance times should be checked to update the current interval.
-
hasParsed
protected boolean hasParsed
Whether this timed element has parsed its timing attributes yet.
-
handledEvents
protected java.util.Map handledEvents
-
isSampling
protected boolean isSampling
Whether this timed element is currently being sampled.
-
hasPropagated
protected boolean hasPropagated
Whether an instance time update message has already been propagated to this timed element.
-
RESOURCES
protected static final java.lang.String RESOURCES
The error messages bundle class name.- See Also:
- Constant Field Values
-
localizableSupport
protected static LocalizableSupport localizableSupport
The localizable support for the error messages.
-
-
Method Detail
-
getRoot
public TimedDocumentRoot getRoot()
Returns the root time container of this timed element.
-
getActiveTime
public float getActiveTime()
Returns the current active time of this element.
-
getSimpleTime
public float getSimpleTime()
Returns the current simple time of this element.
-
addInstanceTime
protected float addInstanceTime(InstanceTime time, boolean isBegin)
Called by a TimingSpecifier of this element when a new InstanceTime is created. This will be in response to an event firing, a DOM method being called or a new Instance being created by a syncbase element.
-
removeInstanceTime
protected float removeInstanceTime(InstanceTime time, boolean isBegin)
Called by a TimingSpecifier of this element when an InstanceTime should be removed. This will be in response to the pruning of an Interval.
-
instanceTimeChanged
protected float instanceTimeChanged(InstanceTime time, boolean isBegin)
Called by a TimingSpecifier of this element when an InstanceTime has been updated. This will be in response to a dependent syncbase change.
-
addDependent
protected void addDependent(TimingSpecifier dependent, boolean forBegin)
Adds a dependent TimingSpecifier for this element.
-
removeDependent
protected void removeDependent(TimingSpecifier dependent, boolean forBegin)
Removes a dependent TimingSpecifier for this element.
-
getSimpleDur
public float getSimpleDur()
Returns the simple duration time of this element.
-
isUnresolved
public static boolean isUnresolved(float t)
Returns whether the given time value is equal to theUNRESOLVEDvalue.
-
getActiveDur
public float getActiveDur(float B, float end)Returns the active duration time of this element.
-
minusTime
protected float minusTime(float t1, float t2)Subtracts one simple time from another.
-
multiplyTime
protected float multiplyTime(float t, float n)Multiplies one simple time by n.
-
minTime
protected float minTime(float t1, float t2)Returns the minimum of two time values.
-
maxTime
protected float maxTime(float t1, float t2)Returns the maximum of two time values.
-
getImplicitDur
protected float getImplicitDur()
Returns the implicit duration of the element. Currently, nested time containers are not supported by SVG so this just returnsUNRESOLVEDby default. This should be overriden in derived classes that play media, since they will have an implicit duration.
-
notifyNewInterval
protected float notifyNewInterval(Interval interval)
Notifies dependents of a new interval.
-
notifyRemoveInterval
protected float notifyRemoveInterval(Interval interval)
Notifies dependents of a removed interval.
-
sampleAt
protected float sampleAt(float parentSimpleTime, boolean hyperlinking)Calculates the local simple time. Currently the hyperlinking parameter is ignored, so DOM timing events are fired during hyperlinking seeks. If we were following SMIL 2.1 rather than SMIL Animation, then these events would have to be suppressed.- Returns:
- the number of seconds until this element becomes active again
if it currently is not,
Float.POSITIVE_INFINITYif this element will become active at some undetermined point in the future (because of unresolved begin times, for example) or will never become active again, or0fif the element is currently active.
-
endHasEventConditions
protected boolean endHasEventConditions()
Returns whether the end timing specifier list contains any eventbase, accesskey or repeat timing specifiers.
-
selectNewInterval
protected float selectNewInterval(float time, Interval interval)Sets the current interval to the one specified. This will notify dependents and fire the 'begin' and any necessary 'repeat' events.- Parameters:
time- the current sampling timeinterval- the Interval object to select to be current- Returns:
- the minimum time the animation engine can safely wait, as determined by dependents of the interval
-
computeInterval
protected Interval computeInterval(boolean first, boolean fixedBegin, float beginAfter, boolean incl)
Computes an interval from the begin and end instance time lists.- Parameters:
first- indicates whether this is the first interval to computefixedBegin- if true, specifies that the value given forbeginAfteris taken to be the actual begin time for the interval; only the end value is computed.beginAfter- the earliest possible begin time for the computed interval.incl- if true (and!fixedBegin), specifies that the new interval's begin time must be greater thanbeginAfter; otherwise, the begin time must be greater than or equal tobeginAfter.
-
reset
protected void reset(boolean clearCurrentBegin)
Resets this element.
-
parseAttributes
public void parseAttributes(java.lang.String begin, java.lang.String dur, java.lang.String end, java.lang.String min, java.lang.String max, java.lang.String repeatCount, java.lang.String repeatDur, java.lang.String fill, java.lang.String restart)Parses the animation attributes for this timed element.
-
parseBegin
protected void parseBegin(java.lang.String begin)
Parses a new 'begin' attribute.
-
parseDur
protected void parseDur(java.lang.String dur)
Parses a new 'dur' attribute.
-
parseClockValue
protected float parseClockValue(java.lang.String s, boolean parseOffset) throws ParseExceptionParses a clock value or offset and returns it as a float.- Throws:
ParseException
-
parseEnd
protected void parseEnd(java.lang.String end)
Parses a new 'end' attribute.
-
parseMin
protected void parseMin(java.lang.String min)
Parses a new 'min' attribute.
-
parseMax
protected void parseMax(java.lang.String max)
Parses a new 'max' attribute.
-
parseRepeatCount
protected void parseRepeatCount(java.lang.String repeatCount)
Parses a new 'repeatCount' attribute.
-
parseRepeatDur
protected void parseRepeatDur(java.lang.String repeatDur)
Parses a new 'repeatDur' attribute.
-
parseFill
protected void parseFill(java.lang.String fill)
Parses a new 'fill' attribute.
-
parseRestart
protected void parseRestart(java.lang.String restart)
Parses a new 'restart' attribute.
-
initialize
public void initialize()
Initializes this timed element.
-
deinitialize
public void deinitialize()
Deinitializes this timed element.
-
beginElement
public void beginElement()
Adds a time to the begin time instance list that will cause the element to begin immediately (if restart semantics allow it).
-
beginElement
public void beginElement(float offset)
Adds a time to the begin time instance list that will cause the element to begin at some offset to the current time (if restart semantics allow it).
-
endElement
public void endElement()
Adds a time to the end time instance list that will cause the element to end immediately (if restart semantics allow it).
-
endElement
public void endElement(float offset)
Adds a time to the end time instance list that will cause the element to end at some offset to the current time (if restart semantics allow it).
-
getLastSampleTime
public float getLastSampleTime()
Returns the last sample time of this element, in local active time.
-
getCurrentBeginTime
public float getCurrentBeginTime()
Returns the begin time of the current interval, in parent simple time, orFloat.NaNif the element is not active.
-
canBegin
public boolean canBegin()
Returns whether this element can be begun or restarted currently.
-
canEnd
public boolean canEnd()
Returns whether this element can be ended currently.
-
getHyperlinkBeginTime
public float getHyperlinkBeginTime()
Returns the time that the document would seek to if this animation element were hyperlinked to, orNaNif there is no such begin time.
-
getBeginTimingSpecifiers
public TimingSpecifier[] getBeginTimingSpecifiers()
Returns an array of the begin timing specifiers on this timed element. XXX Note that this is an experimental public API and is subject to change, when somebody gets around to thinking of a better model for exposing animation information from the document.
-
getEndTimingSpecifiers
public TimingSpecifier[] getEndTimingSpecifiers()
Returns an array of the end timing specifiers on this timed element. XXX Note that this is an experimental public API and is subject to change, when somebody gets around to thinking of a better model for exposing animation information from the document.
-
fireTimeEvent
protected void fireTimeEvent(java.lang.String eventType, float time, int detail)Fires a TimeEvent of the given type on this element.- Parameters:
eventType- the type of TimeEvent ("beginEvent", "endEvent" or "repeatEvent").time- the timestamp of the event objectdetail- the repeat iteration, if this event is a repeat event
-
eventOccurred
void eventOccurred(TimingSpecifier t, org.w3c.dom.events.Event e)
Invoked by aTimingSpecifierto indicate that an event occurred that would create a new instance time for this timed element. These will be processed at the beginning of the next tick.
-
fireTimeEvent
protected abstract void fireTimeEvent(java.lang.String eventType, java.util.Calendar time, int detail)Fires a TimeEvent of the given type on this element.- Parameters:
eventType- the type of TimeEvent ("beginEvent", "endEvent" or "repeatEvent").time- the timestamp of the event object
-
toActive
protected abstract void toActive(float begin)
Invoked to indicate this timed element became active at the specified time.- Parameters:
begin- the time the element became active, in document simple time
-
toInactive
protected abstract void toInactive(boolean stillActive, boolean isFrozen)Invoked to indicate that this timed element became inactive.- 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 abstract void removeFill()
Invoked to indicate that this timed element has had its fill removed.
-
sampledAt
protected abstract void sampledAt(float simpleTime, float simpleDur, int repeatIteration)Invoked to indicate that this timed element has been sampled at the given time.- 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 abstract 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.
-
getTimedElementById
protected abstract TimedElement getTimedElementById(java.lang.String id)
Returns the timed element with the given ID.
-
getEventTargetById
protected abstract org.w3c.dom.events.EventTarget getEventTargetById(java.lang.String id)
Returns the event target with the given ID.
-
getRootEventTarget
protected abstract org.w3c.dom.events.EventTarget getRootEventTarget()
Returns the event target that should be listened to for access key events.
-
getElement
public abstract org.w3c.dom.Element getElement()
Returns the DOM element that corresponds to this timed element, if such a DOM element exists.
-
getAnimationEventTarget
protected abstract 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.
-
isBefore
public abstract boolean isBefore(TimedElement other)
Returns whether this timed element comes before the given timed element in document order.
-
isConstantAnimation
protected abstract boolean isConstantAnimation()
Returns whether this timed element is for a constant animation (i.e., a 'set' animation.
-
createException
public AnimationException createException(java.lang.String code, java.lang.Object[] params)
Creates and returns a newAnimationException.
-
setLocale
public static void setLocale(java.util.Locale l)
ImplementsLocalizable.setLocale(java.util.Locale).
-
getLocale
public static java.util.Locale getLocale()
ImplementsLocalizable.getLocale().
-
formatMessage
public static java.lang.String formatMessage(java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceExceptionImplementsLocalizable.formatMessage(String,Object[]).- Throws:
java.util.MissingResourceException
-
toString
public static java.lang.String toString(float time)
Returns a string representation of the given time value.
-
-