Package javafx.animation
Class ClipEnvelope
java.lang.Object
javafx.animation.ClipEnvelope
- Direct Known Subclasses:
FiniteClipEnvelope,InfiniteClipEnvelope,SingleLoopClipEnvelope
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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Animationprotected doubleprotected longprotected longprotected static final doubleprotected static final longprotected booleanprotected doubleprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract doubleprotected static longcheckBounds(long value, long max) static ClipEnvelopedoubleabstract voidjumpTo(long ticks) abstract voidsetAutoReverse(boolean autoReverse) protected voidsetCurrentRate(double currentRate) abstract ClipEnvelopesetCycleCount(int cycleCount) abstract ClipEnvelopesetCycleDuration(Duration cycleDuration) abstract voidsetRate(double rate) voidstart()abstract voidtimePulse(long currentTick) protected voidupdateCycleTicks(Duration cycleDuration) boolean
-
Field Details
-
INDEFINITE
protected static final long INDEFINITE- See Also:
-
EPSILON
protected static final double EPSILON- See Also:
-
animation
-
rate
protected double rate -
cycleTicks
protected long cycleTicks -
deltaTicks
protected long deltaTicks -
ticks
protected long ticks -
currentRate
protected double currentRate -
inTimePulse
protected boolean inTimePulse -
aborted
protected boolean aborted
-
-
Constructor Details
-
ClipEnvelope
-
-
Method Details
-
create
-
setCycleDuration
-
setRate
public abstract void setRate(double rate) -
setAutoReverse
public abstract void setAutoReverse(boolean autoReverse) -
setCycleCount
-
updateCycleTicks
-
wasSynched
public boolean wasSynched() -
start
public void start() -
timePulse
public abstract void timePulse(long currentTick) -
jumpTo
public abstract void jumpTo(long ticks) -
abortCurrentPulse
public void abortCurrentPulse() -
calculateCurrentRate
protected abstract double calculateCurrentRate() -
setCurrentRate
protected void setCurrentRate(double currentRate) -
checkBounds
protected static long checkBounds(long value, long max) -
getCurrentRate
public double getCurrentRate()
-