<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.MediaTracker
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.List.html#_top_">Previous</a>  <a href="java.awt.Menu.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.MediaTracker
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.MediaTracker
</pre>
<hr>
<dl>
  <dt> public class <b>MediaTracker</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The <code>MediaTracker</code> class is a utility class to track 
 the status of a number of media objects. Media objects could 
 include audio clips as well as images, though currently only 
 images are supported. 
 <p>
 To use a media tracker, create an instance of  
 <code>MediaTracker</code> and call its <code>addImage</code>  
 method for each image to be tracked. In addition, each image can 
 be assigned a unique identifier. This identifier controls the 
 priority order in which the images are fetched. It can also be used 
 to identify unique subsets of the images that can be waited on 
 independently. Images with a lower ID are loaded in preference to 
 those with a higher ID number. 
 <p>
 Here is an example: 
 <p>
 <hr><blockquote><pre>
 import java.applet.Applet;
 import java.awt.Color;
 import java.awt.Image;
 import java.awt.Graphics;
 import java.awt.MediaTracker;
 public class ImageBlaster extends Applet implements Runnable {
	MediaTracker tracker;
	Image bg;
	Image anim[] = new Image[5];
	int index;
	Thread animator;
	// Get the images for the background (id == 0) 
	// and the animation frames (id == 1) 
      // and add them to the MediaTracker
	public void init() {
	    tracker = new MediaTracker(this);
	    bg = getImage(getDocumentBase(), 
                  "images/background.gif");
	    tracker.addImage(bg, 0);
	    for (int i = 0; i < 5; i++) {
		anim[i] = getImage(getDocumentBase(), 
                      "images/anim"+i+".gif");
		tracker.addImage(anim[i], 1);
	    }
	}
	// Start the animation thread.
	public void start() {
	    animator = new Thread(this);
	    animator.start();
	}
	// Stop the animation thread.
	public void stop() {
	    animator.stop();
	    animator = null;
	}
	// Run the animation thread.
	// First wait for the background image to fully load 
      // and paint.  Then wait for all of the animation 
	// frames to finish loading. Finally, loop and 
	// increment the animation frame index.
	public void run() {
	    try {
		tracker.waitForID(0);
		tracker.waitForID(1);
	    } catch (InterruptedException e) {
		return;
	    }
	    Thread me = Thread.currentThread();
	    while (animator == me) {
		try {
		    Thread.sleep(100);
		} catch (InterruptedException e) {
		    break;
		}
		synchronized (this) {
		    index++;
		    if (index >= anim.length) {
			index = 0;
		    }
		}
		repaint();
	    }
	}
	// The background image fills the frame so we 
	// don't need to clear the applet on repaints. 
      // Just call the paint method.
	public void update(Graphics g) {
	    paint(g);
	}
	// Paint a large red rectangle if there are any errors 
	// loading the images.  Otherwise always paint the 
	// background so that it appears incrementally as it 
      // is loading.  Finally, only paint the current animation 
	// frame if all of the frames (id == 1) are done loading,
	// so that we don't get partial animations.
	public void paint(Graphics g) {
	    if ((tracker.statusAll(false) & MediaTracker.ERRORED) != 0) {
		g.setColor(Color.red);
		g.fillRect(0, 0, size().width, size().height);
		return;
	    }
	    g.drawImage(bg, 0, 0, this);
	    if (tracker.statusID(1, false) == MediaTracker.COMPLETE) {
		g.drawImage(anim[index], 10, 10, this);
	    }
	}
 }
 </pre></blockquote><hr>
 <p>
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ABORTED"><b>ABORTED</b></a>
  <dd>  Flag indicating that the downloading of some media was aborted.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#COMPLETE"><b>COMPLETE</b></a>
  <dd>  Flag indicating that the downloading of media was completed 
 successfully.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ERRORED"><b>ERRORED</b></a>
  <dd>  Flag indicating that the downloading of some media encountered 
 an error.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LOADING"><b>LOADING</b></a>
  <dd>  Flag indicating some media is currently being loaded.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#MediaTracker(java.awt.Component)"><b>MediaTracker</b></a>(Component)
  <dd>  Creates a media tracker to track images for a given component.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addImage(java.awt.Image, int)"><b>addImage</b></a>(Image, int)
  <dd>  Adds an image to the list of images being tracked by this media 
 tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addImage(java.awt.Image, int, int, int)"><b>addImage</b></a>(Image, int, int, int)
  <dd>  Adds a scaled image to the list of images being tracked  
 by this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#checkAll()"><b>checkAll</b></a>()
  <dd>  Checks to see if all images being tracked by this media tracker 
 have finished loading.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#checkAll(boolean)"><b>checkAll</b></a>(boolean)
  <dd>  Checks to see if all images being tracked by this media tracker 
 have finished loading.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#checkID(int)"><b>checkID</b></a>(int)
  <dd>  Checks to see if all images tracked by this media tracker that 
 are tagged with the specified identifier have finished loading.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#checkID(int, boolean)"><b>checkID</b></a>(int, boolean)
  <dd>  Checks to see if all images tracked by this media tracker that 
 are tagged with the specified identifier have finished loading.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getErrorsAny()"><b>getErrorsAny</b></a>()
  <dd>  Returns a list of all media that have encountered an error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getErrorsID(int)"><b>getErrorsID</b></a>(int)
  <dd>  Returns a list of media with the specified ID that 
 have encountered an error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isErrorAny()"><b>isErrorAny</b></a>()
  <dd>  Checks the error status of all of the images.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isErrorID(int)"><b>isErrorID</b></a>(int)
  <dd>  Checks the error status of all of the images tracked by this 
 media tracker with the specified identifier.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeImage(java.awt.Image)"><b>removeImage</b></a>(Image)
  <dd>  Remove the specified image from this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeImage(java.awt.Image, int)"><b>removeImage</b></a>(Image, int)
  <dd>  Remove the specified image from the specified tracking 
 ID of this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeImage(java.awt.Image, int, int, int)"><b>removeImage</b></a>(Image, int, int, int)
  <dd>  Remove the specified image with the specified 
 width, height, and ID from this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#statusAll(boolean)"><b>statusAll</b></a>(boolean)
  <dd>  Calculates and returns the bitwise inclusive <b>OR</b> of the 
 status of all media that are tracked by this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#statusID(int, boolean)"><b>statusID</b></a>(int, boolean)
  <dd>  Calculates and returns the bitwise inclusive <b>OR</b> of the 
 status of all media with the specified identifier that are 
 tracked by this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#waitForAll()"><b>waitForAll</b></a>()
  <dd>  Starts loading all images tracked by this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#waitForAll(long)"><b>waitForAll</b></a>(long)
  <dd>  Starts loading all images tracked by this media tracker.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#waitForID(int)"><b>waitForID</b></a>(int)
  <dd>  Starts loading all images tracked by this media tracker with the 
 specified identifier.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#waitForID(int, long)"><b>waitForID</b></a>(int, long)
  <dd>  Starts loading all images tracked by this media tracker with the 
 specified identifier.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="LOADING"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LOADING</b>
