126 |
* @see {@link java.awt.image.ImageObserver} |
* @see {@link java.awt.image.ImageObserver} |
127 |
*/ |
*/ |
128 |
public boolean imageUpdate(Image img, int flags, int x, int y, |
public boolean imageUpdate(Image img, int flags, int x, int y, |
129 |
int width, int height) |
int width, int height) |
130 |
{ |
{ |
131 |
if ((flags & ABORT) != 0) |
if ((flags & ABORT) != 0) |
132 |
status = ABORTED; |
status = ABORTED; |
138 |
status = 0; |
status = 0; |
139 |
|
|
140 |
synchronized (MediaTracker.this) |
synchronized (MediaTracker.this) |
141 |
{ |
{ |
142 |
MediaTracker.this.notifyAll(); |
MediaTracker.this.notifyAll(); |
143 |
} |
} |
144 |
|
|
272 |
while (e != null) |
while (e != null) |
273 |
{ |
{ |
274 |
if ((e.status & ERRORED) != 0) |
if ((e.status & ERRORED) != 0) |
275 |
return true; |
return true; |
276 |
e = e.next; |
e = e.next; |
277 |
} |
} |
278 |
return false; |
return false; |
291 |
while (e != null) |
while (e != null) |
292 |
{ |
{ |
293 |
if ((e.status & ERRORED) != 0) |
if ((e.status & ERRORED) != 0) |
294 |
{ |
{ |
295 |
if (result == null) |
if (result == null) |
296 |
result = new ArrayList(); |
result = new ArrayList(); |
297 |
result.add(e.image); |
result.add(e.image); |
298 |
} |
} |
299 |
e = e.next; |
e = e.next; |
300 |
} |
} |
301 |
if (result == null) |
if (result == null) |
344 |
synchronized (this) |
synchronized (this) |
345 |
{ |
{ |
346 |
while (result == false) |
while (result == false) |
347 |
{ |
{ |
348 |
wait(ms); |
wait(ms); |
349 |
result = checkAll(true); |
result = checkAll(true); |
350 |
if ((System.currentTimeMillis() - start) > ms) |
if ((System.currentTimeMillis() - start) > ms) |
351 |
break; |
break; |
352 |
} |
} |
353 |
} |
} |
354 |
|
|
355 |
return result; |
return result; |
380 |
e.status = LOADING; |
e.status = LOADING; |
381 |
} |
} |
382 |
result |= e.status; |
result |= e.status; |
383 |
e = e.next; |
e = e.next; |
384 |
} |
} |
385 |
return result; |
return result; |
386 |
} |
} |
453 |
while (e != null) |
while (e != null) |
454 |
{ |
{ |
455 |
if (e.id == id && ((e.status & ERRORED) != 0)) |
if (e.id == id && ((e.status & ERRORED) != 0)) |
456 |
return true; |
return true; |
457 |
e = e.next; |
e = e.next; |
458 |
} |
} |
459 |
return false; |
return false; |
475 |
while (e != null) |
while (e != null) |
476 |
{ |
{ |
477 |
if (e.id == id && ((e.status & ERRORED) != 0)) |
if (e.id == id && ((e.status & ERRORED) != 0)) |
478 |
{ |
{ |
479 |
if (result == null) |
if (result == null) |
480 |
result = new ArrayList(); |
result = new ArrayList(); |
481 |
result.add(e.image); |
result.add(e.image); |
482 |
} |
} |
483 |
e = e.next; |
e = e.next; |
484 |
} |
} |
485 |
if (result == null) |
if (result == null) |
534 |
synchronized (this) |
synchronized (this) |
535 |
{ |
{ |
536 |
while (result == false) |
while (result == false) |
537 |
{ |
{ |
538 |
wait(ms); |
wait(ms); |
539 |
result = checkID(id, true); |
result = checkID(id, true); |
540 |
if ((System.currentTimeMillis() - start) > ms) |
if ((System.currentTimeMillis() - start) > ms) |
541 |
break; |
break; |
542 |
} |
} |
543 |
} |
} |
544 |
|
|
545 |
return result; |
return result; |
564 |
while (e != null) |
while (e != null) |
565 |
{ |
{ |
566 |
if (e.id == id) |
if (e.id == id) |
567 |
{ |
{ |
568 |
if (load && e.status == 0) |
if (load && e.status == 0) |
569 |
{ |
{ |
570 |
boolean complete = target.prepareImage(e.image, e); |
boolean complete = target.prepareImage(e.image, e); |
574 |
e.status = LOADING; |
e.status = LOADING; |
575 |
} |
} |
576 |
result |= e.status; |
result |= e.status; |
577 |
} |
} |
578 |
e = e.next; |
e = e.next; |
579 |
} |
} |
580 |
return result; |
return result; |
581 |
} |
} |