com.jaxfront.core.util
Class ImageHelper
java.lang.Object
com.jaxfront.core.util.ImageHelper
public class ImageHelper
- extends java.lang.Object
|
Method Summary |
static byte[] |
createByteArray(javax.swing.ImageIcon i,
java.lang.String type)
|
static byte[] |
createByteArray(java.awt.Image image,
java.lang.String type)
|
static java.lang.String |
getHTMLSpacerImageTag(Document dom)
|
java.awt.Image |
getImage(java.lang.String imageName)
|
static byte[] |
getImageEmpty()
|
javax.swing.ImageIcon |
getImageIcon(java.lang.String imageName)
Return the image with the specified image name. |
javax.swing.ImageIcon |
getImageIcon(java.net.URL baseURL,
java.lang.String imageName)
Return the image with the specified image name. |
ResourceWrapper |
getImageIconWrapper(java.net.URL baseURL,
java.lang.String imageName,
boolean createNullImage)
Return the image with the specified image name. |
static byte[] |
getImageNotFound()
|
java.util.Hashtable |
getImages()
|
static java.net.URL |
getImageUrl(java.lang.String imageName)
|
java.util.Enumeration |
getImageWrappers()
|
static ImageHelper |
getInstance()
|
int |
getLoadedImages()
|
int |
getLoadedImagesSize()
|
static java.awt.Image |
getScaledImage(java.awt.Component imageHolder,
java.awt.Image image,
int newWidth,
int newHeight)
|
void |
putImage(java.lang.String key,
byte[] value,
boolean internalized)
|
void |
releaseImageCache()
|
void |
releaseImageCache(java.lang.String startsWith)
|
void |
releaseInternalizedImages()
|
void |
removeImage(java.lang.String key)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMAGE_EMPTY
public static final byte[] IMAGE_EMPTY
IMAGE_NOT_FOUND_DEF
public static final byte[] IMAGE_NOT_FOUND_DEF
imageEmpty
public static javax.swing.ImageIcon imageEmpty
imageNotFound
public static javax.swing.ImageIcon imageNotFound
NULL_IMAGE_DEF
public static final byte[] NULL_IMAGE_DEF
ImageHelper
public ImageHelper()
createByteArray
public static byte[] createByteArray(javax.swing.ImageIcon i,
java.lang.String type)
createByteArray
public static byte[] createByteArray(java.awt.Image image,
java.lang.String type)
getHTMLSpacerImageTag
public static java.lang.String getHTMLSpacerImageTag(Document dom)
getImage
public java.awt.Image getImage(java.lang.String imageName)
getImageEmpty
public static byte[] getImageEmpty()
getImageIcon
public javax.swing.ImageIcon getImageIcon(java.lang.String imageName)
- Return the image with the specified image name. Note that the image should be in the class path.
- Parameters:
imageName - the name of the image
- Returns:
- an image with the specified name
getImageIcon
public javax.swing.ImageIcon getImageIcon(java.net.URL baseURL,
java.lang.String imageName)
- Return the image with the specified image name. Note that the image should be in the class path.
- Parameters:
imageName - the name of the image
- Returns:
- an image with the specified name
getImageIconWrapper
public ResourceWrapper getImageIconWrapper(java.net.URL baseURL,
java.lang.String imageName,
boolean createNullImage)
- Return the image with the specified image name. Note that the image should be in the class path.
- Parameters:
imageName - the name of the image
- Returns:
- an image with the specified name
getImageNotFound
public static byte[] getImageNotFound()
getImages
public java.util.Hashtable getImages()
getImageUrl
public static java.net.URL getImageUrl(java.lang.String imageName)
getImageWrappers
public java.util.Enumeration getImageWrappers()
getInstance
public static ImageHelper getInstance()
getLoadedImages
public int getLoadedImages()
getLoadedImagesSize
public int getLoadedImagesSize()
getScaledImage
public static java.awt.Image getScaledImage(java.awt.Component imageHolder,
java.awt.Image image,
int newWidth,
int newHeight)
putImage
public void putImage(java.lang.String key,
byte[] value,
boolean internalized)
releaseImageCache
public void releaseImageCache()
releaseImageCache
public void releaseImageCache(java.lang.String startsWith)
releaseInternalizedImages
public void releaseInternalizedImages()
removeImage
public void removeImage(java.lang.String key)