borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.util 

ImageLoader class

java.lang.Object
   +----borland.jbcl.util.ImageLoader

About the ImageLoader class

Properties  Methods  

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

Properties implemented in java.lang.Object

ImageLoader methods

Methods implemented in this class

Methods implemented in java.lang.Object


ImageLoader methods

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.

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.

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.