borland Packages Class Hierarchy jbcl.util Package Index
ImageLoader class
java.lang.Object
+----borland.jbcl.util.ImageLoader
About the ImageLoader class
Properties Methods
Implements Serializable
The ImageLoader class 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.
ImageLoader properties
*Read-only properties **Write-only properties
ImageLoader methods
Methods implemented in this class
- getBlobImageCacheLimit()
- getDisabledImage(java.awt.Component, java.awt.Image)
- getDisabledImageCacheLimit()
- getUrlImageCacheLimit()
- load(java.lang.String, java.awt.Component)
- load(java.lang.String, java.awt.Component, boolean)
- load(java.net.URL, java.awt.Component)
- load(java.net.URL, java.awt.Component, boolean)
- loadFromBlob(java.lang.Object, java.awt.Component)
- loadFromBlob(java.lang.Object, java.awt.Component, boolean)
- loadFromPath(borland.jbcl.util.SearchPath, java.lang.String, java.awt.Component)
- loadFromPath(borland.jbcl.util.SearchPath, java.lang.String, java.awt.Component, boolean)
- loadFromResource(java.lang.String, java.awt.Component)
- loadFromResource(java.lang.String, java.awt.Component, java.lang.Class)
- loadFromResource(java.lang.String, java.lang.Class)
- setBlobImageCacheLimit(int)
- setDisabledImageCacheLimit(int)
- setUrlImageCacheLimit(int)
- waitForImage(java.awt.Component, java.awt.Image)
ImageLoader methods
getBlobImageCacheLimit()
public static int getBlobImageCacheLimit()
getDisabledImage(java.awt.Component, java.awt.Image)
public static Image getDisabledImage(java.awt.Component component, java.awt.Image image)
getDisabledImageCacheLimit()
public static int getDisabledImageCacheLimit()
getUrlImageCacheLimit()
public static int getUrlImageCacheLimit()
load(java.lang.String, java.awt.Component)
public static Image load(java.lang.String path, java.awt.Component component)
Loads the specified image into the specified component, returning the image.
Parameters:
- path
- The string that specifies the path and file name of the image.
- component
- The component the image is loaded into.
load(java.lang.String, java.awt.Component, boolean)
public static Image load(java.lang.String path, java.awt.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
- The string that specifies the path and file name of the image.
- component
- The component the image is loaded into.
- wait
- Determines whether the method waits for the image to load before returning. If wait is true, the method waits.
load(java.net.URL, java.awt.Component)
public static Image load(java.net.URL url, java.awt.Component component)
Loads the image specified with an URL into the specified component, returning the image.
Parameters:
- url
- The URL that specifies the location of the image.
- component
- The component the image is loaded into.
load(java.net.URL, java.awt.Component, boolean)
public static Image load(java.net.URL url, java.awt.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
- The URL that specifies the location of the image.
- component
- The component the image is loaded into.
- wait
- Determines whether the method waits for the image to load before returning. If wait is true, the method waits.
loadFromBlob(java.lang.Object, java.awt.Component)
public static Image loadFromBlob(java.lang.Object object, java.awt.Component component)
loadFromBlob(java.lang.Object, java.awt.Component, boolean)
public static Image loadFromBlob(java.lang.Object object, java.awt.Component component, boolean wait)
loadFromPath(borland.jbcl.util.SearchPath, java.lang.String, java.awt.Component)
public static Image loadFromPath(borland.jbcl.util.SearchPath path, java.lang.String name, java.awt.Component component)
Loads the image specified with a search path and file name into the specified component, returning the image.
Parameters:
- path
- The search path along which the image is found.
- name
- The name of the image file.
- component
- The component the image is loaded into.
loadFromPath(borland.jbcl.util.SearchPath, java.lang.String, java.awt.Component, boolean)
public static Image loadFromPath(borland.jbcl.util.SearchPath path, java.lang.String name, java.awt.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
- The search path along which the image is found.
- name
- The name of the image file.
- component
- The component the image is loaded into.
- wait
- Determines whether the method waits for the image to load before returning. If wait is true, the method waits.
loadFromResource(java.lang.String, java.awt.Component)
public static Image loadFromResource(java.lang.String name, java.awt.Component component)
Loads the specified image from a resource file into the specified component, returning the image.
Parameters:
- name
- The string that contains the name of the image file.
- component
- The component the image is loaded into.
loadFromResource(java.lang.String, java.awt.Component, java.lang.Class)
public static Image loadFromResource(java.lang.String name, java.awt.Component component, java.lang.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
- The string that contains the name of the image file.
- component
- The component the image is loaded into.
- class
- The class name of the component.
loadFromResource(java.lang.String, java.lang.Class)
public static Image loadFromResource(java.lang.String name, java.lang.Class cl)
setBlobImageCacheLimit(int)
public static void setBlobImageCacheLimit(int limit)
setDisabledImageCacheLimit(int)
public static void setDisabledImageCacheLimit(int limit)
setUrlImageCacheLimit(int)
public static void setUrlImageCacheLimit(int limit)
waitForImage(java.awt.Component, java.awt.Image)
public static boolean waitForImage(java.awt.Component component, java.awt.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.