|
|||||||||
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_SCALAR
Constant representing the Animatable property. |
Constructor Summary | ||
---|---|---|
AnimatedScalar(float value)
Class constructor that initializes the scalar to a float value. |
||
AnimatedScalar(int value)
Class constructor that initializes the scalar to a int value. |
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 AnimatedScalar as a float . |
|
int |
getInt()
Gets the value of the AnimatedScalar as an int . |
|
void |
setAnimationValue(int property,
AnimationValue value)
Sets the value or values of the specified property. |
|
void |
setFloat(float value)
Sets the float value of the AnimatedScalar . |
|
void |
setInt(int value)
Sets the int value of the AnimatedScalar . |
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)
Animatable
Gets 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 Animatable
property
- 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)
Animatable
Sets 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 Animatable
property
- 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)
Animatable
Gets 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 Animatable
property
- 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