JHotDraw 7.4.1

org.jhotdraw.draw.action
Class ColorIcon

java.lang.Object
  extended by org.jhotdraw.draw.action.ColorIcon
All Implemented Interfaces:
javax.swing.Icon

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

ColorIcon.

Version:
$Id: ColorIcon.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Constructor Summary
ColorIcon(java.awt.Color color)
           
ColorIcon(java.awt.Color color, java.lang.String name)
           
ColorIcon(java.awt.Color color, java.lang.String name, int width, int height)
           
ColorIcon(int rgb)
          Creates a new instance.
ColorIcon(int rgb, java.lang.String name)
           
 
Method Summary
 java.awt.Color getColor()
           
 int getIconHeight()
           
 int getIconWidth()
           
 java.lang.String getName()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorIcon

public ColorIcon(int rgb)
Creates a new instance.


ColorIcon

public ColorIcon(java.awt.Color color)

ColorIcon

public ColorIcon(int rgb,
                 java.lang.String name)

ColorIcon

public ColorIcon(java.awt.Color color,
                 java.lang.String name)

ColorIcon

public ColorIcon(java.awt.Color color,
                 java.lang.String name,
                 int width,
                 int height)
Method Detail

getColor

public java.awt.Color getColor()

getName

public java.lang.String getName()

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.