java.lang.Object
java.awt.Image
java.awt.image.AbstractMultiResolutionImage
java.awt.image.BaseMultiResolutionImage
- All Implemented Interfaces:
- MultiResolutionImage
public class BaseMultiResolutionImage extends AbstractMultiResolutionImage
This class is an array-based implementation of
 the 
AbstractMultiResolutionImage class.
 This class will implement the
 getResolutionVariant(double destImageWidth, double destImageHeight)
 method using a simple algorithm which will return the first image variant
 in the array that is large enough to satisfy the rendering request. The
 last image in the array will be returned if no suitable image is found
 that is as large as the rendering request.
 For best effect the array of images should be sorted with each image being both wider and taller than the previous image. The base image need not be the first image in the array. No exception will be thrown if the images are not sorted as suggested.
- Since:
- 9
- See Also:
- Image,- MultiResolutionImage,- AbstractMultiResolutionImage
- 
Field SummaryFields declared in class java.awt.ImageaccelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
- 
Constructor SummaryConstructors Constructor Description BaseMultiResolutionImage(int baseImageIndex, Image... resolutionVariants)Creates a multi-resolution image with the given base image index and resolution variants.BaseMultiResolutionImage(Image... resolutionVariants)Creates a multi-resolution image with the given resolution variants.
- 
Method SummaryMethods declared in class java.awt.image.AbstractMultiResolutionImagegetBaseImage, getGraphics, getHeight, getProperty, getSource, getWidthMethods declared in class java.awt.Imageflush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriorityMethods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface java.awt.image.MultiResolutionImagegetResolutionVariant, getResolutionVariants
- 
Constructor Details- 
BaseMultiResolutionImageCreates a multi-resolution image with the given resolution variants. The first resolution variant is used as the base image.- Parameters:
- resolutionVariants- array of resolution variants sorted by image size
- Throws:
- IllegalArgumentException- if null or zero-length array is passed
- NullPointerException- if the specified- resolutionVariantscontains one or more null elements
- Since:
- 9
 
- 
BaseMultiResolutionImageCreates a multi-resolution image with the given base image index and resolution variants.- Parameters:
- baseImageIndex- the index of base image in the resolution variants array
- resolutionVariants- array of resolution variants sorted by image size
- Throws:
- IllegalArgumentException- if null or zero-length array is passed
- NullPointerException- if the specified- resolutionVariantscontains one or more null elements
- IndexOutOfBoundsException- if- baseImageIndexis negative or greater than or equal to- resolutionVariantslength.
- Since:
- 9
 
 
-