AnimationManager
Date: 2019-10-22

org.jmol.viewer

## Class AnimationManager

- java.lang.Object
- - org.jmol.viewer.AnimationManager

-     public class AnimationManager
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) int` | `animationDirection`
    `int` | `animationFps`
    `(package private) int[]` | `animationFrames`
    `boolean` | `animationOn`
    `(package private) boolean` | `animationPaused`
    `int` | `animationReplayMode`
    `JmolThread` | `animationThread`
    `(package private) int` | `backgroundModelIndex`
    `(package private) javajs.util.BS` | `bsDisplay`
    `(package private) javajs.util.BS` | `bsVisibleModels`
    `(package private) int` | `caf` current animation frame
    `int` | `cai`
    `int` | `cmi` current model index
    `(package private) int` | `currentDirection`
    `(package private) float` | `currentMorphModel`
    `(package private) float` | `firstFrameDelay`
    `int` | `firstFrameDelayMs`
    `(package private) int` | `firstFrameIndex`
    `(package private) static int` | `FRAME_FIRST`
    `(package private) static int` | `FRAME_LAST`
    `(package private) int` | `frameStep`
    `private int` | `intAnimThread`
    `boolean` | `isMovie`
    `(package private) float` | `lastFrameDelay`
    `int` | `lastFrameDelayMs`
    `(package private) int` | `lastFrameIndex`
    `private int` | `lastFramePainted`
    `private int` | `lastModelPainted`
    `(package private) static int` | `MODEL_CURRENT`
    `(package private) int` | `morphCount`
    `Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnimationManager(Viewer vwr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `animation(boolean TF)`
    `(package private) void` | `clear()`
    `boolean` | `currentFrameIs(int f)`
    `boolean` | `currentIsLast()`
    `(package private) float` | `getAnimRunTimeSeconds()`
    `int` | `getFrameCount()`
    `private int` | `getFrameStep(int direction)`
    `(package private) java.lang.String` | `getModelSpecial(int i)`
    `(package private) void` | `initializePointers(int frameStep)`
    `private boolean` | `isNotInRange(float frameNext)`
    `(package private) int` | `modelIndexForFrame(int i)`
    `void` | `morph(float modelIndex)`
    `(package private) void` | `pauseAnimation()`
    `(package private) void` | `repaintDone()`
    `(package private) void` | `resumeAnimation()`
    `(package private) void` | `reverseAnimation()`
    `(package private) void` | `rewindAnimation()`
    `void` | `setAnimationDirection(int animationDirection)`
    `(package private) void` | `setAnimationFps(int fps)`
    `(package private) void` | `setAnimationLast()`
    `boolean` | `setAnimationNext()`
    `void` | `setAnimationOn(boolean animationOn)`
    `(package private) boolean` | `setAnimationPrevious()`
    `(package private) void` | `setAnimationRange(int framePointer, int framePointer2)`
    `private boolean` | `setAnimationRelative(int direction)`
    `void` | `setAnimationReplayMode(int animationReplayMode, float firstFrameDelay, float lastFrameDelay)`
    `(package private) void` | `setBackgroundModelIndex(int modelIndex)`
    `(package private) void` | `setDisplay(javajs.util.BS bs)`
    `void` | `setFrame(int i)`
    `private int` | `setFrameRangeVisible()`
    `(package private) void` | `setModel(int modelIndex, boolean clearBackgroundModel)`
    `void` | `setMorphCount(int n)`
    `void` | `setMovie(java.util.Map<java.lang.String,java.lang.Object> info)` support for PyMOL movies and anim FRAMES [....] currently no support for scripted movies
    `(package private) void` | `setSelectAllSubset(boolean justOne)`
    `private void` | `setViewer(boolean clearBackgroundModel)`
    `void` | `stopThread(boolean isPaused)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### animationThread

          public JmolThread animationThread

    - #### vwr

          public Viewer vwr

    - #### animationOn

          public boolean animationOn

    - #### animationFps

          public int animationFps

    - #### firstFrameDelayMs

          public int firstFrameDelayMs

    - #### lastFrameDelayMs

          public int lastFrameDelayMs

    - #### FRAME_FIRST

          static final int FRAME_FIRST

      See Also:
        Constant Field Values

    - #### FRAME_LAST

          static final int FRAME_LAST

      See Also:
        Constant Field Values

    - #### MODEL_CURRENT

          static final int MODEL_CURRENT

      See Also:
        Constant Field Values

    - #### bsVisibleModels

          final javajs.util.BS bsVisibleModels

    - #### animationReplayMode

          public int animationReplayMode

    - #### bsDisplay

          javajs.util.BS bsDisplay

    - #### animationFrames

          int[] animationFrames

    - #### isMovie

          public boolean isMovie

    - #### animationPaused

          boolean animationPaused

    - #### cmi

          public int cmi

      current model index

    - #### caf

          int caf

      current animation frame

    - #### morphCount

          int morphCount

    - #### animationDirection

          int animationDirection

    - #### currentDirection

          int currentDirection

    - #### firstFrameIndex

          int firstFrameIndex

    - #### lastFrameIndex

          int lastFrameIndex

    - #### frameStep

          int frameStep

    - #### backgroundModelIndex

          int backgroundModelIndex

    - #### currentMorphModel

          float currentMorphModel

    - #### firstFrameDelay

          float firstFrameDelay

    - #### lastFrameDelay

          float lastFrameDelay

    - #### lastFramePainted

          private int lastFramePainted

    - #### lastModelPainted

          private int lastModelPainted

    - #### intAnimThread

          private int intAnimThread

    - #### cai

          public int cai

  - ### Constructor Detail

    - #### AnimationManager

          AnimationManager(Viewer vwr)

  - ### Method Detail

    - #### setAnimationOn

          public void setAnimationOn(boolean animationOn)

    - #### stopThread

          public void stopThread(boolean isPaused)

    - #### setAnimationNext

          public boolean setAnimationNext()

    - #### currentIsLast

          public boolean currentIsLast()

    - #### currentFrameIs

          public boolean currentFrameIs(int f)

    - #### clear

          void clear()

    - #### getModelSpecial

          java.lang.String getModelSpecial(int i)

    - #### setDisplay

          void setDisplay(javajs.util.BS bs)

    - #### setMorphCount

          public void setMorphCount(int n)

    - #### morph

          public void morph(float modelIndex)

    - #### setModel

          void setModel(int modelIndex,
                        boolean clearBackgroundModel)

    - #### setBackgroundModelIndex

          void setBackgroundModelIndex(int modelIndex)

    - #### initializePointers

          void initializePointers(int frameStep)

    - #### setAnimationDirection

          public void setAnimationDirection(int animationDirection)

    - #### setAnimationFps

          void setAnimationFps(int fps)

    - #### setAnimationReplayMode

          public void setAnimationReplayMode(int animationReplayMode,
                                             float firstFrameDelay,
                                             float lastFrameDelay)

    - #### setAnimationRange

          void setAnimationRange(int framePointer,
                                 int framePointer2)

    - #### pauseAnimation

          void pauseAnimation()

    - #### reverseAnimation

          void reverseAnimation()

    - #### repaintDone

          void repaintDone()

    - #### resumeAnimation

          void resumeAnimation()

    - #### setAnimationLast

          void setAnimationLast()

    - #### rewindAnimation

          void rewindAnimation()

    - #### setAnimationPrevious

          boolean setAnimationPrevious()

    - #### getAnimRunTimeSeconds

          float getAnimRunTimeSeconds()

    - #### setMovie

          public void setMovie(java.util.Map<java.lang.String,java.lang.Object> info)

      support for PyMOL movies and anim FRAMES [....] currently no support for scripted movies
      Parameters:
        `info` -

    - #### modelIndexForFrame

          int modelIndexForFrame(int i)

    - #### getFrameCount

          public int getFrameCount()

    - #### setFrame

          public void setFrame(int i)

    - #### setViewer

          private void setViewer(boolean clearBackgroundModel)

    - #### setSelectAllSubset

          void setSelectAllSubset(boolean justOne)

    - #### setFrameRangeVisible

          private int setFrameRangeVisible()

    - #### animation

          private void animation(boolean TF)

    - #### setAnimationRelative

          private boolean setAnimationRelative(int direction)

    - #### isNotInRange

          private boolean isNotInRange(float frameNext)

    - #### getFrameStep

          private int getFrameStep(int direction)