<pre>
 public static final int LOADING
</pre>
<dl>
  <dd> Flag indicating some media is currently being loaded.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#statusAll">statusAll</a>, <a href="#statusID">statusID</a>
  </dl></dd>
</dl>
<a name="ABORTED"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>ABORTED</b>
<pre>
 public static final int ABORTED
</pre>
<dl>
  <dd> Flag indicating that the downloading of some media was aborted.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#statusAll">statusAll</a>, <a href="#statusID">statusID</a>
  </dl></dd>
</dl>
<a name="ERRORED"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>ERRORED</b>
<pre>
 public static final int ERRORED
</pre>
<dl>
  <dd> Flag indicating that the downloading of some media encountered 
 an error.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#statusAll">statusAll</a>, <a href="#statusID">statusID</a>
  </dl></dd>
</dl>
<a name="COMPLETE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>COMPLETE</b>
<pre>
 public static final int COMPLETE
</pre>
<dl>
  <dd> Flag indicating that the downloading of media was completed 
 successfully.<p>
  <dd><dl> 
    <dt> <b>See Also:</b>
    <dd> <a href="#statusAll">statusAll</a>, <a href="#statusID">statusID</a>
  </dl></dd>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="MediaTracker"></a>
<a name="MediaTracker(java.awt.Component)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>MediaTracker</b>
<pre>
 public MediaTracker(<a href="java.awt.Component.html#_top_">Component</a> comp)
