Class RMTransition

    • Constructor Summary

      Constructors 
      Constructor Description
      RMTransition​(RMKeyValue aKeyVal1, RMKeyValue aKeyVal2)
      Creates a new transition.
      RMTransition​(java.lang.Object aTarget, java.lang.String aKey, java.lang.Object aValue, int aDuration, boolean isRelative)
      Creates a new transition.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(RMTransition aTrans)
      Standard compare implementation.
      int getCycleCount()
      Returns the number of cycles in animation.
      int getDelay()
      Returns the delay of the transition from the time it is told to play to when transition starts.
      int getDelayedDuration()
      Returns the duration plus delay.
      int getDuration()
      Returns the duration of the transition in milliseconds.
      static java.lang.Object getInterpolation​(double aFraction, java.lang.Object aValue1, java.lang.Object aValue2)
      Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.
      RMInterpolator getInterpolator()
      Returns the interpolator.
      java.lang.String getKey()
      Returns the key.
      int getProgress()
      Returns the progress this transition has made since it was started, in milliseconds.
      double getProgressRatio()
      Returns the progress ratio for current progress.
      protected double getProgressRatio​(int aProgress)
      Returns the progress ratio for a progress.
      RMTransition.RunStatus getRunStatus()
      Returns the run status of the transition.
      java.lang.Object getTarget()
      Returns the target.
      int getTotalDuration()
      Returns the total duration of the animation (delayed duration times cycle count).
      static RMTransition getTransition​(java.lang.Object aTarget, java.lang.String aKey)
      Returns the transition for given target and key.
      java.lang.Object getValue1()
      Returns the first value.
      java.lang.Object getValue2()
      Returns the second value.
      boolean isAutoReverse()
      Returns whether the transition does an auto-reverse.
      boolean isPaused()
      Returns whether transition is paused.
      boolean isRunning()
      Returns whether transition is running.
      static boolean isTransitioning​(java.lang.Object aTarget, java.lang.String aKey)
      Returns whether transition is running for given target and key.
      void pause()
      Pauses the animation.
      void play()
      Tells the transition to start playing.
      void playFrom​(int aTime)
      Tells the transition to start playing at given time of transition duration (in milliseconds).
      void playFromStart()
      Tells the transition to start playing from the beginning.
      void setAutoReverse​(boolean doAutoReverse)
      Sets whether the transition does an auto-reverse.
      void setCycleCount​(int aCount)
      Sets the number of cycles in animation.
      void setDelay​(int aDelay)
      Sets the delay of the transition from the time it is told to play to when transition starts.
      void setDuration​(int aValue)
      Sets the duration of the transition in milliseconds.
      void setInterpolator​(RMInterpolator anInterpolator)
      Sets the interpolator.
      protected void setProgress​(int aProgress)
      Sets the progress this transition has made since it was started, in milliseconds.
      void setRunStatus​(RMTransition.RunStatus aStatus)
      Sets the run status of the transition.
      void setValue1​(java.lang.Object aValue)
      Sets the first value.
      void setValue2​(java.lang.Object aValue)
      Sets the second value.
      void stop()
      Stops the transition.
      protected static void updateTransitions()
      Updates transitions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RMTransition

        public RMTransition​(java.lang.Object aTarget,
                            java.lang.String aKey,
                            java.lang.Object aValue,
                            int aDuration,
                            boolean isRelative)
        Creates a new transition.
      • RMTransition

        public RMTransition​(RMKeyValue aKeyVal1,
                            RMKeyValue aKeyVal2)
        Creates a new transition.
    • Method Detail

      • getTarget

        public java.lang.Object getTarget()
        Returns the target.
      • getKey

        public java.lang.String getKey()
        Returns the key.
      • getValue1

        public java.lang.Object getValue1()
        Returns the first value.
      • setValue1

        public void setValue1​(java.lang.Object aValue)
        Sets the first value.
      • getValue2

        public java.lang.Object getValue2()
        Returns the second value.
      • setValue2

        public void setValue2​(java.lang.Object aValue)
        Sets the second value.
      • getDuration

        public int getDuration()
        Returns the duration of the transition in milliseconds.
      • setDuration

        public void setDuration​(int aValue)
        Sets the duration of the transition in milliseconds.
      • getDelay

        public int getDelay()
        Returns the delay of the transition from the time it is told to play to when transition starts.
      • setDelay

        public void setDelay​(int aDelay)
        Sets the delay of the transition from the time it is told to play to when transition starts.
      • isAutoReverse

        public boolean isAutoReverse()
        Returns whether the transition does an auto-reverse.
      • setAutoReverse

        public void setAutoReverse​(boolean doAutoReverse)
        Sets whether the transition does an auto-reverse.
      • getCycleCount

        public int getCycleCount()
        Returns the number of cycles in animation.
      • setCycleCount

        public void setCycleCount​(int aCount)
        Sets the number of cycles in animation.
      • getInterpolator

        public RMInterpolator getInterpolator()
        Returns the interpolator.
      • setInterpolator

        public void setInterpolator​(RMInterpolator anInterpolator)
        Sets the interpolator.
      • getDelayedDuration

        public int getDelayedDuration()
        Returns the duration plus delay.
      • getTotalDuration

        public int getTotalDuration()
        Returns the total duration of the animation (delayed duration times cycle count).
      • isRunning

        public boolean isRunning()
        Returns whether transition is running.
      • isPaused

        public boolean isPaused()
        Returns whether transition is paused.
      • setRunStatus

        public void setRunStatus​(RMTransition.RunStatus aStatus)
        Sets the run status of the transition.
      • getProgress

        public int getProgress()
        Returns the progress this transition has made since it was started, in milliseconds.
      • setProgress

        protected void setProgress​(int aProgress)
        Sets the progress this transition has made since it was started, in milliseconds.
      • getProgressRatio

        public double getProgressRatio()
        Returns the progress ratio for current progress.
      • getProgressRatio

        protected double getProgressRatio​(int aProgress)
        Returns the progress ratio for a progress.
      • play

        public void play()
        Tells the transition to start playing.
      • playFromStart

        public void playFromStart()
        Tells the transition to start playing from the beginning.
      • playFrom

        public void playFrom​(int aTime)
        Tells the transition to start playing at given time of transition duration (in milliseconds).
      • pause

        public void pause()
        Pauses the animation.
      • stop

        public void stop()
        Stops the transition.
      • isTransitioning

        public static boolean isTransitioning​(java.lang.Object aTarget,
                                              java.lang.String aKey)
        Returns whether transition is running for given target and key.
      • getTransition

        public static RMTransition getTransition​(java.lang.Object aTarget,
                                                 java.lang.String aKey)
        Returns the transition for given target and key.
      • updateTransitions

        protected static void updateTransitions()
        Updates transitions.
      • compareTo

        public int compareTo​(RMTransition aTrans)
        Standard compare implementation.
        Specified by:
        compareTo in interface java.lang.Comparable<RMTransition>
      • getInterpolation

        public static java.lang.Object getInterpolation​(double aFraction,
                                                        java.lang.Object aValue1,
                                                        java.lang.Object aValue2)
        Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.