|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrcx.rcxtools.filebrowser.ImageManager
public class ImageManager
This class enable Image loading and painting. Images that are created from a URL or filename are preloaded using MediaTracker to monitor the loaded state of the image.
From the swing package (ImageIcon.java)
Constructor Summary | |
---|---|
ImageManager()
Creates an uninitialized image icon. |
|
ImageManager(java.awt.Image image)
Creates an ImageManager from the image. |
|
ImageManager(java.awt.Image image,
java.lang.String description)
Creates an ImageManager from the image. |
|
ImageManager(java.lang.String filename)
Creates an ImageManager from the specified file. |
|
ImageManager(java.lang.String filename,
java.lang.String description)
Creates an ImageManager from the specified file. |
|
ImageManager(java.net.URL location)
Creates an ImageManager from the specified URL. |
|
ImageManager(java.net.URL location,
java.lang.String description)
Creates an ImageManager from the specified URL. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Get the description of the image. |
int |
getIconHeight()
Get the height of the Icon |
int |
getIconWidth()
Get the width of the Icon |
java.awt.Image |
getImage()
Returns the Icon's Image |
java.awt.image.ImageObserver |
getImageObserver()
Return the umage observer for the image |
static boolean |
isValidImage(java.net.URL url)
Returns true if the specified URL locates a valid image, false otherwise. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Deprecated. |
void |
paintIcon(java.awt.Graphics g,
int x,
int y)
Paints the Icon |
void |
paintIcon(java.awt.Graphics g,
int x,
int y,
int w,
int h,
java.awt.Color bgcolor)
Paints the Icon |
void |
paintIcon(java.awt.Graphics g,
int x,
int y,
int w,
int h,
int sx,
int sy,
int sw,
int sh)
Paints the Icon |
void |
paintIcon(java.awt.Graphics g,
int x,
int y,
int w,
int h,
int sx,
int sy,
int sw,
int sh,
java.awt.Color bgcolor)
Paints the Icon |
void |
setDescription(java.lang.String description)
Set the description of the image. |
void |
setImage(java.awt.Image image)
Set the image displayed by this icon. |
void |
setImageObserver(java.awt.image.ImageObserver observer)
Set the image observer for the image. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageManager(java.lang.String filename, java.lang.String description)
filename
- the name of the file containing the imagedescription
- a brief textual description of the imagepublic ImageManager(java.lang.String filename)
public ImageManager(java.net.URL location, java.lang.String description)
URL
- the URL for the imagedescription
- a brief textual description of the imagepublic ImageManager(java.net.URL location)
public ImageManager(java.awt.Image image, java.lang.String description)
image
- the imagedescription
- a brief textual description of the imagepublic ImageManager(java.awt.Image image)
public ImageManager()
Method Detail |
---|
public java.awt.Image getImage()
public void setImage(java.awt.Image image)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public void paintIcon(java.awt.Graphics g, int x, int y)
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
public void paintIcon(java.awt.Graphics g, int x, int y, int w, int h, java.awt.Color bgcolor)
public void paintIcon(java.awt.Graphics g, int x, int y, int w, int h, int sx, int sy, int sw, int sh)
public void paintIcon(java.awt.Graphics g, int x, int y, int w, int h, int sx, int sy, int sw, int sh, java.awt.Color bgcolor)
public int getIconWidth()
public int getIconHeight()
public void setImageObserver(java.awt.image.ImageObserver observer)
icon = new ImageManager(...) button.setImage(icon); icon.setImageObserver(button);
public java.awt.image.ImageObserver getImageObserver()
public static boolean isValidImage(java.net.URL url)
URL
- the URL to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |