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

public abstract Class ClipEnvelope

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.scenario.animation.shared.MultiLoopClipEnvelope, com.sun.scenario.animation.shared.SingleLoopClipEnvelope
Imports
javafx.animation.Animation, javafx.util.Duration, com.sun.javafx.animation.TickCalculation

An instance of ClipEnvelope handles the loop-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 intent is to provide a general implementation plus eventually some fast-track implementations for common use cases.

Field Summary

Modifier and TypeField and Description
protected boolean
protected Animation
protected double
protected long
cycleTicks

The number of ticks in a single cycle.

protected long
protected static final double
protected static final long
protected boolean
protected double
rate

The rate of the animation that is used to calculate the current rate of an animation.

protected long
ticks

The current position of the play head.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final void
protected abstract double
public static ClipEnvelope
create(Animation animation)

public double
public abstract void
jumpTo(long ticks)

public abstract void
setAutoReverse(boolean autoReverse)

protected void
setCurrentRate(double currentRate)

public abstract ClipEnvelope
setCycleCount(int cycleCount)

public abstract ClipEnvelope
setCycleDuration(Duration cycleDuration)

protected void
setInternalCurrentRate(double currentRate)

public abstract void
setRate(double rate)

public void
protected long
ticksRateChange(double newRate)

public abstract void
timePulse(long currentTick)

protected void
updateCycleTicks(Duration cycleDuration)

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abortedback to summary
protected boolean aborted
animationback to summary
protected Animation animation
currentRateback to summary
protected double currentRate
cycleTicksback to summary
protected long cycleTicks

The number of ticks in a single cycle. Calculated from the cycle duration. Always >=0.

deltaTicksback to summary
protected long deltaTicks
EPSILONback to summary
protected static final double EPSILON
INDEFINITEback to summary
protected static final long INDEFINITE
inTimePulseback to summary
protected boolean inTimePulse
rateback to summary
protected double rate

The rate of the animation that is used to calculate the current rate of an animation. It is the same as animation.rate, only ignores animation.rate = 0, so can never be 0.

ticksback to summary
protected long ticks

The current position of the play head. 0 <= ticks <= totalTicks

Constructor Detail

ClipEnvelopeback to summary
protected ClipEnvelope(Animation animation)

Method Detail

abortCurrentPulseback to summary
public final void abortCurrentPulse()
calculateCurrentRateback to summary
protected abstract double calculateCurrentRate()
createback to summary
public static ClipEnvelope create(Animation animation)
getCurrentRateback to summary
public double getCurrentRate()
jumpToback to summary
public abstract void jumpTo(long ticks)
setAutoReverseback to summary
public abstract void setAutoReverse(boolean autoReverse)
setCurrentRateback to summary
protected void setCurrentRate(double currentRate)
setCycleCountback to summary
public abstract ClipEnvelope setCycleCount(int cycleCount)
setCycleDurationback to summary
public abstract ClipEnvelope setCycleDuration(Duration cycleDuration)
setInternalCurrentRateback to summary
protected void setInternalCurrentRate(double currentRate)
setRateback to summary
public abstract void setRate(double rate)
startback to summary
public void start()
ticksRateChangeback to summary
protected long ticksRateChange(double newRate)
timePulseback to summary
public abstract void timePulse(long currentTick)
updateCycleTicksback to summary
protected void updateCycleTicks(Duration cycleDuration)
wasSynchedback to summary
public boolean wasSynched()