Animation
vmm3d.core

Interface Animation

    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidaddChangeListener(ChangeListener listener)
      Register a ChangeListener to receive change events from the animation.
      voidcancel()
      Stop the Animation.
      StringgetStatusText(boolean running)
      Returns text to be displayed in the display's status bar while this animation is installed.
      doublegetTimeDilation()
      Gets the factor that is multiplied by all time period specifications.
      booleanisPaused()
      Tells whether the animation is paused.
      booleanisRunning()
      Tests whether the Animation is still running.
      voidremoveChangeListener(ChangeListener listener)
      De-register a ChangeListener from this animation, if it is currently registered to receive change events.
      voidsetPaused(boolean paused)
      Sets whether a running animation is paused or not.
      voidsetTimeDilation(double dilationFactor)
      Sets a factor that is multiplied by all time period specifications.
      voidstart()
      Start the animation running.
    • Method Detail

      • start

        void start()
        Start the animation running. Animations don't start automatically. The start() method must be called in order to start the animation.
      • cancel

        void cancel()
        Stop the Animation. Some animations will continue indefinitely until this method is called; others will stop automatically after some period of time.
      • isRunning

        boolean isRunning()
        Tests whether the Animation is still running. An animation is running from the time its start() method is called until either it stops on its own or its cancel() method is called. An animation that has been paused is still considered to be running.
      • setPaused

        void setPaused(boolean paused)
        Sets whether a running animation is paused or not. Has no effect on an animation that is not running.
        Parameters:
        paused - whether the running animation should be in the paused state.
      • isPaused

        boolean isPaused()
        Tells whether the animation is paused.
        Returns:
        returns true if the animation is running but is in a paused state; returns false if it is not running or if it is running but is not paused.
      • setTimeDilation

        void setTimeDilation(double dilationFactor)
        Sets a factor that is multiplied by all time period specifications. A value greater than one will slow down the animation; a value less than one will speed it up (although only within the limit imposed by the actual processing time needed to run the animation).
        Parameters:
        dilationFactor - A non-negative number that will be multiplied by all time measurements.
      • getTimeDilation

        double getTimeDilation()
        Gets the factor that is multiplied by all time period specifications. Defatult value is 1, meaning normal running speed for the animation.
      • addChangeListener

        void addChangeListener(ChangeListener listener)
        Register a ChangeListener to receive change events from the animation. An animation sends a change event at least when it starts and when it stops.
        Parameters:
        listener - a ChangeListener that is registered to receive change events from this animation.
      • removeChangeListener

        void removeChangeListener(ChangeListener listener)
        De-register a ChangeListener from this animation, if it is currently registered to receive change events.
        Parameters:
        listener - to be de-registered as a ChangeListener from this animation.
      • getStatusText

        String getStatusText(boolean running)
        Returns text to be displayed in the display's status bar while this animation is installed.
        Parameters:
        running - Tells whether the animation is running or paused, so text can depend on this value.
        Returns:
        the text to displayed, or null to use the default text "Animation Running" or "Animation Paused"

SCaVis 2.0 © jWork.ORG