us.zuercher.gpx2map.image.generic
Class GenericImageFactory.SizeObserver
java.lang.Object
us.zuercher.gpx2map.image.generic.GenericImageFactory.Observer
us.zuercher.gpx2map.image.generic.GenericImageFactory.SizeObserver
- All Implemented Interfaces:
- ImageObserver
- Enclosing class:
- GenericImageFactory
private static class GenericImageFactory.SizeObserver
- extends GenericImageFactory.Observer
- implements ImageObserver
SizeObserver is an ImageObserver
that can be waited upon
to determine when an image's size data has been loaded.
Field Summary |
private int |
height
Image height, once known. |
private int |
width
Image width, once known. |
Method Summary |
boolean |
imageUpdate(Image img,
int infoflags,
int x,
int y,
int width,
int height)
Implements
ImageObserver.imageUpdate(Image, int, int, int, int, int)
and stores the width and height of the image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
width
private int width
- Image width, once known.
height
private int height
- Image height, once known.
GenericImageFactory.SizeObserver
private GenericImageFactory.SizeObserver()
imageUpdate
public boolean imageUpdate(Image img,
int infoflags,
int x,
int y,
int width,
int height)
- Implements
ImageObserver.imageUpdate(Image, int, int, int, int, int)
and stores the width and height of the image. Call
GenericImageFactory.Observer.waitOnObservation()
to wait for the dimensions to
be stored.
- Specified by:
imageUpdate
in interface ImageObserver
- Parameters:
img
- the image, not used since JavaConverter loads a single
image at a timeinfoflags
- informational flagsx
- unusedy
- unusedwidth
- image widthheight
- image height
- Returns:
- true until all necessary observations are complete