|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.freehep.util.images.ImageHandler
A convenience class for handling images. Maintains a cache of images suitable for small icons which may be reused often.
Field Summary | |
static Cursor |
brokenCursor
|
static Icon |
brokenIcon
|
static Image |
brokenImage
|
Constructor Summary | |
protected |
ImageHandler()
|
Method Summary | |
static Cursor |
getBestCursor(String name,
Class clazz,
int width,
int height)
Create the best cursor by reading from a URL, with hostpot (0,0). |
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(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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Image brokenImage
public static final Cursor brokenCursor
public static final Icon brokenIcon
Constructor Detail |
protected ImageHandler()
Method Detail |
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)
name
- URL of the cursorclazz
- Class to be used for getting resourcewidth
- suggested widthheight
- suggested height
public static Cursor getCursor(URL url)
url
- The URL to read
public static Cursor getCursor(URL url, int x, int y)
url
- The URL to readx
- x position of hotspoty
- y position of hotspot
public static Icon getIcon(URL url)
url
- The URL to read
public static Image getImage(String name, Class clazz)
name
- The relative address of the image to loadclazz
- The class from which the address is based
public static Cursor getCursor(String name, Class clazz)
name
- The relative address of the cursor to loadclazz
- The class from which the address is based
public static Icon getIcon(String name, Class clazz)
name
- The relative address of the icon to loadclazz
- The class from which the address is based
|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |