Class TimedDocumentRoot

  • All Implemented Interfaces:
    SMILConstants
    Direct Known Subclasses:
    SVGAnimationEngine.AnimationRoot

    public abstract class TimedDocumentRoot
    extends TimeContainer
    An abstract base class for the root time container element for a document.
    Version:
    $Id: TimedDocumentRoot.java 1804130 2017-08-04 14:41:11Z ssteiner $
    • Field Detail

      • documentBeginTime

        protected java.util.Calendar documentBeginTime
        The wallclock time that the document began.
      • useSVG11AccessKeys

        protected boolean useSVG11AccessKeys
        Allows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1.
      • useSVG12AccessKeys

        protected boolean useSVG12AccessKeys
        Allows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.
      • propagationFlags

        protected DoublyIndexedSet propagationFlags
        A set to determine when propagation of new Instance times should be stopped.
      • listeners

        protected java.util.LinkedList listeners
        List of {link TimegraphListener}s to be notified of changes to the timed elements in this document.
      • isSampling

        protected boolean isSampling
        Whether the document is currently being sampled.
      • isHyperlinking

        protected boolean isHyperlinking
        Whether the document is currently being sampled for a hyperlink.
    • Constructor Detail

      • TimedDocumentRoot

        public TimedDocumentRoot​(boolean useSVG11AccessKeys,
                                 boolean useSVG12AccessKeys)
        Creates a new TimedDocumentRoot.
        Parameters:
        useSVG11AccessKeys - allows the use of accessKey() timing specifiers with a single character
        useSVG12AccessKeys - allows the use of accessKey() with a DOM 3 key name
    • Method Detail

      • getDefaultBegin

        public float getDefaultBegin​(TimedElement child)
        Returns the default begin time for the given child timed element. In SVG, this is always 0, since the only time container is the root SVG element, which acts like a 'par'.
        Specified by:
        getDefaultBegin in class TimeContainer
      • getCurrentTime

        public float getCurrentTime()
        Returns the last sampled document time.
      • isSampling

        public boolean isSampling()
        Returns whether the document is currently being sampled.
      • isHyperlinking

        public boolean isHyperlinking()
        Returns whether the document is currently being sampled for a hyperlink.
      • seekTo

        public float seekTo​(float time,
                            boolean hyperlinking)
        Samples the entire timegraph at the given time.
      • resetDocument

        public void resetDocument​(java.util.Calendar documentBeginTime)
        Resets the entire timegraph.
      • getDocumentBeginTime

        public java.util.Calendar getDocumentBeginTime()
        Returns the wallclock time that the document began.
      • convertEpochTime

        public float convertEpochTime​(long t)
        Converts an epoch time to document time.
      • convertWallclockTime

        public float convertWallclockTime​(java.util.Calendar time)
        Converts a wallclock time to document time.
      • shouldPropagate

        boolean shouldPropagate​(Interval i,
                                TimingSpecifier ts,
                                boolean isBegin)
        Returns whether the specified newly created Interval should propagate its times to the given TimingSpecifier.
        Parameters:
        i - the Interval that has just been created
        ts - the TimingSpecifier that is a dependent of the Interval
        isBegin - whether the dependency is on the begin or end time of the Interval
      • currentIntervalWillUpdate

        protected void currentIntervalWillUpdate()
        Invoked by timed elements in this document to indicate that the current interval will be re-evaluated at the next sample. This should be overridden in a concrete class so that ticks can be scheduled immediately if they are currently paused due to no animations being active.
      • getEventNamespaceURI

        protected abstract java.lang.String getEventNamespaceURI​(java.lang.String eventName)
        Returns the namespace URI of the event that corresponds to the given animation event name.
      • getEventType

        protected abstract java.lang.String getEventType​(java.lang.String eventName)
        Returns the type of the event that corresponds to the given animation event name.
      • getRepeatEventName

        protected abstract java.lang.String getRepeatEventName()
        Returns the name of the repeat event.
        Returns:
        either "repeat" or "repeatEvent"