com.davisor.graphics
Class ImageSizeObserver
java.lang.Object
com.davisor.graphics.ImageSizeObserver
- All Implemented Interfaces:
- java.awt.image.ImageObserver
- public class ImageSizeObserver
- extends java.lang.Object
- implements java.awt.image.ImageObserver
ImageSizeObserver implements a tool to resolve an image size in an
asynchronous image loading environment.
- Since:
- JDK1.2
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
|
Constructor Summary |
ImageSizeObserver(java.awt.Image image)
Creates an image size observer for the given image. |
|
Method Summary |
int |
getHeight()
Gets the image height. |
int |
getWidth()
Gets the image width. |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageSizeObserver
public ImageSizeObserver(java.awt.Image image)
- Creates an image size observer for the given image.
- Parameters:
image - image to measure width and height from
getHeight
public int getHeight()
throws java.lang.InterruptedException
- Gets the image height. If the height information is not readily
available, then the method waits until it is, or until it is
certain that the information never will be available. If that
case, the returned image height will be zero.
- Throws:
java.lang.InterruptedException - if the size resolvation was interrupted
getWidth
public int getWidth()
throws java.lang.InterruptedException
- Gets the image width. If the width information is not readily
available, the method waits until it is, or until it is certain
that the information never will be available. If that case, the
returned image width will be zero.
- Throws:
java.lang.InterruptedException - if the size resolvation was
interrupted
imageUpdate
public boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
- Specified by:
imageUpdate in interface java.awt.image.ImageObserver
Copyright © 2001-2004 Davisor Oy. All Rights Reserved.