yu.ac.bg.etf.javaqx.qswing
Class ImageIcon

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.ImageIcon
All Implemented Interfaces:
Icon

public class ImageIcon
extends java.lang.Object
implements Icon

Image Icon.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Constructor Summary
ImageIcon(byte[] imageData)
          Constructs new ImageIcon object.
ImageIcon(Image image)
          Constructs new ImageIcon object.
ImageIcon(java.lang.String fileName)
          Constructs new ImageIcon object.
ImageIcon(java.net.URL location)
          Constructs new ImageIcon object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 Image getImage()
          Returns image.
 int hashCode()
          
 void paintIcon(JQComponent component, Graphics g, int x, int y)
          Draws the icon at the specified location.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIcon

public ImageIcon(Image image)
Constructs new ImageIcon object.

Parameters:
image - the image

ImageIcon

public ImageIcon(java.lang.String fileName)
Constructs new ImageIcon object.

Parameters:
fileName - the file name

ImageIcon

public ImageIcon(java.net.URL location)
Constructs new ImageIcon object.

Parameters:
location - the location

ImageIcon

public ImageIcon(byte[] imageData)
Constructs new ImageIcon object.

Parameters:
imageData - the image data
Method Detail

getImage

public Image getImage()
Returns image.

Returns:
image

getIconWidth

public int getIconWidth()
Returns the icon's width.

Specified by:
getIconWidth in interface Icon
Returns:
the icon's width

getIconHeight

public int getIconHeight()
Returns the icon's height.

Specified by:
getIconHeight in interface Icon
Returns:
the icon's height

paintIcon

public void paintIcon(JQComponent component,
                      Graphics g,
                      int x,
                      int y)
Draws the icon at the specified location.

Specified by:
paintIcon in interface Icon
Parameters:
component - the component
g - the graphics
x - the icon's x coordinate
y - the icon's y coordinate

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()



Copyright © 2007 ETF and contributors. All Rights Reserved.