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

Variable Index

 o component
 o height
 o image
 o imageLocation
 o imageObserver
 o loadStatus
 o tracker
 o width

Constructor Index

 o com.symantec.itools.swing.icons.ImageIcon()
Creates an uninitialized image icon.
 o com.symantec.itools.swing.icons.ImageIcon(URL)
Creates an image icon from the specified URL.
 o com.symantec.itools.swing.icons.ImageIcon(Image)
Creates an image icon from the specified Image.
 o com.symantec.itools.swing.icons.ImageIcon(InputStream)
Creates an image icon from the specified InputStream.

Method Index

 o getIconHeight()
Get the height of the Icon
 o getIconWidth()
Get the width of the Icon
 o getImage()
 o getImageLoadStatus()
Returns the status of the image loading operation.
 o getImageLocation()
Returns the location of the Image displayed by this icon.
 o getImageObserver()
Return the image observer for the image
 o loadImage(Image)
Wait for the image to load
 o paintIcon(Component, Graphics, int, int)
Paints the Icon
 o setImageLocation(URL)
Set the location to displayed by this icon.
 o setImageObserver(ImageObserver)
Set the image observer for the image.

Variables

 o component
protected static final java.awt.Component component
 o height
protected int height
 o image
protected transient java.awt.Image image
 o imageLocation
protected java.net.URL imageLocation
 o imageObserver
protected java.awt.image.ImageObserver imageObserver
 o loadStatus
protected transient int loadStatus
 o tracker
protected static final java.awt.MediaTracker tracker
 o width
protected int width

Constructors

 o ImageIcon
public ImageIcon()
Creates an uninitialized image icon.

 o 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.

 o 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.

 o 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.

Methods

 o getIconHeight
public int getIconHeight()
Get the height of the Icon

 o getIconWidth
public int getIconWidth()
Get the width of the Icon

 o getImage
public java.awt.Image getImage()
 o 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
 o getImageLocation
public java.net.URL getImageLocation()
Returns the location of the Image displayed by this icon.

 o getImageObserver
public java.awt.image.ImageObserver getImageObserver()
Return the image observer for the image

 o loadImage
protected void loadImage(Image image)
Wait for the image to load

 o paintIcon
public synchronized void paintIcon(Component c,
                                   Graphics g,
                                   int x,
                                   int y)
Paints the Icon

 o 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.

 o 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