A
download ImageLoop.java
Language: Java
Copyright: (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
LOC: 17
Project Info
JavaML
Server: SourceForge
Type: cvs
...ml\javaml\java‑ml\examples\
   .cvsignore
   Abacus.java
   AlphaBullet.java
   Animator.java
   AnInterface.java
   AnonymousClass.java
   AnotherApplet.java
   Assignments.java
   AudioItem.java
   Banner.java
   BigInit.java
   Blah.java
   BounceItem.java
   Bubbles.java
   cannon.java
   Chart.java
   ComplexApplet.java
   ComplexApplet2.java
   Continued.java
   crossword.java
   DiningPhilosophers.java
   escherpaint.java
   fillTriangle.java
   FirstApplet.java
   generic_paint.java
   Hangman.java
   ImageLoop.java
   ImageLoopItem.java
   ImageTape.java
   ImageTest.java
   JackhammerDuke.java
   LED.java
   LEDMessage.java
   Letters.java
   OuterClass.java
   Pythagoras.java
   RotateFilter.java
   Script.java
   SimpAnim.html
   SimpAnim.java
   SimpleAnimator.java
   stars.java
   SystemInfo.java
   TumbleItem.java
   voltage.java
   WordMatch.java

/*
 * @(#)ImageLoop.java	1.22f 95/03/28 James Gosling
 *
 * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for NON-COMMERCIAL purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies. Please refer to the file "copyright.html"
 * for further important copyright and licensing information.
 *
 * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
 * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */

import java.io.InputStream;
import java.awt.*;
import java.net.*;

/**
 * ImageLoop class. This is a container for a list
 * of images that can be animated.
 *
 * @author 	James Gosling
 * @version 	1.22f, 28 Mar 1995
 */
class ImageLoop {
    /**
     * The images.
     */
    Image imgs[];

    /**
     * The number of images actually loaded.
     */
    int nimgs = 0;

    /**
     * Load the images, from dir. The images are assumed to be
     * named T1.gif, T2.gif...
     * Once all images are loaded the applet is resized to the
     * maximum size().width and size().height.
     */
    ImageLoop(URL context, String dir, ImageLoopItem parent, int nimgs) {
	this.nimgs = nimgs;
	imgs = new Image[nimgs];
	for (int i = 0; i < nimgs; i++) {
	    imgs[i] = parent.getImage(parent.getDocumentBase(), dir + "/T" + (i + 1) + ".gif");
	}
    }
  
  public String getAppletInfo() {
    return "Title: ImageLoop\nAuthor: James Gosling\nThis is a container for a list of images that can be animated.";
  }
}


About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us