Class WindowShadeAnimation

  • All Implemented Interfaces:
    Animation

    public class WindowShadeAnimation
    extends java.lang.Object
    implements Animation
    Animation to minimize a frame with a window shade effect.
    • Field Detail

      • DEFAULT_DURATION

        public int DEFAULT_DURATION
        Default animation duration, in milliseconds.
      • startWindowHeight

        protected int startWindowHeight
      • targetWindowHeight

        protected int targetWindowHeight
      • duration

        protected int duration
        Duration, in milliseconds, of the animation.
      • animationStart

        protected long animationStart
        Time when the animation started.
      • targetWindowSize

        protected Size targetWindowSize
      • maximizedWindowHeight

        protected int maximizedWindowHeight
    • Constructor Detail

      • WindowShadeAnimation

        public WindowShadeAnimation​(ScrollFrame frame)
    • Method Detail

      • reset

        public void reset()
        Reset the animation to the starting state.
        Specified by:
        reset in interface Animation
      • step

        public void step()
        Step the animation.
        Specified by:
        step in interface Animation
      • hasNext

        public boolean hasNext()
        Indicates whether or not there more steps left in the animation.
        Specified by:
        hasNext in interface Animation
        Returns:
        true if there are more steps.
      • getDuration

        public int getDuration()
        Indicates the duration of the animation.
        Returns:
        The duration of the animation, in milliseconds.
      • setDuration

        public void setDuration​(int duration)
        Specifies the duration of the animation.
        Parameters:
        duration - The duration of the animation, in milliseconds.