</pre>
<dl>
  <dd> Creates a media tracker to track images for a given component.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> comp - the component on which the images
                     will eventually be drawn.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="addImage(java.awt.Image, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addImage"><b>addImage</b></a>
<pre>
 public void addImage(<a href="java.awt.Image.html#_top_">Image</a> image,
                      int id)
</pre>
<dl>
  <dd> Adds an image to the list of images being tracked by this media 
 tracker. The image will eventually be rendered at its default 
 (unscaled) size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> image - the image to be tracked.
    <dd> id - an identifier used to track this image.
  </dl></dd>
</dl>
<a name="addImage(java.awt.Image, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addImage"><b>addImage</b></a>
<pre>
 public synchronized void addImage(<a href="java.awt.Image.html#_top_">Image</a> image,
                                   int id,
                                   int w,
                                   int h)
</pre>
<dl>
  <dd> Adds a scaled image to the list of images being tracked  
 by this media tracker. The image will eventually be 
 rendered at the indicated width and height.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> image - the image to be tracked.
    <dd> id - an identifier that can be used to track this image.
    <dd> w - the width at which the image is rendered.
    <dd> h - the height at which the image is rendered.
  </dl></dd>
</dl>
<a name="checkAll()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="checkAll"><b>checkAll</b></a>
<pre>
 public boolean checkAll()
</pre>
<dl>
  <dd> Checks to see if all images being tracked by this media tracker 
 have finished loading. 
 <p>
 This method does not start loading the images if they are not 
 already loading. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> or <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if all images have finished loading,
                       have been aborted, or have encountered 
                       an error; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#checkAll(boolean)">checkAll</a>, <a href="#checkID">checkID</a>, <a href="#isErrorAny">isErrorAny</a>, <a href="#isErrorID">isErrorID</a>
  </dl></dd>
</dl>
<a name="checkAll(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="checkAll"><b>checkAll</b></a>
<pre>
 public boolean checkAll(boolean load)
</pre>
<dl>
  <dd> Checks to see if all images being tracked by this media tracker 
 have finished loading. 
 <p>
 If the value of the <code>load</code> flag is <code>true</code>, 
 then this method starts loading any images that are not yet 
 being loaded. 
 <p>
 If there is an error while loading or scaling an image, that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> and <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> load - if <code>true</code>, start loading any
                       images that are not yet being loaded.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if all images have finished loading,
                       have been aborted, or have encountered 
                       an error; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#checkID">checkID</a>, <a href="#checkAll()">checkAll</a>, <a href="#isErrorAny()">isErrorAny</a>, <a href="#isErrorID(int)">isErrorID</a>
  </dl></dd>
</dl>
<a name="isErrorAny()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isErrorAny"><b>isErrorAny</b></a>
<pre>
 public synchronized boolean isErrorAny()
</pre>
<dl>
  <dd> Checks the error status of all of the images.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if any of the images tracked
                  by this media tracker had an error during 
                  loading; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#isErrorID">isErrorID</a>, <a href="#getErrorsAny">getErrorsAny</a>
  </dl></dd>
