Fields Summary |
---|
public static final Object | UndefinedPropertyThe UndefinedProperty object should be returned if property is not
defined for a particular image. |
public static final int | SCALE_DEFAULTThe Constant SCALE_DEFAULT indicates the default image scaling algorithm. |
public static final int | SCALE_FASTThe Constant SCALE_FAST indicates an image scaling algorithm which places
a higher priority on scaling speed than on the image's smoothness. |
public static final int | SCALE_SMOOTHThe Constant SCALE_SMOOTH indicates an image scaling algorithm which
places a higher priority on image smoothness than on scaling speed. |
public static final int | SCALE_REPLICATEThe Constant SCALE_REPLICATE indicates the image scaling algorithm in the
ReplicateScaleFilter class. |
public static final int | SCALE_AREA_AVERAGINGThe Constant SCALE_AREA_AVERAGING indicates the area averaging image
scaling algorithm. |
protected float | accelerationPriorityThe acceleration priority indicates image acceleration. |
private static final ImageCapabilities | capabilitiesThe Constant capabilities. |
Methods Summary |
---|
public abstract void | flush()Flushes resources which are used by this Image object. This method resets
the image to the reconstructed state from the image's source.
|
public float | getAccelerationPriority()Gets the acceleration priority of this image.
return accelerationPriority;
|
public java.awt.ImageCapabilities | getCapabilities(java.awt.GraphicsConfiguration gc)Gets an ImageCapabilities object of this Image object for the specified
GraphicsConfiguration.
// Note: common image is not accelerated.
return capabilities;
|
public abstract java.awt.Graphics | getGraphics()Gets a Graphics object for rendering this image. This method can be used
for off-screen images.
|
public abstract int | getHeight(java.awt.image.ImageObserver observer)Gets the height of this image. The specified ImageObserver object is
notified when the height of this image is available.
|
public abstract java.lang.Object | getProperty(java.lang.String name, java.awt.image.ImageObserver observer)Gets the image property with the specified name. The UndefinedProperty
object should be return if the property is not specified for this image.
The return value should be null if the property is currently unknown yet
and the specified ImageObserver is to be notified later.
|
public java.awt.Image | getScaledInstance(int width, int height, int hints)Gets the scaled instance of this Image. This method returns an Image
object constructed from the source of this image with the specified
width, height, and applied scaling algorithm.
ImageFilter filter;
if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
filter = new AreaAveragingScaleFilter(width, height);
} else {
filter = new ReplicateScaleFilter(width, height);
}
ImageProducer producer = new FilteredImageSource(getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(producer);
|
public abstract java.awt.image.ImageProducer | getSource()Gets the ImageProducer object which represents data of this Image.
|
public abstract int | getWidth(java.awt.image.ImageObserver observer)Gets the width of this image. The specified ImageObserver object is
notified when the width of this image is available.
|
public void | setAccelerationPriority(float priority)Sets the acceleration priority for this image.
if (priority < 0 || priority > 1) {
// awt.10A=Priority must be a value between 0 and 1, inclusive
throw new IllegalArgumentException(Messages.getString("awt.10A")); //$NON-NLS-1$
}
accelerationPriority = priority;
|