| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.animation.AnimatedScalar
public class AnimatedScalar
Defines an animatable scalar. It is a general purpose animation target.
// Create a scalar, initial value is 10.0f. AnimatedScalar scalar = new AnimatedScalar(10.0f); // Create an animation targetting the scalar. Animation scalarAnimation = animator.addAnimationTo(scalar, AnimatedScalar.ANIMATION_PROPERTY_SCALAR, 100.0f, Animation._EASINGCURVE_BOUNCE_IN, 1000L);
The above scalar value can now be used to represent the desired animatable property.You could use the value to represent the width of a box. In this case, the animation would cause the width of the box to animate from 10 to 100 with a bounce-in effect.
| Field Summary | ||
|---|---|---|
| static int | ANIMATION_PROPERTY_SCALARConstant representing the Animatable property. | |
| Constructor Summary | ||
|---|---|---|
| AnimatedScalar(float value)Class constructor that initializes the scalar to a floatvalue. | ||
| AnimatedScalar(int value)Class constructor that initializes the scalar to a intvalue. | ||
| Method Summary | ||
|---|---|---|
|  int | getAnimationPropertyComponentCount(int property)Gets the number of components of the specified property. | |
|  void | getAnimationValue(int property,
                  AnimationValue value)Gets the value or values of the specified property. | |
|  float | getFloat()Gets the value of the AnimatedScalaras afloat. | |
|  int | getInt()Gets the value of the AnimatedScalaras anint. | |
|  void | setAnimationValue(int property,
                  AnimationValue value)Sets the value or values of the specified property. | |
|  void | setFloat(float value)Sets the floatvalue of theAnimatedScalar. | |
|  void | setInt(int value)Sets the intvalue of theAnimatedScalar. | |
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static int ANIMATION_PROPERTY_SCALAR
| Constructor Detail | 
|---|
public AnimatedScalar(float value)
float value.
 
value - The float value to assign to the AnimatedScalar.public AnimatedScalar(int value)
 Class constructor that initializes the scalar to a int value.
 
value - The int value to assign to the AnimatedScalar.| Method Detail | 
|---|
public float getFloat()
 Gets the value of the AnimatedScalar as a float.
 
AnimatedScalar.public void setFloat(float value)
 Sets the float value of the AnimatedScalar.
 
value - The value to set the AnimatedScalar to.public int getInt()
 Gets the value of the AnimatedScalar as an int.
 
AnimatedScalar.public void setInt(int value)
 Sets the int value of the AnimatedScalar.
 
value - The value to set the AnimatedScalar to.
public void getAnimationValue(int property,
                              AnimationValue value)
AnimatableGets the value or values of the specified property.
 Used by the Animation framework to get the values of the specified property on the Animatable.
 The implementer must set the value of the specified target property in the AnimationValue parameter.
 
getAnimationValue in interface Animatableproperty - The property to get the current value or values of.value - An AnimationValue used to store the returned property values.Animatable.getAnimationValue(int,AnimationValue)
public void setAnimationValue(int property,
                              AnimationValue value)
AnimatableSets the value or values of the specified property.
 Used by the Animation framework to update the value or values of the specified target property on the Animatable
 with the currently calculated animation value. The implementer must update the current value or values of the given target property
 with the values in the AnimationValue parameter.
 
setAnimationValue in interface Animatableproperty - The property to set the current value or values of.value - The AnimationValue used to specify the value or values to set.Animatable.setAnimationValue(int,AnimationValue)public int getAnimationPropertyComponentCount(int property)
AnimatableGets the number of components of the specified property.
The implementer must define the component size of every animatable property defined for theAnimatable.
 
getAnimationPropertyComponentCount in interface Animatableproperty - The property to retrieve the component count for.
Animatable.getAnimationPropertyComponentCount(int)| 
 | |||||||||
| 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