</dl>
<a name="getErrorsAny()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getErrorsAny"><b>getErrorsAny</b></a>
<pre>
 public synchronized <a href="java.lang.Object.html#_top_">Object</a>[] getErrorsAny()
</pre>
<dl>
  <dd> Returns a list of all media that have encountered an error.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an array of media objects tracked by this
                        media tracker that have encountered 
                        an error, or <code>null</code> if 
                        there are none with errors.
    <dt> <b>See Also:</b>
    <dd> <a href="#isErrorAny">isErrorAny</a>, <a href="#getErrorsID">getErrorsID</a>
  </dl></dd>
</dl>
<a name="waitForAll()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="waitForAll"><b>waitForAll</b></a>
<pre>
 public void waitForAll() throws <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
</pre>
<dl>
  <dd> Starts loading all images tracked by this media tracker. This 
 method waits until all the images being tracked have finished 
 loading. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> or <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
    <dd> if another thread has
                                     interrupted this thread.
    <dt> <b>See Also:</b>
    <dd> <a href="#waitForID(int)">waitForID</a>, <a href="#waitForAll(long)">waitForAll</a>, <a href="#isErrorAny">isErrorAny</a>, <a href="#isErrorID">isErrorID</a>
  </dl></dd>
</dl>
<a name="waitForAll(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="waitForAll"><b>waitForAll</b></a>
<pre>
 public synchronized boolean waitForAll(long ms) throws <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
</pre>
<dl>
  <dd> Starts loading all images tracked by this media tracker. This 
 method waits until all the images being tracked have finished 
 loading, or until the length of time specified in milliseconds  
 by the <code>ms</code> argument has passed. 
 <p>
 If there is an error while loading or scaling an image, then  
 that image is considered to have finished loading. Use the 
 <code>isErrorAny</code> or <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ms - the number of milliseconds to wait
                       for the loading to complete.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if all images were successfully
                       loaded; <code>false</code> otherwise.
    <dt> <b>Throws:</b> <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
    <dd> if another thread has
                                     interrupted this thread.
    <dt> <b>See Also:</b>
    <dd> <a href="#waitForID(int)">waitForID</a>, <a href="#waitForAll(long)">waitForAll</a>, <a href="#isErrorAny">isErrorAny</a>, <a href="#isErrorID">isErrorID</a>
  </dl></dd>
</dl>
<a name="statusAll(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="statusAll"><b>statusAll</b></a>
<pre>
 public int statusAll(boolean load)
</pre>
<dl>
  <dd> Calculates and returns the bitwise inclusive <b>OR</b> of the 
 status of all media that are tracked by this media tracker. 
 <p>
 Possible flags defined by the 
 <code>MediaTracker</code> class are <code>LOADING</code>, 
 <code>ABORTED</code>, <code>ERRORED</code>, and 
 <code>COMPLETE</code>. An image that hasn't started 
 loading has zero as its status. 
 <p>
 If the value of <code>load</code> is <code>true</code>, then
 this method starts loading any images that are not yet being loaded.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> load - if <code>true</code>, start loading
                            any images that are not yet being loaded.
    <dt> <b>Returns:</b>
    <dd> the bitwise inclusive <b>OR</b> of the status of
                            all of the media being tracked.
    <dt> <b>See Also:</b>
    <dd> <a href="#statusID(int, boolean)">statusID</a>, <a href="#LOADING">LOADING</a>, <a href="#ABORTED">ABORTED</a>, <a href="#ERRORED">ERRORED</a>, <a href="#COMPLETE">COMPLETE</a>
  </dl></dd>
</dl>
<a name="checkID(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="checkID"><b>checkID</b></a>
<pre>
 public boolean checkID(int id)
</pre>
<dl>
  <dd> Checks to see if all images tracked by this media tracker that 
 are tagged with the specified identifier have finished loading. 
 <p>
 This method does not start loading the images if they are not 
 already loading. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> or <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if all images have finished loading,
                       have been aborted, or have encountered 
                       an error; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#checkID(int, boolean)">checkID</a>, <a href="#checkAll()">checkAll</a>, <a href="#isErrorAny()">isErrorAny</a>, <a href="#isErrorID(int)">isErrorID</a>
  </dl></dd>
