Java 6 SE Platform
6.0
Home

camickr
Class IconAdapter

java.lang.Object
  extended by camickr.IconAdapter
All Implemented Interfaces:
javax.swing.Icon

 class IconAdapter
extends java.lang.Object
implements javax.swing.Icon

IconAdapter class handles this instance's painting of javax.swing.ImageIcon and javax.swing.Icon interface objects.


Field Summary
private  java.awt.Component component
           
private  javax.swing.Icon icon
           
 
Constructor Summary
IconAdapter(javax.swing.Icon icon, java.lang.String key)
          Class constructor sets an instance of the javax.swing.Icon interface and a java.lang.String containing the qualified javax.swing.JComponent class name.
 
Method Summary
 int getIconHeight()
          Accessor for icon pixel height.
 int getIconWidth()
          Accessor for icon pixel width.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paints icon at this x, y location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

icon

private javax.swing.Icon icon

component

private java.awt.Component component
Constructor Detail

IconAdapter

public IconAdapter(javax.swing.Icon icon,
                   java.lang.String key)
Class constructor sets an instance of the javax.swing.Icon interface and a java.lang.String containing the qualified javax.swing.JComponent class name.

Parameters:
icon - javax.swing.Icon interface instance.
key - java.lang.String containing qualified javax.swing.JComponent class name.
See Also:
javax.swing.Icon interface
Method Detail

getIconWidth

public int getIconWidth()
Accessor for icon pixel width.

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
int value representing icon pixel width.

getIconHeight

public int getIconHeight()
Accessor for icon pixel height.

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
int value representing icon pixel height.

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Paints icon at this x, y location.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - java.awt.Component reference of the component to paint.
g - java.awt.Graphics object.
x - int value of the x axis coordinate.
y - int value of the y axis coordinate.

Java 6 SE Platform
6.0
Home

API documentation written, prepared and compiled by Brent Allen Parrish, woven-media.com, 15 May 2008