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 boolean
protected Animation
protected double
protected long
protected long
protected static final double
protected static final long
protected boolean
protected double
protected long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected abstract double
protected static long
checkBounds
(long value, long max) static ClipEnvelope
double
abstract void
jumpTo
(long ticks) abstract void
setAutoReverse
(boolean autoReverse) protected void
setCurrentRate
(double currentRate) abstract ClipEnvelope
setCycleCount
(int cycleCount) abstract ClipEnvelope
setCycleDuration
(Duration cycleDuration) abstract void
setRate
(double rate) void
start()
abstract void
timePulse
(long currentTick) protected void
updateCycleTicks
(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()
-