</dl>
<a name="checkID(int, boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="checkID"><b>checkID</b></a>
<pre>
 public boolean checkID(int id,
                        boolean load)
</pre>
<dl>
  <dd> Checks to see if all images tracked by this media tracker that 
 are tagged with the specified identifier have finished loading. 
 <p>
 If the value of the <code>load</code> flag is <code>true</code>, 
 then this method starts loading any images that are not yet 
 being loaded. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> or <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dd> load - if <code>true</code>, start loading any
                       images that are not yet being loaded.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if all images have finished loading,
                       have been aborted, or have encountered 
                       an error; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#checkID(int, boolean)">checkID</a>, <a href="#checkAll()">checkAll</a>, <a href="#isErrorAny()">isErrorAny</a>, <a href="#isErrorID(int)">isErrorID</a>
  </dl></dd>
</dl>
<a name="isErrorID(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isErrorID"><b>isErrorID</b></a>
<pre>
 public synchronized boolean isErrorID(int id)
</pre>
<dl>
  <dd> Checks the error status of all of the images tracked by this 
 media tracker with the specified identifier.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if any of the images with the
                          specified identifier had an error during 
                          loading; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#isErrorAny">isErrorAny</a>, <a href="#getErrorsID">getErrorsID</a>
  </dl></dd>
</dl>
<a name="getErrorsID(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getErrorsID"><b>getErrorsID</b></a>
<pre>
 public synchronized <a href="java.lang.Object.html#_top_">Object</a>[] getErrorsID(int id)
</pre>
<dl>
  <dd> Returns a list of media with the specified ID that 
 have encountered an error.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dt> <b>Returns:</b>
    <dd> an array of media objects tracked by this media
                       tracker with the specified identifier 
                       that have encountered an error, or 
                       <code>null</code> if there are none with errors.
    <dt> <b>See Also:</b>
    <dd> <a href="#isErrorID">isErrorID</a>, <a href="#isErrorAny">isErrorAny</a>, <a href="#getErrorsAny">getErrorsAny</a>
  </dl></dd>
</dl>
<a name="waitForID(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="waitForID"><b>waitForID</b></a>
<pre>
 public void waitForID(int id) throws <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
</pre>
<dl>
  <dd> Starts loading all images tracked by this media tracker with the 
 specified identifier. This method waits until all the images with 
 the specified identifier have finished loading. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>isErrorAny</code> and <code>isErrorID</code> methods to 
 check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dt> <b>Throws:</b> <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
    <dd> if another thread has
                          interrupted this thread.
    <dt> <b>See Also:</b>
    <dd> <a href="#waitForAll">waitForAll</a>, <a href="#isErrorAny()">isErrorAny</a>, <a href="#isErrorID(int)">isErrorID</a>
  </dl></dd>
</dl>
<a name="waitForID(int, long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="waitForID"><b>waitForID</b></a>
<pre>
 public synchronized boolean waitForID(int id,
                                       long ms) throws <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
</pre>
<dl>
  <dd> Starts loading all images tracked by this media tracker with the 
 specified identifier. This method waits until all the images with 
 the specified identifier have finished loading, or until the 
 length of time specified in milliseconds by the <code>ms</code> 
 argument has passed. 
 <p>
 If there is an error while loading or scaling an image, then that 
 image is considered to have finished loading. Use the 
 <code>statusID</code>, <code>isErrorID</code>, and
 <code>isErrorAny</code> methods to check for errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dd> ms - the length of time, in milliseconds, to wait
                           for the loading to complete.
    <dt> <b>Throws:</b> <a href="java.lang.InterruptedException.html#_top_">InterruptedException</a>
    <dd> if another thread has
                          interrupted this thread.
    <dt> <b>See Also:</b>
    <dd> <a href="#waitForAll">waitForAll</a>, <a href="#waitForID(int)">waitForID</a>, <a href="#statusID">statusID</a>, <a href="#isErrorAny()">isErrorAny</a>, <a href="#isErrorID(int)">isErrorID</a>
  </dl></dd>
</dl>
<a name="statusID(int, boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="statusID"><b>statusID</b></a>
<pre>
 public int statusID(int id,
                     boolean load)
</pre>
<dl>
  <dd> Calculates and returns the bitwise inclusive <b>OR</b> of the 
 status of all media with the specified identifier that are 
 tracked by this media tracker. 
 <p>
 Possible flags defined by the 
 <code>MediaTracker</code> class are <code>LOADING</code>, 
 <code>ABORTED</code>, <code>ERRORED</code>, and 
 <code>COMPLETE</code>. An image that hasn't started 
 loading has zero as its status. 
 <p>
 If the value of <code>load</code> is <code>true</code>, then
 this method starts loading any images that are not yet being loaded.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> id - the identifier of the images to check.
    <dd> load - if <code>true</code>, start loading
                            any images that are not yet being loaded.
    <dt> <b>Returns:</b>
    <dd> the bitwise inclusive <b>OR</b> of the status of
                            all of the media with the specified
                            identifier that are being tracked.
    <dt> <b>See Also:</b>
    <dd> <a href="#statusAll(boolean)">statusAll</a>, <a href="#LOADING">LOADING</a>, <a href="#ABORTED">ABORTED</a>, <a href="#ERRORED">ERRORED</a>, <a href="#COMPLETE">COMPLETE</a>
  </dl></dd>
</dl>
<a name="removeImage(java.awt.Image)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="removeImage"><b>removeImage</b></a>
<pre>
 public synchronized void removeImage(<a href="java.awt.Image.html#_top_">Image</a> image)
</pre>
<dl>
  <dd> Remove the specified image from this media tracker.
 All instances of the specified image are removed, 
 regardless of scale or ID.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> image - the image to be removed
    <dt> <b>See Also:</b>
    <dd> <a href="#removeImage(java.awt.Image, int)">removeImage</a>, <a href="#removeImage(java.awt.Image, int, int, int)">removeImage</a>
  </dl></dd>
</dl>
<a name="removeImage(java.awt.Image, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="removeImage"><b>removeImage</b></a>
<pre>
 public synchronized void removeImage(<a href="java.awt.Image.html#_top_">Image</a> image,
                                      int id)
</pre>
<dl>
  <dd> Remove the specified image from the specified tracking 
 ID of this media tracker.
 All instances of <code>Image</code> being tracked 
 under the specified ID are removed regardless of scale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> image - the image to be removed.
    <dd> id - the tracking ID frrom which to remove the image.
    <dt> <b>See Also:</b>
    <dd> <a href="#removeImage(java.awt.Image)">removeImage</a>, <a href="#removeImage(java.awt.Image, int, int, int)">removeImage</a>
  </dl></dd>
</dl>
<a name="removeImage(java.awt.Image, int, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="removeImage"><b>removeImage</b></a>
<pre>
 public synchronized void removeImage(<a href="java.awt.Image.html#_top_">Image</a> image,
                                      int id,
                                      int width,
                                      int height)
</pre>
<dl>
  <dd> Remove the specified image with the specified 
 width, height, and ID from this media tracker.
 Only the specified instance (with any duplicates) is removed.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> image - the image to be removed
    <dd> id - the tracking ID from which to remove the image.
    <dd> width - the width to remove (-1 for unscaled).
    <dd> height - the height to remove (-1 for unscaled).
    <dt> <b>See Also:</b>
    <dd> <a href="#removeImage(java.awt.Image)">removeImage</a>, <a href="#removeImage(java.awt.Image, int)">removeImage</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.List.html#_top_">Previous</a>  <a href="java.awt.Menu.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
