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
public static Image loadImagefromClass(String fileName, Class baseClass)
Load the image specified by its fileName
public static Image loadImagefromClassRoot(String fileName)
Load the image specified by its fileName
public static void waitForImage(Image image)
Starts loading the image tracked by the default media tracker associated with the ImageLoader.
public static void waitForImages(Image[] images)
Starts loading the images tracked by the default media tracker associated with the ImageLoader.


Field Detail

Constructor Detail

ImageLoader

    ImageLoader()


Method Detail

loadImagefromClass

    public static 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
Return:
the image created.
See Also:
java.awt.MediaTracker

loadImagefromClassRoot

    public static 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.
Return:
the image created.

waitForImage

    public static 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

    public static 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