O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ImageConsumer Properties

In “The ImageConsumer Interface”, we briefly discussed ImageConsumer.setProperties(), which can be used to set properties associated with an image consumer. setProperties() is a somewhat of an odd method because there is no corresponding getProperties(). Properties are used mainly as a debugging technique and are typically viewed in a debugger. If you wish to view the properties associated with an image filter without the aid of a debugger, you must implement a filter that overrides setProperties() and prints out the properties.

For example, we can modify the applet listed in Example 6-3 so that the properties associated with the ReplicateScaleFilter are printed out. First, an extension of java.awt.image.ImageFilter

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required