| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.animation.AbstractAnimation
net.rim.device.api.animation.AnimationGroup
public class AnimationGroup
A collection class that groups together a set of animations. The class lets you schedule and control the animations as a group.
AnimationGroup group = animator.addAnimationGroup();
AnimationGroup subGroup = group.addAnimationGroup();
 Animation animation = subGroup.addAnimationFromBy(animatable, MyAnimatable.PROPERTY_XY, new float[] {50f, 75f}, 0, new float[] {75f, 100f}, 0, Animation.EASINGCURVE_ELASTIC_OUT, 1000L); 
 
 
 group.begin(0L);
| Method Summary | ||
|---|---|---|
 Animation | 
addAnimation(Animatable target,
             int property,
             int keyframeCount,
             float[] keyTimes,
             int keyTimesOffset,
             float[] keyValues,
             int keyValuesOffset,
             int easingCurve,
             long duration)
Creates and adds an animation on the given animatable target property generated with the the given set of key values and key times to the group.  | 
|
 Animation | 
addAnimation(Animatable target,
             int property,
             AnimationKeyframeSequence sequence,
             long duration)
Creates and adds an animation that is bound to the supplied animatable target, property, and AnimationKeyframeSequence to the group. | 
|
 Animation | 
addAnimationBy(Animatable target,
               int property,
               float byValue,
               int easingCurve,
               long duration)
Creates and adds a relative By animation on the given animatable target property consisting of two key frames to the group.  | 
|
 Animation | 
addAnimationBy(Animatable target,
               int property,
               float[] byValue,
               int byOffset,
               int easingCurve,
               long duration)
Creates and adds a relative By animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 Animation | 
addAnimationFromBy(Animatable target,
                   int property,
                   float fromValue,
                   float byValue,
                   int easingCurve,
                   long duration)
Creates and adds a From-By animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 Animation | 
addAnimationFromBy(Animatable target,
                   int property,
                   float[] fromValue,
                   int fromOffset,
                   float[] byValue,
                   int byOffset,
                   int easingCurve,
                   long duration)
Creates and adds a From-By animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 Animation | 
addAnimationFromTo(Animatable target,
                   int property,
                   float fromValue,
                   float toValue,
                   int easingCurve,
                   long duration)
Creates and adds a From-To animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 Animation | 
addAnimationFromTo(Animatable target,
                   int property,
                   float[] fromValue,
                   int fromOffset,
                   float[] toValue,
                   int toOffset,
                   int easingCurve,
                   long duration)
Creates and adds a From-To animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 AnimationGroup | 
addAnimationGroup()
Creates and adds an AnimationGroup to the group. | 
|
 Animation | 
addAnimationTo(Animatable target,
               int property,
               float toValue,
               int easingCurve,
               long duration)
Creates and adds a relative To animation on the given animatable target property consisting of two key frames to the group.  | 
|
 Animation | 
addAnimationTo(Animatable target,
               int property,
               float[] toValue,
               int toOffset,
               int easingCurve,
               long duration)
Creates and adds a relative To animation on the given animatable target property consisting of two keyframes to the group.  | 
|
 void | 
begin(long beginDelay)
Schedules the animation to begin after the specified delay.  | 
|
 void | 
end(long endDelay)
Schedules the animation to end after the specified delay.  | 
|
 AbstractAnimation | 
findAnimation(String name)
Finds the first animation with the specified name.  | 
|
 boolean | 
findAnimation(AbstractAnimation animation)
Determines if the given animation belongs to the group.  | 
|
 void | 
removeAllAnimations()
Removes all animations from the group.  | 
|
 boolean | 
removeAnimation(AbstractAnimation animation)
Removes an animation from the group.  | 
|
 void | 
