public class ImageUtilities extends Object
Constructor and Description |
---|
ImageUtilities() |
Modifier and Type | Method and Description |
---|---|
static Image |
createImage(String fileName)
Returns the image in the specified file.
|
static Image |
createImage(String fileName,
boolean waitUntilLoaded)
Returns the image in the specified file.
|
static Image |
createImageAsynchronous(String fileName) |
static Image |
createImageFromJar(String fileName,
Class srcClass)
Lädt ein Image aus einem Jar-File und gibt es zurück.
|
static ImageIcon |
createImageIconFromJar(String fileName,
Class srcClass)
Lädt ein ImageIcon aus einem Jar-File und gibt es zurück.
|
static void |
waitForImageData(Image image,
Component comp)
Waits until all the data of an Image is present.
|
public static Image createImage(String fileName, boolean waitUntilLoaded)
If the file does not exist null is returned.
public static Image createImage(String fileName)
If the file does not exist null is returned.
public static ImageIcon createImageIconFromJar(String fileName, Class srcClass)
Ist kein ImageIcon mit diesem Namen im Jar-File, so wird versucht, es vom Dateisystem zu laden.
Wird die ImageIcon-Datei nicht gefunden, so wird null
zurück gegeben.
fileName
- Der Name der ImageIcon-Datei.srcClass
- Eine Klasse, aus deren Jar-File das ImageIcon geladen werden soll.public static Image createImageFromJar(String fileName, Class srcClass)
Ist kein Image mit diesem Namen im Jar-File, so wird versucht, es vom Dateisystem zu laden.
Wird die Image-Datei nicht gefunden, so wird null
zurück gegeben.
fileName
- Der Name der Image-Datei.srcClass
- Eine Klasse, aus deren Jar-File das Image geladen werden soll.public static void waitForImageData(Image image, Component comp)
An Image is after construction only loaded when the data is used. The loading
occurs in an extra Thread and can take some time, so it might happen, that
an Image is not present after construction (it will be painted partly).
This method waits until the whole Image is loaded. The Component
comp
is needed to monitor the preparing of the Image. You can
pass any Component (it will not be changed).
image
- comp
- TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)