Class DropImage

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int averageFallSpeed  
      private java.awt.Point edge  
      private int fallSpeed  
      private int h  
      private java.awt.Image image  
      private static java.util.Random seed  
      private int w  
    • Constructor Summary

      Constructors 
      Constructor Description
      DropImage​(int w, int h)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void animate()
      Animate the object - Cause next step of animation
      private java.awt.Image getImage()  
      void paint​(java.awt.Graphics g)
      Paint the object
      void setExtend​(int w, int h)
      Set the extend when window size changed
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • paint

        public void paint​(java.awt.Graphics g)
        Description copied from interface: IAnimObject
        Paint the object
        Specified by:
        paint in interface IAnimObject
        Parameters:
        g - the graphics object to paint to
      • setExtend

        public void setExtend​(int w,
                              int h)
        Description copied from interface: IAnimObject
        Set the extend when window size changed
        Specified by:
        setExtend in interface IAnimObject
        Parameters:
        w - window width
        h - window height
      • animate

        public void animate()
        Description copied from interface: IAnimObject
        Animate the object - Cause next step of animation
        Specified by:
        animate in interface IAnimObject
      • getImage

        private java.awt.Image getImage()