|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectfr.umlv.platform.Images
public class Images extends java.lang.Object
A helper class for loading and croping images.
| Modifier and Type | Method and Description |
|---|---|
static java.awt.image.BufferedImage |
createCompatibleMirrorImage(java.awt.image.BufferedImage image)
Create a new image that is the mirror along the right border of the image taken as argument; |
static java.awt.image.BufferedImage |
createCompatibleSubImage(java.awt.image.BufferedImage image,
int x,
int y,
int width,
int height)
Copied a chunk of an image into a new image created a format compatible with the default screen configuration. |
static java.awt.image.BufferedImage |
loadImage(java.lang.Class<?> baseClass,
java.lang.String filename)
Loads an image from a file in a directory or in a jar. |
static java.awt.image.BufferedImage |
loadImage(java.io.File file)
Deprecated. you should use loadImage(Class, String) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
@Deprecated
public static java.awt.image.BufferedImage loadImage(java.io.File file)
throws java.io.IOException
loadImage(Class, String) instead.
Image.flush() when the image
is not needed anymore.
file - a file containing an image.java.io.IOException - if the file is not found or the field doesn't contain an image.
public static java.awt.image.BufferedImage loadImage(java.lang.Class<?> baseClass,
java.lang.String filename)
throws java.io.IOException
Image.flush() when the image
is not needed anymore.
baseClass - class that will be used to find the package in which
the image will be looked up.filename - the name of the image file or a relative path to the image file.java.io.IOException - if the file is not found or the field doesn't contain an image.
public static java.awt.image.BufferedImage createCompatibleSubImage(java.awt.image.BufferedImage image,
int x,
int y,
int width,
int height)
widthxheight.
image - the source image.x - offset along x-axis in the source image.y - offset along y-axis in the source image.width - width of the destination image and of the zone of the source image that will be copied.height - height of the destination image and of the zone of the source image that will be copied.public static java.awt.image.BufferedImage createCompatibleMirrorImage(java.awt.image.BufferedImage image)
image - the image to be mirrored.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||