setSpeed(float speed)
Sets the speed factor of the animation.  | 
|
| Methods inherited from class net.rim.device.api.animation.AbstractAnimation | 
|---|
addBeginTrigger, addEndTrigger, getAnimator, getBeginTrigger, getEndTrigger, getListener, getName, getSpeed, hasBeginTriggers, hasEndTriggers, isStarted, removeAllBeginTriggers, removeAllEndTriggers, removeBeginTrigger, removeEndTrigger, setListener, setName | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public Animation addAnimationFromTo(Animatable target,
                                    int property,
                                    float fromValue,
                                    float toValue,
                                    int easingCurve,
                                    long duration)
It is assumed the given animatable target property has a component size of 1.
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.duration - The duration of the animation in milliseconds.fromValue - The value the animation will animate from.toValue - The value the animation will animate to.easingCurve - The easing curve to be used to interpolate through the sequence data.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component size of property is not equal to 1.
public Animation addAnimationFromBy(Animatable target,
                                    int property,
                                    float fromValue,
                                    float byValue,
                                    int easingCurve,
                                    long duration)
It is assumed the given animatable target property has a component size of 1.
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.fromValue - The value the animation will animate from.byValue - The value the animation will animate by.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component size of property is not equal to 1.
public Animation addAnimationTo(Animatable target,
                                int property,
                                float toValue,
                                int easingCurve,
                                long duration)
It is assumed the given animatable target property has a component size of 1.
target - Animatable to apply the animation values to.property - Property of the Animatable to be animated.toValue - The value the animation will animate to.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component size of property is not equal to 1.
public Animation addAnimationBy(Animatable target,
                                int property,
                                float byValue,
                                int easingCurve,
                                long duration)
It is assumed the given animatable target property has a component size of 1.
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.byValue - The value the animation will animate by.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component size of property is not equal to 1.
public Animation addAnimationFromTo(Animatable target,
                                    int property,
                                    float[] fromValue,
                                    int fromOffset,
                                    float[] toValue,
                                    int toOffset,
                                    int easingCurve,
                                    long duration)
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.fromValue - An array of values the animation will animate from.fromOffset - The offset into the fromValue array.toValue - An array of values the animation will animate to.toOffset - The offset into the toValue array.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if fromValue is null.
IllegalArgumentException - if fromOffset < 0.
IllegalArgumentException - if fromValue.length < fromOffset + the property component count defined for the given property.
IllegalArgumentException - if toValue is null.
IllegalArgumentException - if toOffset < 0.
IllegalArgumentException - if toValue.length < toOffset + the property component count defined for the given property.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component count defined the given target property is less than 1 or 
      greater than AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
public Animation addAnimationFromBy(Animatable target,
                                    int property,
                                    float[] fromValue,
                                    int fromOffset,
                                    float[] byValue,
                                    int byOffset,
                                    int easingCurve,
                                    long duration)
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.fromValue - An array of values the animation will animate from.fromOffset - Offset into the fromValue array.byValue - An array of values the animation will animate by.byOffset - Offset into the toValue array.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if fromValue is null.
IllegalArgumentException - if fromOffset < 0.
IllegalArgumentException - if fromValue.length < fromOffset + the property component count defined for the given property.
IllegalArgumentException - if byValue is null.
IllegalArgumentException - if byOffset < 0.
IllegalArgumentException - if byValue.length < byOffset + the property component count defined for the given property.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component count defined the given target property is less than 1 or 
      greater than AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
public Animation addAnimationTo(Animatable target,
                                int property,
                                float[] toValue,
                                int toOffset,
                                int easingCurve,
                                long duration)
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.toValue - An array of values the animation will animate to.toOffset - Offset into the toValue array.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if toValue is null.
IllegalArgumentException - if toOffset < 0.
IllegalArgumentException - if toValue.length < toOffset + the property component count defined for the given property.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component count defined the given target property is less than 1 or 
      greater than AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
public Animation addAnimationBy(Animatable target,
                                int property,
                                float[] byValue,
                                int byOffset,
                                int easingCurve,
                                long duration)
