|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--com.webcab.chat.gui.ImageCache
This class encapsulates all data a java.awt.Image holds, by
caching it into memory. It is an alternative to the way Images created
with java.awt.Toolkit.getImage are drawn.
When an image is created with awt's methods, the bytes loaded from the
specified image URL might suffer from low band width. ImageCache
has a very stable loading method, which ensures no data losses occur. This
prevents errors like missing chunks or mismatched colors.
| Constructor Summary | |
ImageCache(java.net.URL imageURL,
java.lang.String imageFile)
This constructor loads the image data into memory. |
|
ImageCache(java.net.URL imageURL,
java.lang.String imageFile,
java.applet.Applet app)
This constructor loads the image data into memory. |
|
| Method Summary | |
static java.awt.Image |
readImage(java.lang.String imageFile,
java.awt.Component component)
A static method provided by this class as a convenience. |
static java.awt.Image |
readImage(java.net.URL imageURL,
java.awt.Component component)
A static method provided by this class as a convenience. |
static java.awt.Image |
readImage(java.net.URL imageURL,
java.lang.String imageFile,
java.awt.Component component)
A static method provided by this class as a convenience. |
java.awt.Image |
toImage(java.awt.Component component)
Creates the image from memory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImageCache(java.net.URL imageURL,
java.lang.String imageFile)
toImage.imageURL - the URL base where the image is locatedimageFile - the name of the filetoImage(java.awt.Component),
ImageCache(URL, String, Applet),
readImage(URL, Component)
public ImageCache(java.net.URL imageURL,
java.lang.String imageFile,
java.applet.Applet app)
toImage.imageURL - the URL base where the image is locatedimageFile - the name of the fileapp - the invoking applet, if there is one, otherwise a null pointer. This
paramter is provided in order to allow a "Caching image" text be
displayed in the browser's status bar.toImage(java.awt.Component),
ImageCache(URL, String),
readImage(URL, Component)| Method Detail |
public java.awt.Image toImage(java.awt.Component component)
component - The ImageObserver to check if the image is
ready for use.readImage(URL, Component)
public static java.awt.Image readImage(java.net.URL imageURL,
java.awt.Component component)
java.awt.Toolkit.getImage, offering
a more secure transfer and less data loss.imageURL - the URL of the image to be loadedcomponent - the Component which is going to encapsulate the Image (for
example a java.awt.Canvas)component.ImageCache(URL, String),
readImage(String, Component),
readImage(URL, String, Component)
public static java.awt.Image readImage(java.lang.String imageFile,
java.awt.Component component)
java.awt.Toolkit.getImage, offering
a more secure transfer and less data loss.imageFile - the name of the URL where the image to be loaded is locatedcomponent - the Component which is going to encapsulate the Image (for
example a java.awt.Canvas)component.ImageCache(URL, String),
readImage(URL, Component),
readImage(URL, String, Component)
public static java.awt.Image readImage(java.net.URL imageURL,
java.lang.String imageFile,
java.awt.Component component)
java.awt.Toolkit.getImage, offering
a more secure transfer and less data loss.imageURl - the URL base of the image locationimageFile - the name of the imagecomponent - the Component which is going to encapsulate the Image (for
example a java.awt.Canvas)component.ImageCache(URL, String),
readImage(URL, Component),
readImage(String, Component)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||