dip.gui.swing
Class ColorRectIcon

java.lang.Object
  extended bydip.gui.swing.ColorRectIcon
All Implemented Interfaces:
javax.swing.Icon

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

Creates an Icon that is a solid color within a 1-pixel black rectangular border.

NOTE: if this is going to be used by ANY other class, it should be taken out instead of be a nested class.


Constructor Summary
ColorRectIcon(int height, int width, java.awt.Color color)
          Create a ColorRect
 
Method Summary
 int getIconHeight()
          Icon height
 int getIconWidth()
          Icon width
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draw the Icon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorRectIcon

public ColorRectIcon(int height,
                     int width,
                     java.awt.Color color)
Create a ColorRect

Method Detail

getIconHeight

public int getIconHeight()
Icon height

Specified by:
getIconHeight in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Icon width

Specified by:
getIconWidth in interface javax.swing.Icon

paintIcon

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

Specified by:
paintIcon in interface javax.swing.Icon


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.