Re: Using ImageObserver instead of MediaTracker
- From: Andrew Thompson <SeeMySites@xxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 17:03:14 GMT
On Mon, 15 Aug 2005 21:55:39 -0700, Knute Johnson wrote:
> Andrew Thompson wrote:
>>
>> [1] If there is more that one image, it makes more sense to
>> - Instantiate *every* Image (Images load asynchronously)..
>> - Add *every* image to the MediaTracker before you, ..
>> - MediaTracker.waitForAll()
...
> Why Andrew? I think that MediaTracker has become sort of a Java Urban
> Legend. The ImageObserver interface works just fine and you can load as
> many images as you want with that method.
OK. I'll presume you are right on that[1].
I was pretty much saying that the method the OP used
was inefficient, *presuming* they were going to stick
with the MediaTracker.
My reasoning was simply that it would be faster to add
all images to the MediaTracker before calling any of
the 'wait()' methods.
[1] I have no reason to doubt you, you have far more
experience with images than me.
> ..With
> MediaTracker you change the normal behavior of loading asynchronously
> and force them to load synchronously. For what purpose? Use the
> ImageObserver and the images paint when they are available.
Having said that.. Perhaps it was a bad idea to focus on the
MediaTracker at all, especially since I do not think we ever
heard the OP say that an ImageObserver implementation was not
readily available within the ..what is it you were coding?
[ I think I've lost the thread! :-O ]
--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"You can blow out a candle, but you can't blow out a fire. Once the flame
begin to catch, the wind will blow it higher." Peter Gabriel 'Biko'
.
- Follow-Ups:
- Re: Using ImageObserver instead of MediaTracker
- From: Knute Johnson
- Re: Using ImageObserver instead of MediaTracker
- References:
- Re: Using ImageObserver instead of MediaTracker
- From: Knute Johnson
- Re: Using ImageObserver instead of MediaTracker
- Prev by Date: Re: Applet requires page refresh
- Next by Date: Re: Help me with references
- Previous by thread: Re: Using ImageObserver instead of MediaTracker
- Next by thread: Re: Using ImageObserver instead of MediaTracker
- Index(es):
Relevant Pages
|