net.rim.device.api.animation
Interface AnimatorListener


public interface AnimatorListener

Defines an interface for a listener that can be registered with an Animator to receive callbacks when the Animator begins processing and when it becomes idle.

The methods only get called when the Animator moves between the processing and idling state once per state change.

This helps when you write code to handle calling the animator on your own thread so that you can be notified when your thread can wait in the background and when it must wake up so that the Animator update() methods can resume being called at some user manageable interval.

This interface also has a callback method called on every animator.update() in which the Animator is started and that there are active animations. This is useful when a target frame rate is specified and the user wants a call each active frame of updates so that the user may invalidate() the area of the screen in which the animator may be effecting.

Registering an AnimatorListener

The following sample code shows how to register your listener on an Animator:
 // Create the Animator
 Animator animator = new Animator(25);
 // Create the AnimatorListener
 MyAnimatorListener animatorListener = new MyAnimatorListener();
 // Set the AnimationListener on the Animator
 animator.setAnimatorListener(animatorListener);
 

See Also:
Animator
Since:
BlackBerry API 6.0.0

Method Summary
 void animatorProcessing(boolean processing)
           Callback method called when the Animator transitions from the idle state to the processing state.
 void animatorUpdate()
          Callback method called when the Animator is playing and handling updates on at least 1 or more active animations.
 



Method Detail

animatorProcessing

void animatorProcessing(boolean processing)

Callback method called when the Animator transitions from the idle state to the processing state.

Since:
BlackBerry API 6.0.0

animatorUpdate

void animatorUpdate()
Callback method called when the Animator is playing and handling updates on at least 1 or more active animations.

Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.