marg.images
Class ResUtils

java.lang.Object
  extended by marg.images.ResUtils

public class ResUtils
extends java.lang.Object


Constructor Summary
ResUtils()
           
 
Method Summary
static java.awt.image.BufferedImage getBufferedImage(java.lang.String name)
          Finds, reads and returns an image that can be accessed by class code in a way that is independent of the location of the code.
static javax.swing.ImageIcon getImageIcon(java.lang.String name)
           
static java.net.URL getURL(java.lang.String name)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResUtils

public ResUtils()
Method Detail

getURL

public static java.net.URL getURL(java.lang.String name)

getImageIcon

public static javax.swing.ImageIcon getImageIcon(java.lang.String name)

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(java.lang.String name)
Finds, reads and returns an image that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a '/'-separated path name that identifies the resource. Example: "marg/images/Wheel.gif"

Parameters:
name - The / separated name of the ressource to locate the image at
Returns:
the BufferedImage constructed from the given ressource. Returns a 20x20 black placeholder if no ressource was found.

main

public static void main(java.lang.String[] args)