target - The Animatable to apply the animation values to.property - The property of the Animatable to be animated.byValue - An array of values the animation will animate by.byOffset - Offset into the toValue array.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if byValue is null.
IllegalArgumentException - if byOffset < 0.
IllegalArgumentException - if byValue.length < byOffset + the property component count defined for the given property.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component count defined the given target property is less than 1 or 
      greater than AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
public Animation addAnimation(Animatable target,
                              int property,
                              int keyframeCount,
                              float[] keyTimes,
                              int keyTimesOffset,
                              float[] keyValues,
                              int keyValuesOffset,
                              int easingCurve,
                              long duration)
target - The Animatable property to apply the animation values to.property - The property of the Animatable to be animated.keyframeCount - The number of keyframes for the sequence data.keyTimes - An array of key timeskeyTimesOffset - The offset into the keyTimes array.keyValues - An array of key valueskeyValuesOffset - The offset into the keyValues array.easingCurve - The easing curve to be used to interpolate through the sequence data.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if keyframeCount < 2.
IllegalArgumentException - if the property component count defined for the given property is less than 1 or 
      greater than AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
IllegalArgumentException - if keyTimes is null.
IllegalArgumentException - if keyTimesOffset < 0.
IllegalArgumentException - if keyTimes.length < keyTimesOffset + keyframeCount.
IllegalArgumentException - if keyValues is null.
IllegalArgumentException - if keyValuesOffset < 0.
IllegalArgumentException - if keyValues.length < keyValuesOffset + keyframeCount * the property component 
      count defined for the given property.
IllegalArgumentException - if easingCurve is not a valid curve type.
IllegalArgumentException - if duration <= 0.
public Animation addAnimation(Animatable target,
                              int property,
                              AnimationKeyframeSequence sequence,
                              long duration)
AnimationKeyframeSequence to the group.
 
target - The Animatable the animation will apply the animation values to.property - The property of the Animatable to be animated.sequence - AnimationKeyframeSequence data to bind on the animation.duration - The duration for the animation in milliseconds.
Animation object.
IllegalArgumentException - if target is null.
IllegalArgumentException - if sequence is null.
IllegalArgumentException - if duration <= 0.
IllegalArgumentException - if the property component count of property defined on the animatable is less than 1 or greater than
      AnimationKeyframeSequence.PROPERTY_COUNT_MAX.
IllegalArgumentException - if the property component count of the property defined on the animatable is not equal to the 
      property component count of the sequence.public AnimationGroup addAnimationGroup()
AnimationGroup to the group.
 
AnimationGroup instance.public boolean removeAnimation(AbstractAnimation animation)
animation - The animation to remove from the set.
IllegalArgumentException - If animation is null.public void removeAllAnimations()
public boolean findAnimation(AbstractAnimation animation)
animation - the animation to search for.
true if animation belongs to the group; false if animation does
      not belong to the group.
IllegalArgumentException - if animation is null.public AbstractAnimation findAnimation(String name)
name - The name of the animation to find.
null if no animation is found with the specified name.
IllegalArgumentException - if the name is null.public void begin(long beginDelay)
AbstractAnimation
 If a negative value is passed in for beginDelay the animation will 
 start partway through with that magnitude of time elapsed into the animation's total duration.
 For example, calling begin(-500) on an animation with a duration of 1000 ms would cause the animation
 to start halfway through, and it would only run for 500 ms.
 
begin in class AbstractAnimationbeginDelay - The delay before the animation begins.AbstractAnimation.begin(long)public void end(long endDelay)
AbstractAnimation
end in class AbstractAnimationendDelay - The delay before the animation ends.AbstractAnimation.end(long)public void setSpeed(float speed)
AbstractAnimationSets the speed factor of the animation. Elapsed time is multiplied by this factor to speed up or slow down the animation. The default value is 1.0f.
setSpeed in class AbstractAnimationspeed - The speed factor.AbstractAnimation.setSpeed(float)
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited.  295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8.  All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal