MediaTracker.waitForID

MediaTracker.waitForID

Class Overview | Class Members | This Package | All Packages

Syntax 1
public void waitForID( int id ) throws InterruptedException
Parameters
id
the identifier of the images to check.
Description
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.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the isErrorAny and isErrorID methods to check for errors.

Exceptions
InterruptedException if another thread has interrupted this thread.
See Also
waitForAll, isErrorAny, isErrorID



Syntax 2
public synchronized boolean waitForID( int id, long ms ) throws InterruptedException
Parameters
id
the identifier of the images to check.
ms
the length of time, in milliseconds, to wait for the loading to complete.
Description
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 ms argument has passed.

If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the statusID, isErrorID, and isErrorAny methods to check for errors.

Exceptions
InterruptedException if another thread has interrupted this thread.
See Also
waitForAll, waitForID, statusID, isErrorAny, isErrorID