FileDocCategorySizeDatePackage
ElementSequentialTimeContainerImpl.javaAPI DocAndroid 1.5 API2334Wed May 06 22:42:46 BST 2009com.android.mms.dom.smil

ElementSequentialTimeContainerImpl

public abstract class ElementSequentialTimeContainerImpl extends ElementTimeContainerImpl implements org.w3c.dom.smil.ElementSequentialTimeContainer

Fields Summary
Constructors Summary
ElementSequentialTimeContainerImpl(org.w3c.dom.smil.SMILElement element)

        super(element);
    
Methods Summary
public org.w3c.dom.NodeListgetActiveChildrenAt(float instant)

        NodeList allChildren = this.getTimeChildren();
        ArrayList<Node> nodes = new ArrayList<Node>();
        for (int i = 0; i < allChildren.getLength(); i++) {
            instant -= ((ElementTime) allChildren.item(i)).getDur();
            if (instant < 0) {
                nodes.add(allChildren.item(i));
                return new NodeListImpl(nodes);
            }
        }
        return new NodeListImpl(nodes);
    
public floatgetDur()

        float dur = super.getDur();
        if (dur == 0) {
            NodeList children = getTimeChildren();
            for (int i = 0; i < children.getLength(); ++i) {
                ElementTime child = (ElementTime) children.item(i);
                if (child.getDur() < 0) {
                    // Return "indefinite" since containing a child whose duration is indefinite.
                    return -1.0F;
                }
                dur += child.getDur();
            }
        }
        return dur;