Package org.apache.batik.anim.timing
Class TimeContainer
- java.lang.Object
-
- org.apache.batik.anim.timing.TimedElement
-
- org.apache.batik.anim.timing.TimeContainer
-
- All Implemented Interfaces:
SMILConstants
- Direct Known Subclasses:
TimedDocumentRoot
public abstract class TimeContainer extends TimedElement
An abstract base class for time container elements.- Version:
- $Id: TimeContainer.java 1804130 2017-08-04 14:41:11Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListchildrenThe childTimedElements of this time container.-
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, isSampling, 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 TimeContainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddChild(TimedElement e)Adds aTimedElementto this container.TimedElement[]getChildren()Returns an array of the children of this container.abstract floatgetDefaultBegin(TimedElement child)Returns the default begin time for the given child timed element.protected booleanisConstantAnimation()Returns whether this timed element is for a constant animation (i.e., a 'set' animation.voidremoveChild(TimedElement e)Removes aTimedElementfrom this container.protected voidreset(boolean clearCurrentBegin)Resets this element.protected floatsampleAt(float parentSimpleTime, boolean hyperlinking)Calculates the local simple time.protected floatsampleChildren(float parentSimpleTime, boolean hyperlinking)Samples all the child timed elements.protected voidsetRoot(TimedElement e, TimedDocumentRoot root)Recursively sets theTimedDocumentRootof the givenTimedElementand any of its descendants.-
Methods inherited from class org.apache.batik.anim.timing.TimedElement
addDependent, addInstanceTime, beginElement, beginElement, canBegin, canEnd, computeInterval, createException, deinitialize, endElement, endElement, endHasEventConditions, eventOccurred, fireTimeEvent, fireTimeEvent, formatMessage, getActiveDur, getActiveTime, getAnimationEventTarget, getBeginTimingSpecifiers, getCurrentBeginTime, getElement, getEndTimingSpecifiers, getEventTargetById, getHyperlinkBeginTime, getImplicitDur, getLastSampleTime, getLocale, getRoot, getRootEventTarget, getSimpleDur, getSimpleTime, getTimedElementById, initialize, instanceTimeChanged, isBefore, isUnresolved, maxTime, minTime, minusTime, multiplyTime, notifyNewInterval, notifyRemoveInterval, parseAttributes, parseBegin, parseClockValue, parseDur, parseEnd, parseFill, parseMax, parseMin, parseRepeatCount, parseRepeatDur, parseRestart, removeDependent, removeFill, removeInstanceTime, sampledAt, sampledLastValue, selectNewInterval, setLocale, toActive, toInactive, toString
-
-
-
-
Field Detail
-
children
protected java.util.List children
The childTimedElements of this time container.
-
-
Method Detail
-
addChild
public void addChild(TimedElement e)
Adds aTimedElementto this container.
-
setRoot
protected void setRoot(TimedElement e, TimedDocumentRoot root)
Recursively sets theTimedDocumentRootof the givenTimedElementand any of its descendants.
-
removeChild
public void removeChild(TimedElement e)
Removes aTimedElementfrom this container.
-
getChildren
public TimedElement[] getChildren()
Returns an array of the children of this container.
-
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 surpressed.- Overrides:
sampleAtin classTimedElement- 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.
-
sampleChildren
protected float sampleChildren(float parentSimpleTime, boolean hyperlinking)Samples all the child timed elements.
-
reset
protected void reset(boolean clearCurrentBegin)
Resets this element.- Overrides:
resetin classTimedElement
-
isConstantAnimation
protected boolean isConstantAnimation()
Returns whether this timed element is for a constant animation (i.e., a 'set' animation.- Specified by:
isConstantAnimationin classTimedElement
-
getDefaultBegin
public abstract float getDefaultBegin(TimedElement child)
Returns the default begin time for the given child timed element.
-
-