Documentation API of the 'vmm3d.core.TimerAnimation' Java class

Class TimerAnimation

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public abstract class TimerAnimationextends Objectimplements Animation
    An animation that is driven by a Swing Timer. A concrete subclass of this class must implement the drawFrame() method, which is called each time the Timer fires. A subclass that has some set-up to do at the beginning of the animation should override the animationStarting() method; if the subclass has some clean-up that needs to be done when the animation ends, it should override animationEnding(). Note that the animation does not start until its start() method is invoked. Once it has been started, it will run until it ends on its own or until its cancel() method is called, either by an external agent or in the drawFrame method. While it is running, a TimerAnimation can be paused and resumed by calling the setPaused(boolean) method.

    Each frame in a TimerAnimation has a frame number. It can have either a specified finite number of frames, or the frame number can be allowed to increase indiefinitely. An animation with a finite number of frames can run in any of three "looping modes": TimerAnimation.ONCE, meaning that it runs through the frames from first to last then stops; TimerAnimation.LOOP, which means that it runs from first to last frame over and over indefinitely; and TimerAnimation.OSCILLATE, which means that it runs from first frame to last then from last frame back to first in revese order, and the repeats this sequence indefinitely.

    A Timere animation is capable of using a "filmstrip" to store the frames of the animation. See setUseFilmstrip(boolean). If a filmstrip is used, each frame of the animation is saved as a bitmap the first time it is computed. Then, when it is necessary to show the same frame again, the precomputed bitmap is just copied to the screen.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.