|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.anim.AnimationFactory
public final class AnimationFactory
Factory class that provides methods to create meta animations. The following meta animations can be created:
Method Summary | |
---|---|
static CompositeAnimationObject |
createConcurrency()
Creates a CompositeAnimationObject that represents
a set of regular animations that will run concurrently. |
static CompositeAnimationObject |
createConcurrency(AnimationObject ao1,
AnimationObject ao2)
Creates a CompositeAnimationObject that represents
a set of regular animations that will run concurrently and conveniently
adds the two specified AnimationObject instances. |
static AnimationObject |
createEasedAnimation(AnimationObject ao)
Creates an eased AnimationObject . |
static AnimationObject |
createEasedAnimation(AnimationObject ao,
double stopAcceleration,
double startDeceleration)
Creates an eased AnimationObject , which results
in a linear increase in animation speed up to stopAcceleration
and a linear decrease in animation speed from
startDeceleration . |
static CompositeAnimationObject |
createLazySequence()
Creates a CompositeAnimationObject that represents
a sequence of regular animations. |
static CompositeAnimationObject |
createLazySequence(AnimationObject ao1,
AnimationObject ao2)
Creates a CompositeAnimationObject that represents
a sequence of regular animations and conveniently adds the
two specified AnimationObject instances. |
static AnimationObject |
createPause(long preferredDuration)
Creates an AnimationObject that blocks for the
specified duration. |
static AnimationObject |
createRepetition(AnimationObject ao,
int repetitions,
boolean initDisposeRepeatedly)
Creates an AnimationObject that repeats the specified
animation for the specified number of times. |
static AnimationObject |
createRepetitionForDuration(AnimationObject ao,
long duration,
boolean initDisposeRepeatedly)
Creates an AnimationObject that repeats the specified
animation for the specified duration. |
static CompositeAnimationObject |
createScalingConcurrency()
Creates a CompositeAnimationObject that represents
a set of regular animations that will run concurrently. |
static CompositeAnimationObject |
createScalingConcurrency(AnimationObject ao1,
AnimationObject ao2)
Creates a CompositeAnimationObject that represents
a set of regular animations that will run concurrently and conveniently
adds the two specified AnimationObject instances. |
static CompositeAnimationObject |
createSequence()
Creates a CompositeAnimationObject that represents
a sequence of regular animations. |
static CompositeAnimationObject |
createSequence(AnimationObject ao1,
AnimationObject ao2)
Creates a CompositeAnimationObject that represents
a sequence of regular animations and conveniently adds the
two specified AnimationObject instances. |
static AnimationObject |
createStateGuardian(AnimationObject ao)
Creates an AnimationObject that ignores calls to
initAnimation if initAnimation has and
disposeAnimation has not been called already
(and vice versa). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AnimationObject createEasedAnimation(AnimationObject ao)
AnimationObject
.
Calling this factory method is equivalent to invoking
Animations.createEasedAnimation( ao, 0.5, 0.5 ).
public static AnimationObject createEasedAnimation(AnimationObject ao, double stopAcceleration, double startDeceleration)
AnimationObject
, which results
in a linear increase in animation speed up to stopAcceleration
and a linear decrease in animation speed from
startDeceleration
. Between stopAcceleration
and startDeceleration
the animation speed is constant.
The associated speed curve is
stopAcceleration
- specifies the time to stop increasing the
animation speed. Must be in [0.0,1.0].startDeceleration
- specifies the time to start decreasing the
animation speed. Must be in [0.0,1.0].
java.lang.IllegalArgumentException
- if either stopAcceleration
not in [0.0,1.0] or startDeceleration
not in [0.0,1.0].public static CompositeAnimationObject createConcurrency()
CompositeAnimationObject
that represents
a set of regular animations that will run concurrently.
The preferred duration of a composite animation created by this method
is the maximum of the preferred durations of the registered animations.
The registered animations will start concurrently.
Each animation will stop after running for its preferred duration.
The CompositeAnimationObject
created by this method
will throw an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents a set of
concurrently running animations.createScalingConcurrency()
,
createSequence()
public static CompositeAnimationObject createConcurrency(AnimationObject ao1, AnimationObject ao2)
CompositeAnimationObject
that represents
a set of regular animations that will run concurrently and conveniently
adds the two specified AnimationObject
instances.
The preferred duration of a composite animation created by this method
is the maximum of the preferred durations of the registered animations.
The registered animations will start concurrently.
Each animation will stop after running for its preferred duration.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents a set of
concurrently running animations.createScalingConcurrency(AnimationObject, AnimationObject)
,
createSequence(AnimationObject, AnimationObject)
public static CompositeAnimationObject createScalingConcurrency()
CompositeAnimationObject
that represents
a set of regular animations that will run concurrently.
The preferred duration of a composite animation created by this method
is the maximum of the preferred durations of the registered animations.
The registered animations will start and stop concurrently, i.e.
the duration of all registered animations will be scaled up to the
preferred duration of the composite.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents a set of
concurrently running animations.createConcurrency()
,
createSequence()
public static CompositeAnimationObject createScalingConcurrency(AnimationObject ao1, AnimationObject ao2)
CompositeAnimationObject
that represents
a set of regular animations that will run concurrently and conveniently
adds the two specified AnimationObject
instances.
The preferred duration of a composite animation created by this method
is the maximum of the preferred durations of the registered animations.
The registered animations will start and stop concurrently, i.e.
the duration of all registered animations will be scaled up to the
preferred duration of the composite.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents a set of
concurrently running animations.createConcurrency(AnimationObject, AnimationObject)
,
createSequence()
public static CompositeAnimationObject createLazySequence()
CompositeAnimationObject
that represents
a sequence of regular animations.
The preferred duration of a composite animation created by this method
is the sum of the preferred durations of the registered animations.
The registered animations initAnimation
method
is called right before the first call to the registered animation's
calcFrame
method.
The registered animations disposeAnimation
method
is called right after the last call to the registered animation's
calcFrame
method.
initAnimation
or disposeAnimation
will severely reduce the frame rate for the sequential animation.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents
a sequence of regular animations.createSequence()
,
createConcurrency()
public static CompositeAnimationObject createLazySequence(AnimationObject ao1, AnimationObject ao2)
CompositeAnimationObject
that represents
a sequence of regular animations and conveniently adds the
two specified AnimationObject
instances.
The preferred duration of a composite animation created by this method
is the sum of the preferred durations of the registered animations.
The registered animations initAnimation
method
is called right before the first call to the registered animation's
calcFrame
method.
The registered animations disposeAnimation
method
is called right after the last call to the registered animation's
calcFrame
method.
initAnimation
or disposeAnimation
will severely reduce the frame rate for the sequential animation.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents
a sequence of regular animations.createSequence(AnimationObject, AnimationObject)
,
createConcurrency(AnimationObject, AnimationObject)
public static CompositeAnimationObject createSequence()
CompositeAnimationObject
that represents
a sequence of regular animations.
The preferred duration of a composite animation created by this method
is the sum of the preferred durations of the registered animations.
Initialization and disposal of registered animations is done in
the composite's initAnimation
and
disposeAnimation
methods.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents
a sequence of regular animations.createLazySequence()
,
createConcurrency()
public static CompositeAnimationObject createSequence(AnimationObject ao1, AnimationObject ao2)
CompositeAnimationObject
that represents
a sequence of regular animations and conveniently adds the
two specified AnimationObject
instances.
The preferred duration of a composite animation created by this method
is the sum of the preferred durations of the registered animations.
Initialization and disposal of registered animations is done in
the composite's initAnimation
and
disposeAnimation
methods.
The CompositeAnimationObject
created by this method
will thrown an IllegalStateException
if an
AnimationObject
is added to it after its
initAnimation
method has been called.
CompositeAnimationObject
that represents
a sequence of regular animations.createLazySequence(AnimationObject, AnimationObject)
,
createConcurrency(AnimationObject, AnimationObject)
public static AnimationObject createRepetitionForDuration(AnimationObject ao, long duration, boolean initDisposeRepeatedly)
AnimationObject
that repeats the specified
animation for the specified duration.
ao
- the AnimationObject
to be
repeatedduration
- the preferred duration of the repetitioninitDisposeRepeatedly
- specifies whether the specified animation's
initAnimation
and
disposeAnimation
methods are
called in between repetition steps or only
once at the beginning and the end of the
animation
AnimationObject
that repeats the specified
animation for the specified duration.public static AnimationObject createRepetition(AnimationObject ao, int repetitions, boolean initDisposeRepeatedly)
AnimationObject
that repeats the specified
animation for the specified number of times.
ao
- the AnimationObject
to be
repeatedrepetitions
- the number of repetitionsinitDisposeRepeatedly
- specifies whether the specified animation's
initAnimation
and
disposeAnimation
methods are
called in between repetition steps or only
once at the beginning and the end of the
animation
AnimationObject
that repeats the specified
animation for the specified number of times.public static AnimationObject createPause(long preferredDuration)
AnimationObject
that blocks for the
specified duration.
preferredDuration
- the duration in milliseconds
java.lang.IllegalArgumentException
- if preferredDuration
is
less than 0.public static AnimationObject createStateGuardian(AnimationObject ao)
AnimationObject
that ignores calls to
initAnimation
if initAnimation
has and
disposeAnimation
has not been called already
(and vice versa).
This behavior is useful if it is desirable to manually initialize
ao
before it is passed to an AnimationPlayer
for processing.
ao
- the AnimationObject
to be guarded
AnimationObject
that collapses multiple calls
to initAnimation
and disposeAnimation
.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |