I almost forgot why I use bsc. To remind myself, I put a note here. BSC = Budget SuperComputer.
AWT push model I do not understand why it is called push model. Anyway, let me carry on, here are some major classes, Image, ImageProducer, ImageConsumer, and ImageObserver.
It is from java.awt class package. An Image object is obtained from some source.
Image im = getToolkit().getImage(ImageFileName);
The ultimate destination for a filtered image is an AWT Image object, created by a call to, for example, Component.createImage(). Once this consumer image has been created, it can by drawn upon the screen by calling Image.getGraphics() to obtain a Graphics object (such as a screen device), followed by Graphics.drawImage().
AWT Imaging was largely designed to facilitate the display of images in a browser environment. In this context, an image resides somewhere on the network. There is no guarantee that the image will be available when required, so the AWT model does not force image filtering or display to completion. The model is entirely a push model. An ImageConsumer can never ask for data; it must wait for the ImageProducer to "push" the data to it. Similarly, an ImageConsumer has no guarantee about when the data will be completely delivered; it must wait for a call to its ImageComplete() method to know that it has the complete image. An application can also instantiate an ImageObserver object if it wishes to be notified about completion of imaging operations.
Friday, 6 July 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment