org.apache.batik.anim.timing

Class TimeContainer

public abstract class TimeContainer extends TimedElement

An abstract base class for time container elements.
Field Summary
protected Listchildren
The child {@link TimedElement}s of this time container.
Method Summary
voidaddChild(TimedElement e)
Adds a {@link TimedElement} to 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 a {@link TimedElement} from 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 the {@link TimedDocumentRoot} of the given {@link TimedElement} and any of its descendants.

Field Detail

children

protected List children
The child {@link TimedElement}s of this time container.

Method Detail

addChild

public void addChild(TimedElement e)
Adds a {@link TimedElement} to this container.

getChildren

public TimedElement[] getChildren()
Returns an array of the children of this container.

getDefaultBegin

public abstract float getDefaultBegin(TimedElement child)
Returns the default begin time for the given child timed element.

isConstantAnimation

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

removeChild

public void removeChild(TimedElement e)
Removes a {@link TimedElement} from this container.

reset

protected void reset(boolean clearCurrentBegin)
Resets this element.

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.

Returns: the number of seconds until this element becomes active again if it currently is not, {@link 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.

setRoot

protected void setRoot(TimedElement e, TimedDocumentRoot root)
Recursively sets the {@link TimedDocumentRoot} of the given {@link TimedElement} and any of its descendants.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.