Interface Animation

All Known Implementing Classes:
EdgeAnimation, JobAnimation, OptimizedQNAnimation, QueueNetAnimation, SampleQNAnimation, StationAnimation

public interface Animation
Created by IntelliJ IDEA. User: orsotronIII Date: 14-gen-2005 Time: 13.29.22 This Interface defines methods to implement a simple animation. An Animator object could then provide support by refreshing it periodically.
  • Method Summary

    Modifier and Type
    Method
    Description
    returns background image for this animation.
    Returns bounding box for this animation, e.g.
    void
    Initialization method for implementing class.
    void
    Paints image currently handled in a rectangle defined within setBounds(Rectangle) method
    void
    Called when an animation needs to be refreshed.
    void
    sets background image for this animation.
    void
    Sets bounding box for this animation.
  • Method Details

    • refresh

      void refresh()
      Called when an animation needs to be refreshed. This method should update image currently handled by the animation
    • init

      void init()
      Initialization method for implementing class. The implementation of this method should prepare images for the animation, if this has not been done within constructor.
    • paint

      void paint(Graphics g, ImageObserver io)
      Paints image currently handled in a rectangle defined within setBounds(Rectangle) method
    • getBGImage

      Image getBGImage()
      returns background image for this animation.
      Returns:
      :Background image for this animation
    • setBGImage

      void setBGImage(Image img)
      sets background image for this animation.
      Parameters:
      img - : background image for this animation
    • setBounds

      void setBounds(Rectangle r)
      Sets bounding box for this animation. If this box is set, animation will update only this certain area of the Graphics object passed within paint(Graphics, ImageObserver) method.
      Parameters:
      r - : Bounding box for this animation.
    • getBounds

      Rectangle getBounds()
      Returns bounding box for this animation, e.g. the rectangle within which the frames for this animation will be painted
      Returns:
      : Bounding box for this animation.