fr.ove.openmath.jome.ctrlview.bidim.images
Class ImageLoader

java.lang.Object
  extended byfr.ove.openmath.jome.ctrlview.bidim.images.ImageLoader
All Implemented Interfaces:
java.io.Serializable

public class ImageLoader
extends java.lang.Object
implements java.io.Serializable

This class is a little tool to load images.

Version:
1.0 17/02/99
Author:
© 1998 DIRAT Laurent
See Also:
Serialized Form

Constructor Summary
ImageLoader(java.awt.Component component)
          The Constructor.
 
Method Summary
static boolean exists(java.lang.String idImage)
          Checks if there exist an image with the specified identifier.
static float getBaseline(java.lang.String idImage)
          Returns the baseline of the wanted image.
static float getBottomInset(java.lang.String idImage)
           
static float getHeightFactor(java.lang.String idImage)
          Returns the height factor to apply to the orignal size of the wanted image.
static java.awt.Image getImage(java.lang.String name)
          Returns the image with the specified name.
static float getLeftInset(java.lang.String idImage)
           
static float getRightInset(java.lang.String idImage)
           
static float getTopInset(java.lang.String idImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLoader

public ImageLoader(java.awt.Component component)
The Constructor.
This constructor is used in the case of an application, and not an applet such as the precedent does.

Parameters:
component - the component which needs the images to load.
Method Detail

getImage

public static java.awt.Image getImage(java.lang.String name)
Returns the image with the specified name.

Parameters:
name - the name of the desired image.
Returns:
the desired image.

getHeightFactor

public static float getHeightFactor(java.lang.String idImage)
Returns the height factor to apply to the orignal size of the wanted image.

Parameters:
idImage - the identifier of the wanted image

getBaseline

public static float getBaseline(java.lang.String idImage)
Returns the baseline of the wanted image. If the returned value equals -1n the baseline corresponds the one of the current font.

Parameters:
idImage - the identifier of the wanted image

getTopInset

public static float getTopInset(java.lang.String idImage)
Parameters:
idImage - the identifier of the wanted image

getBottomInset

public static float getBottomInset(java.lang.String idImage)
Parameters:
idImage - the identifier of the wanted image

getLeftInset

public static float getLeftInset(java.lang.String idImage)
Parameters:
idImage - the identifier of the wanted image

getRightInset

public static float getRightInset(java.lang.String idImage)
Parameters:
idImage - the identifier of the wanted image

exists

public static boolean exists(java.lang.String idImage)
Checks if there exist an image with the specified identifier.

Parameters:
idImage - the identifier of the wanted image


Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.