Class com.symantec.itools.swing.icons.ImageIcon
All Packages Class Hierarchy This Package Previous Next Index
Class com.symantec.itools.swing.icons.ImageIcon
Object
|
+----com.symantec.itools.swing.icons.ImageIcon
- public class ImageIcon
- extends Object
- implements Icon, Serializable
-
component
-
-
height
-
-
image
-
-
imageLocation
-
-
imageObserver
-
-
loadStatus
-
-
tracker
-
-
width
-
-
com.symantec.itools.swing.icons.ImageIcon()
- Creates an uninitialized image icon.
-
com.symantec.itools.swing.icons.ImageIcon(URL)
- Creates an image icon from the specified URL.
-
com.symantec.itools.swing.icons.ImageIcon(Image)
- Creates an image icon from the specified Image.
-
com.symantec.itools.swing.icons.ImageIcon(InputStream)
- Creates an image icon from the specified InputStream.
-
getIconHeight()
- Get the height of the Icon
-
getIconWidth()
- Get the width of the Icon
-
getImage()
-
-
getImageLoadStatus()
- Returns the status of the image loading operation.
-
getImageLocation()
- Returns the location of the Image displayed by this icon.
-
getImageObserver()
- Return the image observer for the image
-
loadImage(Image)
- Wait for the image to load
-
paintIcon(Component, Graphics, int, int)
- Paints the Icon
-
setImageLocation(URL)
- Set the location to displayed by this icon.
-
setImageObserver(ImageObserver)
-
Set the image observer for the image.
component
protected static final java.awt.Component component
height
protected int height
image
protected transient java.awt.Image image
imageLocation
protected java.net.URL imageLocation
imageObserver
protected java.awt.image.ImageObserver imageObserver
loadStatus
protected transient int loadStatus
tracker
protected static final java.awt.MediaTracker tracker
width
protected int width
ImageIcon
public ImageIcon()
- Creates an uninitialized image icon.
ImageIcon
public ImageIcon(URL location)
- Creates an image icon from the specified URL. The image will
be preloaded by using MediaTracker to monitor the loaded state
of the image.
ImageIcon
public ImageIcon(Image i)
- Creates an image icon from the specified Image. The image will
be preloaded by using MediaTracker to monitor the loaded state
of the image.
ImageIcon
public ImageIcon(InputStream inStream) throws IOException
- Creates an image icon from the specified InputStream. The image will
be preloaded by using MediaTracker to monitor the loaded state
of the image. The InputStream is closed when the read is done.
getIconHeight
public int getIconHeight()
- Get the height of the Icon
getIconWidth
public int getIconWidth()
- Get the width of the Icon
getImage
public java.awt.Image getImage()
getImageLoadStatus
public int getImageLoadStatus()
- Returns the status of the image loading operation.
- Returns:
- the loading status as defined by java.awt.MediaTracker.
- See Also:
- ABORTED, ERRORED, COMPLETE
getImageLocation
public java.net.URL getImageLocation()
- Returns the location of the Image displayed by this icon.
getImageObserver
public java.awt.image.ImageObserver getImageObserver()
- Return the image observer for the image
loadImage
protected void loadImage(Image image)
- Wait for the image to load
paintIcon
public synchronized void paintIcon(Component c,
Graphics g,
int x,
int y)
- Paints the Icon
setImageLocation
public void setImageLocation(URL location)
- Set the location to displayed by this icon. The image will
be preloaded by using MediaTracker to monitor the loading state
of the image.
setImageObserver
public void setImageObserver(ImageObserver observer)
- Set the image observer for the image. Set this
property if the ImageIcon contains an animated GIF.
For example:
icon = new ImageIcon(...)
button.setImageLocation(URL);
icon.setImageObserver(button);
All Packages Class Hierarchy This Package Previous Next Index