## 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.

Field Summary
`protected java.util.List` `children` The child `TimedElement`s 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
`TimeContainer()`

Method Summary
`void` `addChild(TimedElement e)` Adds a `TimedElement` to this container.
`TimedElement[]` `getChildren()` Returns an array of the children of this container.
`abstract float` `getDefaultBegin(TimedElement child)` Returns the default begin time for the given child timed element.
`protected boolean` `isConstantAnimation()` Returns whether this timed element is for a constant animation (i.e., a 'set' animation.
`void` `removeChild(TimedElement e)` Removes a `TimedElement` from this container.
`protected void` `reset(boolean clearCurrentBegin)` Resets this element.
`protected float` `sampleAt(float parentSimpleTime, boolean hyperlinking)` Calculates the local simple time.
`protected float` `sampleChildren(float parentSimpleTime, boolean hyperlinking)` Samples all the child timed elements.
`protected void` `setRoot(TimedElement e, TimedDocumentRoot root)` Recursively sets the `TimedDocumentRoot` of the given `TimedElement` and 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, fireTimeEvent, fireTimeEvent, formatMessage, getActiveDur, getActiveTime, getAnimationEventTarget, getCurrentBeginTime, getElement, 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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### children

    protected java.util.List children

  The child `TimedElement`s of this time container.

Constructor Detail

### TimeContainer

    public TimeContainer()

Method Detail

### addChild

    public void addChild(TimedElement e)

  Adds a `TimedElement` to this container.

### setRoot

    protected void setRoot(TimedElement e,
                           TimedDocumentRoot root)

  Recursively sets the `TimedDocumentRoot` of the given `TimedElement` and any of its descendants.

### removeChild

    public void removeChild(TimedElement e)

  Removes a `TimedElement` from 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:
    `sampleAt` in class `TimedElement`
  Returns:
    the number of seconds until this element becomes active again if it currently is not, `Float.POSITIVE_INFINITY` if 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, or `0f` if 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:
    `reset` in class `TimedElement`

### isConstantAnimation

    protected boolean isConstantAnimation()

  Returns whether this timed element is for a constant animation (i.e., a 'set' animation.

  Specified by:
    `isConstantAnimation` in class `TimedElement`

### getDefaultBegin

    public abstract float getDefaultBegin(TimedElement child)

  Returns the default begin time for the given child timed element.

Copyright © 2008 Apache Software Foundation. All Rights Reserved.