home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161b.iso / handson / archive / Issue159 / files / copyjava.exe / lib / Animator.java < prev    next >
Encoding:
Java Source  |  1999-10-02  |  1.5 KB  |  49 lines

  1. /*
  2.  * @(#)Animator.java    1999/09/28
  3.  * 
  4.  * Written by David Griffiths, 1999. 
  5.  * 
  6.  * The parts of this software that were specifically written by David Griffiths
  7.  * are released into the Public Domain. However, you should note that some parts are
  8.  * based on other libraries and you should read and be aware of the additional 
  9.  * conditions that are specified in some of the attached files 
  10.  * (notably GIFImage.java and LZWCompressor.java). The GIF format is the copyright
  11.  * of CompuServe Incorporated.
  12.  * 
  13.  * THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY 
  14.  * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  15.  * THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  16.  * PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR SHALL NOT BE LIABLE FOR ANY DAMAGES
  17.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  18.  * THIS SOFTWARE OR ITS DERIVATIVES.
  19.  */
  20.  
  21. /**
  22.  * Animator is the public interface for an animation file.
  23.  * @version    1.0 1999/09/28
  24.  * @author     David Griffiths 
  25.  */
  26.  
  27. import java.awt.*;
  28.  
  29. public abstract class Animator {
  30.     public static Animator getInstance(String b, int Width, int Height) {
  31.         Animator ab = null;
  32.  
  33.         if (b.toUpperCase().equals("GIF"))
  34.             ab = new GIFBuilder(Width, Height);
  35.  
  36.         return ab;
  37.     }
  38.  
  39.     // Attributes
  40.  
  41.     public abstract Animation getAnimation();
  42.  
  43.     public abstract void setFPS(int newFps);
  44.  
  45.     public abstract int getFPS();
  46.  
  47.     public abstract int addImage(Image image, Component c);
  48. }
  49.