|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.ui.ImageUtilities
public class ImageUtilities
Provides utilities for images.
Constructor Summary | |
---|---|
ImageUtilities()
|
Method Summary | |
---|---|
static java.awt.Image |
createImage(java.lang.String fileName)
Returns the image in the specified file. |
static java.awt.Image |
createImage(java.lang.String fileName,
boolean waitUntilLoaded)
Returns the image in the specified file. |
static java.awt.Image |
createImageAsynchronous(java.lang.String fileName)
|
static java.awt.Image |
createImageFromJar(java.lang.String fileName,
java.lang.Class srcClass)
Lädt ein Image aus einem Jar-File und gibt es zurück. |
static javax.swing.ImageIcon |
createImageIcon(javax.swing.Icon icon,
java.awt.Color background,
int border)
|
static javax.swing.ImageIcon |
createImageIconFromJar(java.lang.String fileName,
java.lang.Class srcClass)
Lädt ein ImageIcon aus einem Jar-File und gibt es zurück. |
static void |
waitForImageData(java.awt.Image image,
java.awt.Component comp)
Waits until all the data of an Image is present. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageUtilities()
Method Detail |
---|
public static java.awt.Image createImage(java.lang.String fileName, boolean waitUntilLoaded)
If the file does not exist null is returned.
public static java.awt.Image createImage(java.lang.String fileName)
If the file does not exist null
is returned.
Do NOT use this method for images used with ImageIcons! Always use createImageAsynchronous(String)
with ImageIcons!
public static java.awt.Image createImageAsynchronous(java.lang.String fileName)
public static javax.swing.ImageIcon createImageIconFromJar(java.lang.String fileName, java.lang.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 java.awt.Image createImageFromJar(java.lang.String fileName, java.lang.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(java.awt.Image image, java.awt.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).
You should not use this method when creating an ImageIcon. ImageIcons already use a MediaTracker internally.
image
- comp
- public static javax.swing.ImageIcon createImageIcon(javax.swing.Icon icon, java.awt.Color background, int border)
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |