//******************************************************************************
// Lake.java: Applet
//
// (c) David Griffiths, 1997
// This source code may not be reproduced without the express permission of the
// author.
//******************************************************************************
import java.applet.*;
import java.net.URL;
import java.net.MalformedURLException;
import java.awt.*;
//==============================================================================
// Main Class for applet Lake
//
//==============================================================================
public class Lake extends Applet implements Runnable
{
// THREAD SUPPORT:
// m_Lake is the Thread object for the applet
//--------------------------------------------------------------------------
Thread m_Lake = null;
// ANIMATION SUPPORT:
// m_Graphics used for storing the applet's Graphics context
// m_WaveGraphics used for storing the animation's Graphics context
// m_Image the original image
// m_WaveImage the image containing the wave animations
// m_nCurrImage the index of the next image to be displayed
// m_ImgWidth width of each image
// m_ImgHeight height of each image
// m_OvlWidth width of each overlay
// m_OvlHeight height of each overlay
// m_fAllLoaded indicates whether all images have been loaded
// m_tAnimate indicates that OK to do animation (changed by mouse
// click)
// NUM_FRAMES number of NUM_FRAMES used in the animation
//--------------------------------------------------------------------------
private Graphics m_Graphics, m_WaveGraphics;
private Image m_Image, m_Overlay, m_WaveImage;
private int m_nCurrImage;
private int m_nImgWidth = 0;
private int m_nImgHeight = 0;
private int m_nOvlWidth = 0;
private int m_nOvlHeight = 0;
private boolean m_fAllLoaded = false, m_tAnimate = true;
private final int NUM_FRAMES = 12;
// PARAMETER SUPPORT:
// Parameters allow an HTML author to pass information to the applet;
// the HTML author specifies them using the tag within the