Class AnimationFunctions.AlphaColorAnimationFunction

  • All Implemented Interfaces:
    AnimationFunction<java.awt.Color>
    Enclosing class:
    AnimationFunctions

    private static final class AnimationFunctions.AlphaColorAnimationFunction
    extends java.lang.Object
    implements AnimationFunction<java.awt.Color>
    Helper class for animation functions that answer translucent colors.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long duration()
      Returns the length of this function's valid time interval.
      java.awt.Color valueAt​(long time)
      Returns the function value at a given time in the valid time interval.
      • Methods inherited from class java.lang.Object

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

      • baseColor

        private final java.awt.Color baseColor
    • Constructor Detail

      • AlphaColorAnimationFunction

        private AlphaColorAnimationFunction​(AnimationFunction<java.lang.Integer> fAlpha,
                                            java.awt.Color baseColor)
    • Method Detail

      • duration

        public long duration()
        Description copied from interface: AnimationFunction
        Returns the length of this function's valid time interval.
        Specified by:
        duration in interface AnimationFunction<java.awt.Color>
        Returns:
        the length of this function's valid time interval
      • valueAt

        public java.awt.Color valueAt​(long time)
        Description copied from interface: AnimationFunction
        Returns the function value at a given time in the valid time interval. The value is undefined for times outside this function's time interval. An implementation may throw an exception, if this method called with a time outside the time interval.
        Specified by:
        valueAt in interface AnimationFunction<java.awt.Color>
        Parameters:
        time - the time used to determine the animation effect
        Returns:
        the function value at the given time