APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.awt.image

public Class MultiResolutionToolkitImage

extends ToolkitImage
implements MultiResolutionImage
Class Inheritance
All Implemented Interfaces
java.awt.image.MultiResolutionImage
Imports
java.awt.Image, java.awt.image.ImageObserver, .MultiResolutionImage, java.lang.ref.WeakReference, java.util.Arrays, .List, .Map, .WeakHashMap, java.util.function.Function

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final int
pack-priv Image
Inherited from sun.awt.image.ToolkitImage:
imagerepsourcesrc

Constructor Summary

AccessConstructor and Description
public
MultiResolutionToolkitImage(Image lowResolutionImage, Image resolutionVariant)

Method Summary

Modifier and TypeMethod and Description
private static void
checkSize(double width, double height)

public Image
getResolutionVariant(double destWidth, double destHeight)

Implements java.awt.image.MultiResolutionImage.getResolutionVariant.

Gets a specific image that is the best variant to represent this logical image at the indicated size.

public Image
public static ImageObserver
getResolutionVariantObserver(final Image image, final ImageObserver observer, final int imgWidth, final int imgHeight, final int rvWidth, final int rvHeight)

public static ImageObserver
getResolutionVariantObserver(final Image image, final ImageObserver observer, final int imgWidth, final int imgHeight, final int rvWidth, final int rvHeight, boolean concatenateInfo)

public List<Image>
getResolutionVariants()

Implements java.awt.image.MultiResolutionImage.getResolutionVariants.

Gets a readable list of all resolution variants.

public static Image
Inherited from sun.awt.image.ToolkitImage:
addInfocheckflushgetBufferedImagegetColorModelgetGraphicsgetHeightgetHeightgetImageRepgetPropertygetSourcegetWidthgetWidthhasErrorinfoDonemakeImageReppreloadsetAccelerationPrioritysetDimensionssetProperties

Field Detail

BITS_INFOback to summary
private static final int BITS_INFO
resolutionVariantback to summary
pack-priv Image resolutionVariant

Constructor Detail

MultiResolutionToolkitImageback to summary
public MultiResolutionToolkitImage(Image lowResolutionImage, Image resolutionVariant)

Method Detail

checkSizeback to summary
private static void checkSize(double width, double height)
getResolutionVariantback to summary
public Image getResolutionVariant(double destWidth, double destHeight)

Implements java.awt.image.MultiResolutionImage.getResolutionVariant.

Doc from java.awt.image.MultiResolutionImage.getResolutionVariant.

Gets a specific image that is the best variant to represent this logical image at the indicated size.

Annotations
@Override
getResolutionVariantback to summary
public Image getResolutionVariant()
getResolutionVariantObserverback to summary
public static ImageObserver getResolutionVariantObserver(final Image image, final ImageObserver observer, final int imgWidth, final int imgHeight, final int rvWidth, final int rvHeight)
getResolutionVariantObserverback to summary
public static ImageObserver getResolutionVariantObserver(final Image image, final ImageObserver observer, final int imgWidth, final int imgHeight, final int rvWidth, final int rvHeight, boolean concatenateInfo)
getResolutionVariantsback to summary
public List<Image> getResolutionVariants()

Implements java.awt.image.MultiResolutionImage.getResolutionVariants.

Doc from java.awt.image.MultiResolutionImage.getResolutionVariants.

Gets a readable list of all resolution variants. The list must be nonempty and contain at least one resolution variant.

Note that many implementations might return an unmodifiable list.

Annotations
@Override
mapback to summary
public static Image map(MultiResolutionToolkitImage mrImage, Function<Image, Image> mapper)
sun.awt.image back to summary

private final Class MultiResolutionToolkitImage.ObserverCache

extends Object
implements ImageObserver
Class Inheritance
All Implemented Interfaces
java.awt.image.ImageObserver

Field Summary

Modifier and TypeField and Description
private final boolean
private final WeakReference<Image>
private static final Map<ImageObserver, ImageObserver>
private final WeakReference<ImageObserver>

Constructor Summary

AccessConstructor and Description
private
ObserverCache(ImageObserver obs, boolean concat, Image img)

Method Summary

Modifier and TypeMethod and Description
public boolean
imageUpdate(Image img, int infoflags, int x, int y, int width, int height)

Implements java.awt.image.ImageObserver.imageUpdate.

This method is called when information about an image which was previously requested using an asynchronous interface becomes available.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

concatback to summary
private final boolean concat
imageRefback to summary
private final WeakReference<Image> imageRef
INSTANCEback to summary
private static final Map<ImageObserver, ImageObserver> INSTANCE
observerRefback to summary
private final WeakReference<ImageObserver> observerRef

Constructor Detail

ObserverCacheback to summary
private ObserverCache(ImageObserver obs, boolean concat, Image img)

Method Detail

imageUpdateback to summary
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)

Implements java.awt.image.ImageObserver.imageUpdate.

Doc from java.awt.image.ImageObserver.imageUpdate.

This method is called when information about an image which was previously requested using an asynchronous interface becomes available. Asynchronous interfaces are method calls such as getWidth(ImageObserver) and drawImage(img, x, y, ImageObserver) which take an ImageObserver object as an argument. Those methods register the caller as interested either in information about the overall image itself (in the case of getWidth(ImageObserver)) or about an output version of an image (in the case of the drawImage(img, x, y, [w, h,] ImageObserver) call).

This method should return true if further updates are needed or false if the required information has been acquired. The image which was being tracked is passed in using the img argument. Various constants are combined to form the infoflags argument which indicates what information about the image is now available. The interpretation of the x, y, width, and height arguments depends on the contents of the infoflags argument.

The infoflags argument should be the bitwise inclusive OR of the following flags: WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT.

Annotations
@Override