Package com.dassault_systemes.catweb.tools.awt

   
Class ImageLoader

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catweb.tools.awt.ImageLoader
Class Location

Framework : PortalBase

Module : PLBtools

Class Description

public class ImageLoader

The ImageLoader class is a utility class to download Image from file.


 Here is an exmaple of use for an image creation and load:

     // ---- create the image from a relative file name
     Image myImage = ImageLoader.loadImagefromClassRoot("MyImage.gif");

     // --- load really myImage
     ImageLoader.waitForImage(myImage);
 

Field Summary

Constructor Summary
ImageLoader()

Method Summary
Image loadImagefromClassRoot(String fileName)
Image loadImagefromClass(String fileName, Class baseClass)
void waitForImage(Image image)
void waitForImages(Image[] images)


Field Detail

Constructor Detail

ImageLoader

    ImageLoader()


Method Detail

loadImagefromClassRoot

    Image loadImagefromClassRoot(String fileName)

Load the image specified by its fileName

Parameters:
fileName
- the filename is a relative path to the pathes of the classpath or codebase path of the application.
Returns:
the image created.

loadImagefromClass

    Image loadImagefromClass(String fileName, Class baseClass)

Load the image specified by its fileName

Parameters:
fileName
- the filename is a relative path to path of the class baseClass
Returns:
the image created.
See Also:
java.awt.MediaTracker

waitForImage

    void waitForImage(Image image)

Starts loading the image tracked by the default media tracker associated with the ImageLoader. This method waits until the image has finished loading.

Parameters:
image
- the image to load
See Also:
java.awt.MediaTracker

waitForImages

    void waitForImages(Image[] images)

Starts loading the images tracked by the default media tracker associated with the ImageLoader. This method waits until the images have finished loading.

Parameters:
images
- the images to load


Copyright © 2000, Dassault Systèmes. All rights reserved