|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.animation.AbstractAnimation
public abstract class AbstractAnimation
An abstract class that defines the base functionality shared by Animation and AnimationGroup.
Animation,
AnimationGroup| Method Summary | ||
|---|---|---|
void |
addBeginTrigger(AnimationTrigger beginTrigger,
long beginTriggerDelay)
Adds a begin trigger to the animation. |
|
void |
addEndTrigger(AnimationTrigger endTrigger,
long endTriggerDelay)
Adds an end trigger to the animation. |
|
abstract void |
begin(long beginDelay)
Schedules the animation to begin after the specified delay. |
|
abstract void |
end(long endDelay)
Schedules the animation to end after the specified delay. |
|
Animator |
getAnimator()
Gets the Animator the animation animates on. |
|
AnimationTrigger |
getBeginTrigger()
Gets the AnimationTrigger that is fired when the animation begins. |
|
AnimationTrigger |
getEndTrigger()
Gets the AnimationTrigger that is fired when the animation ends. |
|
AnimationListener |
getListener()
Gets the AnimationListener on the animation. |
|
String |
getName()
Gets the name of the animation. |
|
float |
getSpeed()
Gets the speed factor of the animation. |
|
boolean |
hasBeginTriggers()
Indicates if the animation has any begin triggers. |
|
boolean |
hasEndTriggers()
Indicates if the animation has any end triggers. |
|
boolean |
isStarted()
Indicates if the animation has started. |
|
void |
removeAllBeginTriggers()
Removes all begin triggers on the animation. |
|
void |
removeAllEndTriggers()
Removes all end triggers on the animation. |
|
void |
removeBeginTrigger(AnimationTrigger beginTrigger)
Removes the specified begin trigger from the animation. |
|
void |
removeEndTrigger(AnimationTrigger endTrigger)
Removes the specified end trigger from the animation. |
|
void |
setListener(AnimationListener listener)
Sets the AnimationListener on the animation. |
|
void |
setName(String name)
Sets the name of the animation. |
|
void |
setSpeed(float speed)
Sets the speed factor of the animation. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public abstract void begin(long beginDelay)
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.
beginDelay - The delay before the animation begins.public abstract void end(long endDelay)
endDelay - The delay before the animation ends.public void setName(String name)
name - The name of the animation.public String getName()
public boolean isStarted()
true if the animation has started, false if the animation has not started.public float getSpeed()
Gets 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.
public void setSpeed(float speed)
Sets 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.
speed - The speed factor.public AnimationTrigger getBeginTrigger()
AnimationTrigger that is fired when the animation begins.
This can be used to schedule animations on the animation's begin event.
AnimationTriggerpublic AnimationTrigger getEndTrigger()
Gets the AnimationTrigger that is fired when the animation ends.
This can be used to schedule animations on the animation's end event.
AnimationTriggerpublic boolean hasBeginTriggers()
true if the animation has begin triggers,
false if the animation has no begin triggers.AnimationTrigger
public void addBeginTrigger(AnimationTrigger beginTrigger,
long beginTriggerDelay)
Adds a begin trigger to the animation. The animation will begin when the given AnimationTrigger is fired.
If beginTrigger already exists on the animation, the trigger
delay will be updated with beginTriggerDelay. When the given trigger is fired the animation
will begin after the specified delay.
beginTrigger - The trigger that will cause the animation to begin.beginTriggerDelay - The delay before the animation begins after the trigger is fired.
IllegalArgumentException - if beginTrigger is null.
IllegalArgumentException - if beginTrigger is this animation's begin or end trigger.AnimationTrigger,
AbstractAnimation.getBeginTrigger(),
AbstractAnimation.getEndTrigger()public void removeBeginTrigger(AnimationTrigger beginTrigger)
Removes the specified begin trigger from the animation. Does nothing if beginTrigger is not a trigger on the animation.
beginTrigger - The begin trigger to remove from the animation.
IllegalArgumentException - if beginTrigger is null.AnimationTrigger,
AbstractAnimation.addBeginTrigger(AnimationTrigger, long),
AbstractAnimation.hasBeginTriggers()public void removeAllBeginTriggers()
Removes all begin triggers on the animation.
AnimationTrigger,
AbstractAnimation.addBeginTrigger(AnimationTrigger,long),
AbstractAnimation.hasBeginTriggers()public boolean hasEndTriggers()
Indicates if the animation has any end triggers.
true if the animation has end triggers,
false if the animation has no end triggers.AnimationTrigger
public void addEndTrigger(AnimationTrigger endTrigger,
long endTriggerDelay)
Adds an end trigger to the animation. The animation will end when the specified AnimationTrigger is fired.
If endTrigger already exists on the animation, the trigger
delay will be updated with endTriggerDelay. When the given trigger is fired the animation
will end after the specified delay.
endTrigger - The end trigger to add.endTriggerDelay - The delay after the trigger is fired before the end of the animation.
IllegalArgumentException - if endTrigger is null.
IllegalArgumentException - if endTrigger is this animation's begin or end trigger.
IllegalArgumentException - if endTriggerDelay < 0.AnimationTrigger,
AbstractAnimation.getBeginTrigger(),
AbstractAnimation.getEndTrigger()public void removeEndTrigger(AnimationTrigger endTrigger)
Removes the specified end trigger from the animation. Does nothing if endTrigger is not a trigger on the animation.
endTrigger - The end trigger to remove.
IllegalArgumentException - if endTrigger is null.AnimationTrigger,
AbstractAnimation.addEndTrigger(AnimationTrigger, long),
AbstractAnimation.hasEndTriggers()public void removeAllEndTriggers()
Removes all end triggers on the animation.
AnimationTrigger,
AbstractAnimation.addEndTrigger(AnimationTrigger,long),
AbstractAnimation.hasEndTriggers()public AnimationListener getListener()
Gets the AnimationListener on the animation.
null
if no listener is set.AnimationListenerpublic void setListener(AnimationListener listener)
Sets the AnimationListener on the animation.
listener - the AnimationListener to be set or null
to remove a listener.AnimationListenerpublic Animator getAnimator()
Gets the Animator the animation animates on.
Animator currently set on the animation.
|
|||||||||
| 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