Top Description Fields Constructors Methods
com.sun.scenario.animation.shared

public Class TimelineClipCore

extends Object
Class Inheritance
Imports
java.util.Arrays, .Collection, .Comparator, javafx.animation.Animation.Status, .KeyFrame, .Timeline, javafx.event.ActionEvent, .EventHandler, javafx.util.Duration, com.sun.javafx.animation.TickCalculation

An instance of ClipCore handles the core part of a clip. The functionality to react on a pulse-signal from the timer is implemented in two classes: ClipEnvelope and ClipCore. ClipEnvelope is responsible for the "loop-part" (keeping track of the number of cycles, handling the direction of the clip etc.). ClipCore takes care of the inner part (interpolating the values, triggering the action-functions, ...) Both classes have an abstract public definition and can only be created using the factory method create(). The intend is to provide a general implementation plus eventually some fast-track implementations for common use cases.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private ClipInterpolator
private long
private static final Comparator<KeyFrame>
KEY_FRAME_COMPARATOR

Note

this comparator imposes orderings that are inconsistent with equals.

private KeyFrame[]
private long[]
private int
pack-priv Timeline
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
abort()

This method is called if while visiting a keyframe of a timeline the time or rate are changed, or if the timeline is stopped.

private void
public void
jumpTo(long ticks, boolean forceJump)

public void
public void
playTo(long ticks)

Called to visit all keyframes within a specified time-interval.

public Duration
setKeyFrames(Collection<KeyFrame> keyFrames)

Changes the keyframes.

private void
setTime(long ticks)

public void
start(boolean forceSync)

private void
visitKeyFrame(int
the index of the keyframe in the keyframe-array
kfIndex
,
long
the time of that keyframe
kfTicks
)

Visit a single keyframe.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abortedback to summary
private boolean aborted
canSkipFramesback to summary
private boolean canSkipFrames
clipInterpolatorback to summary
private ClipInterpolator clipInterpolator
curTicksback to summary
private long curTicks
KEY_FRAME_COMPARATORback to summary
private static final Comparator<KeyFrame> KEY_FRAME_COMPARATOR

Note

this comparator imposes orderings that are inconsistent with equals.

keyFramesback to summary
private KeyFrame[] keyFrames
keyFrameTicksback to summary
private long[] keyFrameTicks
lastKFback to summary
private int lastKF
timelineback to summary
pack-priv Timeline timeline
UNDEFINED_KEYFRAMEback to summary
private static final int UNDEFINED_KEYFRAME

Constructor Detail

TimelineClipCoreback to summary
public TimelineClipCore(Timeline timeline)

Method Detail

abortback to summary
public void abort()

This method is called if while visiting a keyframe of a timeline the time or rate are changed, or if the timeline is stopped. In these cases visiting the keyframes must be aborted.

clearLastKeyFrameback to summary
private void clearLastKeyFrame()
jumpToback to summary
public void jumpTo(long ticks, boolean forceJump)
notifyCurrentRateChangedback to summary
public void notifyCurrentRateChanged()
playToback to summary
public void playTo(long ticks)

Called to visit all keyframes within a specified time-interval.

setKeyFramesback to summary
public Duration setKeyFrames(Collection<KeyFrame> keyFrames)

Changes the keyframes.

setTimeback to summary
private void setTime(long ticks)
startback to summary
public void start(boolean forceSync)
visitKeyFrameback to summary
private void visitKeyFrame(int kfIndex, long kfTicks)

Visit a single keyframe.

Parameters
kfIndex:int

the index of the keyframe in the keyframe-array

kfTicks:long

the time of that keyframe