[5951] in java-interest
Re: how does 'ImageObserver' get notified???
daemon@ATHENA.MIT.EDU (Jim Graham)
Tue Mar 5 21:09:55 1996
Date: Tue, 5 Mar 1996 16:47:14 -0800
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, dc@symbolicsoft.com
Hi Dave,
> >public abstract int getWidth(ImageObserver observer)
> > Gets the actual width of the image. If the width is not known yet then
> >the ImageObserver will be notified later and -1 will be returned.
>
>
> How is the imageobserver 'notified later'? Is a function called like
> "observer.ImageIsLoaded(img)" ?
Something like that. The exact specification of the interface and the
method it uses to notify the object can be found by reading the documentation
on the ImageObserver:
http://java.sun.com/JDK-1.0/api/java.awt.image.ImageObserver.html
Note that any class that derives from class java.awt.Component will
automatically implement the necessary interface. This includes Applet
objects.
> Is this like a callback...?
Yes, exactly.
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com