API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. MediaTracker View Source
Author(s)
Jim Graham
Since
JDK1.0
Version
1.44, 11/17/05
Serial
Hierarchy
 Object
      MediaTracker
Implements
 Serializable
Subclasses
Description
public class MediaTracker
  The MediaTracker class is a utility class to track the status of a number of media objects.
See also:   
Constructors
public MediaTracker (Component comp)
  Creates a media tracker to track images for a given component.
Methods
Hide/Show inherited methods
public void addImage (Image image, int id)
  Adds an image to the list of images being tracked by this media tracker.
publicsynchronized void addImage (Image image, int id, int w, int h)
  Adds a scaled image to the list of images being tracked by this media tracker.
public boolean checkAll ()
  Checks to see if all images being tracked by this media tracker have finished loading.
public boolean checkAll (boolean load)
  Checks to see if all images being tracked by this media tracker have finished loading.
public boolean checkID (int id)
  Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
public boolean checkID (int id, boolean load)
  Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading.
publicsynchronized Object getErrorsAny ()
  Returns a list of all media that have encountered an error.
publicsynchronized Object getErrorsID (int id)
  Returns a list of media with the specified ID that have encountered an error.
publicsynchronized boolean isErrorAny ()
  Checks the error status of all of the images.
publicsynchronized boolean isErrorID (int id)
  Checks the error status of all of the images tracked by this media tracker with the specified identifier.
publicsynchronized void removeImage (Image image)
  Removes the specified image from this media tracker.
publicsynchronized void removeImage (Image image, int id)
  Removes the specified image from the specified tracking ID of this media tracker.
publicsynchronized void removeImage (Image image, int id, int width, int height)
  Removes the specified image with the specified width, height, and ID from this media tracker.
pack-privatesynchronized void setDone ()
public int statusAll (boolean load)
  Calculates and returns the bitwise inclusive OR of the status of all media that are tracked by this media tracker.
public int statusID (int id, boolean load)
  Calculates and returns the bitwise inclusive OR of the status of all media with the specified identifier that are tracked by this media tracker.
public void waitForAll () throws InterruptedException
  Starts loading all images tracked by this media tracker.
publicsynchronized boolean waitForAll (long ms) throws InterruptedException
  Starts loading all images tracked by this media tracker.
public void waitForID (int id) throws InterruptedException
  Starts loading all images tracked by this media tracker with the specified identifier.
publicsynchronized boolean waitForID (int id, long ms) throws InterruptedException
  Starts loading all images tracked by this media tracker with the specified identifier.
Fields
Hide/Show inherited fields
publicfinalstatic int ABORTED = "2"
  Flag indicating that the downloading of media was aborted.
publicfinalstatic int COMPLETE = "8"
  Flag indicating that the downloading of media was completed successfully.
pack-privatefinalstatic int DONE = "14"
publicfinalstatic int ERRORED = "4"
  Flag indicating that the downloading of media encountered an error.
pack-private MediaEntry head
  The head of the list of Images that is being tracked by the MediaTracker.
publicfinalstatic int LOADING = "1"
  Flag indicating that media is currently being loaded.
pack-private Component target
  A given Component that will be tracked by a media tracker where the image will eventually be drawn.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar