Methods Summary |
---|
void | dispatchBeginEvent(Time beginTime)Dispatches beginEvent. See the TimedElementSupport class
method implementation. This class also uses the opportunity to record
what the wallclock time is for the begin time so that localTimes can
be converted later.
super.dispatchBeginEvent(beginTime);
beginWallClockTime = System.currentTimeMillis();
// With the following, beginTime will map to beginWallClockTime,
// as expected.
beginWallClockTime -= beginTime.value;
|
Time | getContainerSimpleDuration()For the root container, there is no container simple duration, so we
retun INDEFINITE, no matter what the state is.
return Time.INDEFINITE;
|
com.sun.perseus.model.TimeContainerRootSupport | getRootContainer()Helper method.
return this;
|
void | sample(Time currentTime)Overrides the default sample time to capture the last sample time.
super.sample(currentTime);
lastSampleTime = currentTime;
|
void | seekTo(Time seekToTime)Seek to the requested time. The time is assumed to be in
document simple time.
if (!seekToTime.isResolved()) {
throw new IllegalStateException();
}
seeking = true;
seekingBack = !seekToTime.greaterThan(lastSampleTime);
try {
sample(seekToTime);
} finally {
seeking = false;
}
|
protected void | setTimeContainer(TimeContainerSupport timeContainer)Always throws an exception because a root container should not have
a parent container.
throw new IllegalArgumentException();
|
Time | toContainerSimpleTime(Time rootSimpleTime)Converts the input root container simple time (i.e., a time in the root
container's simple time interval) to a time in this element's time
container simple duration.
return rootSimpleTime;
|
Time | toRootContainerSimpleTime(Time simpleTime)Converts the input simple time (i.e., a time in the parent container's
simple duration) to a root container simple time (i.e., a time
in the root time container's simple time interval).
return simpleTime;
|
Time | toRootContainerSimpleTimeClamp(Time simpleTime)Converts the input simple time (i.e., a time in the parent container's
simple duration) to a root container simple time (i.e., a time
in the root time container's simple time interval).
// Note that no clamping is necessary here because the clamping is
// done in a timed element, relative to its container's simple time.
// By the time this is called on the root, the child timed element has
// already applied the root's constraints.
return simpleTime;
|
long | toWallClockTime(long localTime)Converts the input 'local' time to an absolute wallclock time.
return beginWallClockTime + localTime;
|