jbcl.util Package
java.lang.Object +----com.borland.jbcl.util.ImageLoader
Properties Methods
Implements Serializable
The ImageLoader
component is a utility that loads images from a variety of sources including URLs, resources, and BLOBs. There are two methods for loading images from each source type; one returns the image as it is loading, and the other waits until the image is loaded before the method returns.
public static int getBlobImageCacheLimit()
public static Image getDisabledImage(Component component, Image image)
public static int getDisabledImageCacheLimit()
public static int getUrlImageCacheLimit()
public static Image load(String path, Component component)Loads the specified image into the specified component, returning the image.
Parameters:
path
component
public static Image load(String path, Component component, boolean wait)Loads the specified image into the specified component, returning the image. If
wait
is true, the image doesn't return until the image is fully loaded.
Parameters:
path
component
wait
public static Image load(URL url, Component component)Loads the image specified with an URL into the specified component, returning the image.
Parameters:
url
component
public static Image load(URL url, Component component, boolean wait)Loads the image specified with an URL into the specified component, returning the image. If
wait
is true, the image doesn't return until the image is fully loaded.
Parameters:
url
component
wait
public static Image loadFromBlob(Object object, Component component)
public static Image loadFromBlob(Object object, Component component, boolean wait)
public static Image loadFromPath(SearchPath path, String name, Component component)Loads the image specified with a search path and file name into the specified component, returning the image.
Parameters:
path
name
component
public static Image loadFromPath(SearchPath path, String name, Component component, boolean wait)Loads the image specified with a search path and file name into the specified component, returning the image. If
wait
is true, the image doesn't return until the image is fully loaded.
Parameters:
path
name
component
wait
public static Image loadFromResource(String name, Component component)Loads the specified image from a resource file into the specified component, returning the image.
Parameters:
name
component
public static Image loadFromResource(String name, Component component, Class cl)Loads the specified image from a resource file into the specified component, returning the image. This method is called from the previous
loadFromResource()
method.
Parameters:
name
component
class
public static Image loadFromResource(String name, Class cl)
public static void setBlobImageCacheLimit(int limit)
public static void setDisabledImageCacheLimit(int limit)
public static void setUrlImageCacheLimit(int limit)
public static boolean waitForImage(Component component, Image image)Called by the load methods that wait for the image to load before returning the image.
waitForImage()
returns true if no error occurs and causes the called method to pause as the image is loaded.