Java 6 SE Platform
6.0
Home

camickr
Class ColorIcon

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

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

ColorIcon class handles ColorIcon rendering and implements the javax.swing.Icon interface.


Field Summary
private  java.awt.Color color
           
 
Constructor Summary
ColorIcon(java.awt.Color color)
          Sets this member's java.awt.Color reference.
 
Method Summary
 int getIconHeight()
          Returns the icon height.
 int getIconWidth()
          Returns the icon width.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Renders the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

private java.awt.Color color
Constructor Detail

ColorIcon

public ColorIcon(java.awt.Color color)
Sets this member's java.awt.Color reference.

Parameters:
color - java.awt.Color to this instance.
Method Detail

getIconWidth

public int getIconWidth()
Returns the icon width.

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

getIconHeight

public int getIconHeight()
Returns the icon height.

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

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Renders the icon.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - java.awt.Component to paint.
g - java.awt.Graphics object.
x - int value for x axis coordinate.
y - int value for 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