Xj3D 2.0 VRML/X3D Code API

org.xj3d.ui.awt.widgets
Class IconLoader

java.lang.Object
  extended by org.xj3d.ui.awt.widgets.IconLoader

public class IconLoader
extends java.lang.Object

A convenience class that loads Icons and images for Xj3D's internal uses and provides caching mechanisms.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Constructor Summary
IconLoader()
           
 
Method Summary
static javax.swing.ImageIcon loadIcon(java.lang.String name, ErrorReporter reporter)
          Load an icon for the named node type.
static java.awt.Image loadImage(java.lang.String name, ErrorReporter reporter)
          Load an image for the named image file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconLoader

public IconLoader()
Method Detail

loadImage

public static java.awt.Image loadImage(java.lang.String name,
                                       ErrorReporter reporter)
Load an image for the named image file. Looks in the classpath for the image so the path provided must be fully qualified relative to the classpath.

Parameters:
name - The path name to load the icon for. If not found, no image is loaded.
reporter - An error reporter to send error messages to
Returns:
An image for the named path.

loadIcon

public static javax.swing.ImageIcon loadIcon(java.lang.String name,
                                             ErrorReporter reporter)
Load an icon for the named node type. Looks in the classpath for the image. The path must be qualified relative to the classpath.

Parameters:
name - The name of the node to load the icon for. If not found, no image is loaded.
reporter - An error reporter to send error messages to
Returns:
An icon for the named type.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium