org.xulux.guilayer.swing.util
Class JimiImageLoader

java.lang.Object
  extended by org.xulux.guilayer.swing.util.JimiImageLoader
All Implemented Interfaces:
ImageLoaderInterface

public class JimiImageLoader
extends java.lang.Object
implements ImageLoaderInterface

Loads images using jimi, so also ico, xpm, etc is supported by Xulux. This is wrapped up in an interface so you don't get any strange exceptions when jimi is not there. This dependency is mainly there for jdk1.3 or lower. As from jdk1.4 images will be processed using the core.

Version:
$Id: JimiImageLoader.java,v 1.3 2004/01/28 15:09:24 mvdb Exp $
Author:
Martin van den Bemt

Constructor Summary
JimiImageLoader()
          Constructor for JimiImageLoader.
 
Method Summary
 javax.swing.ImageIcon getIcon(java.net.URL url)
          Returns the specified icon
 java.awt.Image getImage(java.net.URL url)
          For now we don't provide any exceptions or logging in case a resrouce is null.
 boolean isUsable()
          Specifies if this imageloader is usable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JimiImageLoader

public JimiImageLoader()
Constructor for JimiImageLoader.

Method Detail

getImage

public java.awt.Image getImage(java.net.URL url)
For now we don't provide any exceptions or logging in case a resrouce is null.

Specified by:
getImage in interface ImageLoaderInterface
Parameters:
url - the url to load if from
Returns:
the image
See Also:
org.xulux.nyx.swing.util.ImageLoaderInterface#getImage(java.net.URL)

getIcon

public javax.swing.ImageIcon getIcon(java.net.URL url)
Description copied from interface: ImageLoaderInterface
Returns the specified icon

Specified by:
getIcon in interface ImageLoaderInterface
Parameters:
url - the url to load if from
Returns:
the imageIcon
See Also:
org.xulux.nyx.swing.util.ImageLoaderInterface#getIcon(java.net.URL)

isUsable

public boolean isUsable()
Description copied from interface: ImageLoaderInterface
Specifies if this imageloader is usable. Eg checking if the image classes are on the classpath,etc

Specified by:
isUsable in interface ImageLoaderInterface
Returns:
false if not usable.
See Also:
org.xulux.nyx.swing.util.ImageLoaderInterface#isUsable()


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.