Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.image.painter
Class ImageUtils

java.lang.Object
  |
  +--oracle.cabo.image.painter.ImageUtils

public class ImageUtils
extends java.lang.Object

A utility class for working with images.

ImageUtils contains utility functions for:


Method Summary
static java.awt.Image createFilteredImage(java.awt.Image baseImage, java.awt.image.ImageFilter imageFilter)
          Given an image and a filter, creates the resulting image.
static java.awt.Image getImageFromStream(java.io.InputStream in)
          Gets an image from a InputStream of image data.
static java.awt.Image getImageResource(java.lang.Class cl, java.lang.String name)
          Gets an image resource.
static java.awt.Image getNotLoadedImage()
          Returns the special "not loaded" image, indicating that an image failed to be loaded properly.
static boolean isImageLoaded(java.awt.Image image)
          Return true if the Image has been successfully loaded.
static boolean loadImage(java.awt.Image image)
          Synchronously loads a single image.
static boolean loadImages(java.awt.Image[] images)
          Synchronously loads multiple images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFilteredImage

public static java.awt.Image createFilteredImage(java.awt.Image baseImage,
                                                 java.awt.image.ImageFilter imageFilter)
Given an image and a filter, creates the resulting image.
Parameters:
baseImage - the base image
imageFilter - the image filter

getImageResource

public static java.awt.Image getImageResource(java.lang.Class cl,
                                              java.lang.String name)
Gets an image resource. If the image cannot be loaded, returns the special "not loaded" image.
Parameters:
cl - the class used to load the resource
name - the path to the resource, relative to the class

getImageFromStream

public static java.awt.Image getImageFromStream(java.io.InputStream in)
Gets an image from a InputStream of image data. If the image cannot be loaded, returns null.
Parameters:
in - The InputStream to use for loading image data. The InputStream is automatically closed once the image data is read.

getNotLoadedImage

public static java.awt.Image getNotLoadedImage()
Returns the special "not loaded" image, indicating that an image failed to be loaded properly.

isImageLoaded

public static boolean isImageLoaded(java.awt.Image image)
Return true if the Image has been successfully loaded.

Parameters:
image - Image to check for sucessful loading

Returns:
True if the image has been sucessfully loaded.

loadImage

public static boolean loadImage(java.awt.Image image)
Synchronously loads a single image.
Returns:
true if the image loaded successfully, false if it failed.

loadImages

public static boolean loadImages(java.awt.Image[] images)
Synchronously loads multiple images.
Returns:
true if all images loaded successfully, false if any failed

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.