public class ImageHandler extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static Cursor | brokenCursor | 
| static Icon | brokenIcon | 
| static Image | brokenImage | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | ImageHandler() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Cursor | getBestCursor(String name,
             Class<?> clazz,
             int width,
             int height)Create the best cursor by  reading from a URL, with hotspot (0,0). | 
| static Cursor | getBestCursor(String name,
             Class<?> clazz,
             int width,
             int height,
             int x,
             int y)Create the best cursor by  reading from a URL, with hotspot (x, y). | 
| static Cursor | getCursor(String name,
         Class<?> clazz)Convenience routine, equivalent to getCursor(clazz.getResource(name));
 As an additional convenience, if the name does not contain an extension (eg .gif)
 then a list of common extensions will be tried. | 
| static Cursor | getCursor(String name,
         Class<?> clazz,
         int x,
         int y)Convenience routine, equivalent to getCursor(clazz.getResource(name));
 As an additional convenience, if the name does not contain an extension (eg .gif)
 then a list of common extensions will be tried. | 
| static Cursor | getCursor(URL url)Create a cursor by reading from a URL, with hotspot (0,0). | 
| static Cursor | getCursor(URL url,
         int x,
         int y)Create a cursor by reading from a URL | 
| static Icon | getIcon(String name,
       Class<?> clazz)Convenience routine, equivalent to getIcon(clazz.getResource(name));
 As an additional convenience, if the name does not contain an extension (eg .gif)
 then a list of common extensions will be tried. | 
| static Icon | getIcon(URL url)Create an Icon by reading from a URL | 
| static Image | getImage(String name,
        Class<?> clazz)Convenience routine, equivalent to getImage(clazz.getResource(name));
 As an additional convenience, if the name does not contain an extension (eg .gif)
 then a list of common extensions will be tried. | 
| static Image | getImage(URL url)Load an image from a URL. | 
public static final Image brokenImage
public static final Cursor brokenCursor
public static final Icon brokenIcon
public static Image getImage(URL url)
url - The url of the image to load.public static Cursor getBestCursor(String name, Class<?> clazz, int width, int height)
public static Cursor getBestCursor(String name, Class<?> clazz, int width, int height, int x, int y)
name - URL of the cursorclazz - Class to be used for getting resourcewidth - suggested widthheight - suggested heightx - hotspoty - hotspotpublic static Cursor getCursor(URL url)
url - The URL to readpublic static Cursor getCursor(URL url, int x, int y)
url - The URL to readx - x position of hotspoty - y position of hotspotpublic static Icon getIcon(URL url)
url - The URL to readpublic static Image getImage(String name, Class<?> clazz)
name - The relative address of the image to loadclazz - The class from which the address is basedpublic static Cursor getCursor(String name, Class<?> clazz)
name - The relative address of the cursor to loadclazz - The class from which the address is basedpublic static Cursor getCursor(String name, Class<?> clazz, int x, int y)
name - The relative address of the cursor to loadclazz - The class from which the address is basedx - hotspoty - hotspotpublic static Icon getIcon(String name, Class<?> clazz)
name - The relative address of the icon to loadclazz - The class from which the address is basedCopyright © 2014. All rights reserved.